Releases: gonzofish/talc
I'm Not Impartial
This update let's generation leverage partial templates (aka, reusable snippets of HTML) to cut down on boilerplate code for pages. See the README for details
Depends on Your Perspective
This is a dependencies & vulnerabilities update, so no new features.
All Sorted
Now in an index template the posts can be sorted by using the sortBy attribute in talc.config.js. This takes an Array<string> where the entries are metadata attributes.
If you don't specify it, by default, Talc will sort by publish_date in reverse chronological order. To that end, publish_date and create_date will always sort in reverse chronological order.
That's sort of cool.
Is There a Draft in Here?
This release adds the concept of drafts.
Instead of having an input & output directory, there are now three directories that can be overridden in talc.config.js:
draftspublishedbuilt
When talc new "<title>" is run, the file is placed in drafts. From there you can work on the file without worrying it'll be made public.
Once your draft is ready to be seen on your site, you can run talc publish <filename>. Talc will add a publish_date attribute to the file's metadata and move it to the published directory.
When you run talc build, it'll take any file in the published directory and put a compiled version in the built directory.
Loopity Loop
New features:
- Supports YAML-formatted metadata that can be used as variables in a template
- Supports the use of loops through a
for/endforconstruct - Specify a template for generating an index of all the output files (can be used as a main page for a blog)
Take a look at the README for detail information on how to use all of the above.
Stumbles & Fumbles
This is the very first cut of Talc. Very basic functionality:
- Provide a
talc.config.jsfor powering Talc - Generate a new Markdown file with
talc new <title> - Publish Markdown files with
talc publish - Optionally, place posts into an HTML template during publish