This commit brings the dependencies up to date.
This more importantly brings the stable version of system.commandline
and all the changes needed to make it work properly with the program.
Importantly this changes how validation is done, and how defaults are
passed to commandline. This also allows me to remove the original null
protection as when the argument is not specified commandline defaults to
the current directory.
This has also meant I can remove unnecessary async calls that appear to
have no performance benefits, and remove some null checking that isn't
needed any more.
change the Sitefiles information count to actually use the count and not
the sitefiles list itself.
Change the logging of file extensions in SiteFile from Information to
Debug
If a sitefile is provided then that data is passed via the commandline
to pandoc, this then adds it to the YAML metadata available to filters
and templates.
Enabling this makes the way I write pages more functional inside of
pandoc.
In future I may add some way of allowing users to provide pandoc
arguments.
Add the JSON code generation needed to make my code fully trimmable, and
therefore able to be published with full native AOT compilation.
NOTE: This may not guarantee stable builds as the logging library
serilog is still not fully trimmable, I have made changes to my logging
statements to avoid destructuring, but there is a chance that a
published build could randomly crash.
The only solution is to either wait for serilog to become fully
trimmable, or to remove the logging from AOT builds
While I would usually try and stick to the conventional commits
standard this commit is a big one.
This commit Bumps us to 0.0.2 And completely changes how you interact
with the program.
Now it is easier as you only need to specify the project directory on
the commandline (OR be in the directory of the site you want to build)
Also introduced is the cssitegen.json file that all projects must use.
This means that static information such as the basename, source, and
destination are kept with the files.
ProjectSettings is used to hopefully make managing a site easier,
although future refactoring may join the RuntimeSettings and
ProjectSettings into one class.
There are some obvious issues with the project in its current state but
pending testing with a live domain, it does appear to actually work as
intended. (if this is true then the code just needs refactoring and
tidying to qualify for a 0.1.0 Release.)
Future features planned include
- Code to generate pages from data
- Template nesting (or a custom template templating language)
- Introduction of image conversion to webp (with fallback to RawCpy)
- consistency enforcement, to ensure that deleted source files mean
deleted destination files.
With a little bit of OOP and a monster commit, I too can make a an ssg,
Ka-chow...
Changes:
- ➕ added class to represent SiteFile
- ➕ enabled conversion semi-automatic based on file type.
- ➕ added template to Testing.
- ➖ Removed awful code for dependency search
- ➖ Removed awful code for enumerating directory
- ➕ arguments to a class to allow for easier passing to other
parts of the code.
TODO:
- 🐞Test and debug with a copy of a live site,
- ✍️ Add handling for Pandoc errors on stderr
- ❓Look into parallelising as much as possible.
Updates the gitignore to preserve the Testing/dst directory but not its
contents. This will make my "testing" easier on other systems
TODO: write some kind of tests.
This should be done before program exit and as such is currently
in a comment after the main class body.
TODO: add this back in at the appropriate location.
This currently relies on the last modified date and a dotfile.
I may change this later to use a hash to detect changes
however this method seems good enough.