Releasing 0.2 alpha2
Pre-release
Pre-release
New features
- Add permalink support: If
permalinkvariable is defined, use it instead of file naming variable.
Misc
- Improved test coverage
- Add safety checks to make sure nothing is built outside of the build tree.
- Fix build with missing pages or posts folder in source tree
Changes since alpha1
- Major changes in the
juliet newsyntax:
In the alpha1 the juliet new command was taking two parameters: --date
and --title. This is absolutely not what we want because it restricts
the usage of juliet new to a very specific subset of article headers.
Instead we switch to a much more modular system:
1. juliet new
Creates an article with default values.
By default the article name formatting is $date-$title.md (title
in slugified form). Default values for title and date are taken
from the theme. It is highly recommended to the theme to let date
being set by juliet (this can be done by _not_ specifying a default
value for this variable). It is then set to the current date
YYYY-MM-DD.
2. juliet new --file-name FILENAME
Creates an article with default values in posts/FILENAME. For
default, values, same as 1.
3. juliet new (-f FILENAME) -- key: value key2: value2 key3: value3
Header values can always be passed as key value list after the --
(stop argument processing). These values are then used for article
name generation if filename is not specified + article header.
Missing key values are defaulted using the theme default values.
The syntax for the key-value list is as following: for each key/value
pair:
1. the key
- optional: the key might end with a ':' character. This is just
syntactic sugar, doesn't change anything.
- keep in mind: the key can't contains spaces ' ', underscores '_'
or colons ':'.
2. followed by one or more space characters
3. the value
If the theme doesn't define default values, execution of juliet
new is aborted with appropriate error message. That's why the
theme should always specify proper default values if these are not
going to be auto generated by juliet (like date_).
In the future we will provide a hook-system which will allow themes
to define Python hooks to generate values during juliet new
execution.
The article name formatting (default: $date-$slug_title.md) can be
specified by the user using the filenaming_pattern config variable.
The pattern is in Python Template form (PEP 292). Accessible variables
are:
- all command-line passed key: values
- all theme side default values (overwritten by command-line passed
key: values if key is identical)
- all generated entries:
o date_
Either current date or, if specified by user/theme, the same
value as the date variable
o for each key, a slugified version of the key as slug_'key'. e.g.
for title key, slug_title, date key, slug_date, etc.
EX:
juliet new
juliet new hello-world.md
juliet new -- title: "Hello, world !"
juliet new -- title "Hello, world !" date "1998-12-12"