statiqdev / CleanBlog

A blogging theme for Statiq Web.
MIT License
53 stars 25 forks source link

Layout of 'theme' #11

Closed gortok closed 3 years ago

gortok commented 3 years ago

This is a theme, as I understand it -- so it should have the structure of:

theme
   |
   - input
        |
        - css
        - html
        (etc.)

however, the structure of this repository is just:

input
 |
 -css
 -html

Is that purposeful / should it be updated to be the structure that consumers would expect a theme to have?

daveaglick commented 3 years ago

The layout is intentional so that using the theme as a submodule is possible (though not at all required). Since a submodule needs to be contained in a subfolder, if the theme repository were structured to line up with the same root as the main site, you wouldn't be able to add it under a "theme" submodule folder. Hopefully that made sense? Let me know if not and I'll expand further.

Note that eventually the CLI will be able to take care of all the theme wrangling for you: https://github.com/statiqdev/Statiq.Web/issues/923 (though that's still a ways off).

gortok commented 3 years ago

@daveaglick Oh that's interesting; I had no idea this was a submodule. I should read more. Thanks for the quick follow up and the link to #923

daveaglick commented 3 years ago

It doesn't have to be used as a submodule, copying directly into the theme folder in the site is another option - but I've found the submodule approach is a nice one, especially if you fork the theme repo and add the fork as a submodule. That way you can commit local changes to your fork while continuing to merge it with the upstream theme as it gets improved.