Checking files and directories exist prior to trying to access them. If templates don't exist, their generation will be skipped over and it will notify you you don't have the template there. This also works for static pages.
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.
Merge remote-tracking branch 'sourcehut/master'
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.
Add post tag read to processing
merge with sr.ht upstream
First pass at tags. Tags are read at runtime on each post. Next is to create a dictionary with lists of individual tags and the posts that reference them.
Link in text support
Links in body of paragraphs support. I had run into an issue because of a dangling + character in one of my test posts that threw me off in looking for why it wouldn't compile. I will need to add some error catching to give indications if the program crashes while looking for a closing tag. Also small cleanup of leftover debugging print lines.
Static page creation.
Creation of non blog post pages, essentially just pages that don't get indexed by the blog index and live in the home directory. Currently no support for automatically adding those to an index so the links should be hard marked up in the index template or similar. This approach could also essentially work for a generic tag system for the posts with a little more work.
Adding Project file for CI build
Static Page setup
Adding support for static pages, which are posts in markup but when not posted with the post template, are not included in the index. Useful for tracking books read etc, something which is updated but not time connected.
Atom Feed generation.
Atom feed is now generated from a template placed in the root folder. The feed is barebones and only provides name, date, and path, not content. Additionally, I have cleaned up file path generation to use underscores instead of spaces in the file name creation.
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.
Image support added. New tag delimited with | symbol. README updated to give samples of images and the updated directory structure to show this.
Index sorting in reverse date order.
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.
An index of files is now being built. It is hacky, and definitely not very clean, but it works. I should add a support to allow a template snipped be loaded at runtime to give freer access to design of the index link pieces. I should also build in a feature to grab the date from each post's source file so that that stays the same even if it is edited and recompiled in the future.
Few more changes.
Back ticks, not apostrophes.
Adding code block markdown to show the tree structure correctly.