Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reorganize site.features (and maybe other) config objects #41

Closed
briandominick opened this issue May 30, 2021 · 2 comments
Closed

Reorganize site.features (and maybe other) config objects #41

briandominick opened this issue May 30, 2021 · 2 comments
Labels
enhancement New feature or request Jekyll Involves working heavily with or extending Jekyll SSG
Milestone

Comments

@briandominick
Copy link
Contributor

I initially thought the idea of putting most theme-defining data objects in the site scope -- meaning defined in one or more config files -- made a lot of sense, just to have an elegant structure and not use the _data/ dir for theme-defining stuff.

Now I think it's just annoying and too restrictive. Since there is no way to declare multiple config files from within a config file (you have to use the CLI's --config folder/file-one.yml,folder/file-two.yml,etc argument), it's not easy to break up the config file without adding lots of noise to the commandline. This can easily be remedied by the techniques most shops employ in their build routines, where long CLI commands don't matter, but I want AsciiDocsy to be a good authoring experience right out of the box, which means keeping CLI commands as simple as possible.

This leaves us with the option of moving some or all of these to the _data/config/ path, which for the AsciiDocsy site itself is _docs/_data/theme/ -- another part of the reason I like keeping this out of the data path. But I do think this is the best move. This gives the user complete control over which objects to store together. Even though you have to maintain the hierarchy/tree, with Jekyll's data scope, we have the option to store EVERYTHING in a _data/theme.yml file or split things up into _data/config/navigation.yml or even _data/config/navigation/breadcrumbs.yml and so forth.

So now site.features will be site.data.theme.features.

Except I think I also want to get rid of the extra tiers in the features object, starting with eliminating the category features itself. The actions block is probably also superfluous. If we flatten the objects down, we need no _data/config/features/ path, let alone _data/config/features/actions/.

@briandominick briandominick added enhancement New feature or request Jekyll Involves working heavily with or extending Jekyll SSG labels May 30, 2021
@briandominick briandominick added this to the 0.3.0 milestone May 30, 2021
@briandominick
Copy link
Contributor Author

briandominick commented Jun 15, 2021

Update as I begin working on this issue: I'll move everything to _docs/_data/theme/ -- so site.data.theme. scope -- to leave the config namespace open, as it's a common term for applications to have data files to cover. This also keeps a clear distinction between the site. scope which is defined by "config" files and the data.theme scope.

@briandominick
Copy link
Contributor Author

Resolved in #51

@briandominick briandominick modified the milestones: 0.3.0, 0.2.0 Jul 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Jekyll Involves working heavily with or extending Jekyll SSG
Projects
None yet
Development

No branches or pull requests

1 participant