Skip to content

Conversation

@rdmueller
Copy link

No description provided.

@bmarwell
Copy link

Wow, that's too much to review on phone (Browser only shows first file, app doesn't have a search button).

I would like to read more about the rendering model. There's like no documentation about it. What goes in HOW, and how does it get accessible in the model?
E.g. asciidoc's :jbake-something: is accessible in fteemarker as..?
What is accessible by default?

What I read so far looks really good!
OrientDB, pipeline, etc... Can't wait for Java 8+ features, better 17!

@jonbullock
Copy link
Member

Documentation about metadata in content files, rendering model etc is here: https://jbake.org/docs/2.6.7/

@@ -0,0 +1,703 @@
= JBake Anti-Patterns: What NOT to Do

This document catalogs common mistakes, anti-patterns, and pitfalls when working with or extending JBake.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love this document (plus a few others), but this is soooooo much valuable!

Comment on lines +409 to +432
**Why wrong:**

* Parsing errors
* Dates not sortable
* Archive generation fails

**✅ Correct approach:**

* Use consistent format matching `date.format` config
* Default: `yyyy-MM-dd`
* Stick to ISO 8601 formats

**Code example:**

```markdown
❌ Wrong:
date=November 22, 2025 # Doesn't match default format!
date=22/11/2025 # Ambiguous!

✅ Correct:
date=2025-11-22 # ISO 8601, matches default

# Or configure format:
# date.format=dd-MM-yyyy

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a big problem related to java.util.Date. We need to think of a date parser which favours java.time related methods and only falls back on java.util.Date on special occasions (e.g. fallback mode, legacy mode, etc.)


---

=== ❌ Antipattern: State Leakage Between Tests

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd be happy to contribute a junit 5+ extension :)

@bmarwell
Copy link

@rdmueller here's a fork with hsqldb:

https://github.com/OndraZizka/jbake

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants