jplatte / hinoki

A simple, yet very flexible static site generator.
GNU Affero General Public License v3.0
9 stars 2 forks source link

Deprecate / remove hardcoded theme/ directory paths #33

Open jplatte opened 1 month ago

jplatte commented 1 month ago

Currently, hinoki hardcodes theme/{assets,templates,sublime} directory paths relative to where it is invoked as places to look at for assets, templates and sublime syntaxes / themes respectively.

I've wanted to allow people who develop a site-specific theme to not need to nest anything into theme if they don't want, and just today realized a nice way of making that happen without weird fallback logic or erroring if both assets and theme/assets exist or whatever: Don't hardcode any paths.

In my mind, this is similar to how i3 / sway don't have any default keybindings. Rather, you start off with an example config and can add / remove things as you see fit. I already applied the same thing to other features, why not do it for input / output directory configuration as well?

This also means the directory layout in the README.md has to be "rebranded" as an example layout.

jplatte commented 3 weeks ago

The most important bit - allowing configuration - was done in dae47f12c422c28a3284fdb66f2e9e25f8e24fcc.

As of be5cafbfb618818fd88530716523e4b026b70354, these directories are also resolved relative to the directory that contains the config file.

This is the more important bits for the near future, but for the longer term I'll still consider deprecating and later removing the defaults entirely.