~jpgleeson/piaine

ref: a05b108902f18eb3dd37a8ef2b0ac0680ee7a512 piaine/PageConsumer.cs -rw-r--r-- 4.5 KiB
a05b1089 — jpgleeson 11 months ago
Tag generation.

Tags are now generated at runtime if the -tags flag is passed to the program. Only post type pages are included in tags, and an index for each tag is generated and resides in the /tags folder. If the index file is generated with tags. It will look for a !tagCloud tag in the template and the tags will be inserted there, one per line.
86dbf8b5 — jpgleeson 11 months ago
Merge remote-tracking branch 'sourcehut/master'

# Conflicts:
#	PageConsumer.cs
#	Variable.cs
68ae65db — jpgleeson 11 months ago
Tags

Tags are read from each file now, and a central store of them is kept. This needs to be pruned of duplicates next, and then for each one, run through each post to see if they're included on that tag page. Then generate that tag page.
Adding tag parsing to the index file created. Once I have a list of tags from each post without duplicates, I will iterate over the posts again for each tag, adding a link to the post as per the regular index files, but only outputting relevant tagged files. This is redundant and I can definitely build a linked list of posts with tags on the single pass through the files, but this seems a simpler start and given the speed and sporadic nature of using the generator, an additional 50ms is not an issue.
Template Support

Added an optional attribute in post files to allow a different html template to be specified. The individual post will then be rendered into that template and then it will revert to the standard post template.
Date support added

Date support added as a tag in post files. Date is read. The index doesn't yet sort them by date for output but that is next up.
Indexing beginning.

For support needed in my parser. Working on it currently.
Not markdown. Post parser working

Backed away from markdown. Too heavyweight for my needs. Now just supports paragraphs and headers along with a title. The first scanner and parser parses a html template, which needs tags showing the title and the body text. This is taken from a txt file formatted very simply. Variables are preceded by '-' e.g. -title || -body. These are delimited with : from the content. The body text is then run througha  simple parser to give it paragraph tags and header tags. This is then inserted into the place in the html template from the first parse pass. It's simple. It works. Next I need to work on generating a number of posts and creating an index of them,
Variable Handling & Markdown Processing Start

Variables are handled. There is also the beginnings of a markdown processor that will not support the full feature set if I'm being honest.