-
-
Notifications
You must be signed in to change notification settings - Fork 78
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
Feature: Include _data from theme in sites that use the theme #68
Comments
This feature could be useful for i18n and/or l10n, when building multilingual theme and the 118n strings sits in _data folder. In case of conflicts the files in _data can always be overridden like the _includes and _laytouts folders are. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
It seems that remote themes don't pull files from the remote _data folder (see benbalter/jekyll-remote-theme#68) - therefore site.data.ui-text is missing. Most of the MM theme falls back (to English), but a few things don't - for example, the "Follow:" text in the page footer...
In these days we have hundreds of tracking services, marketing automation services, form frameworks, etc. that all require a couple of paragraphs in a GDPR statement. It’s the obligation of a consumer project to gather these semi-legal pieces of information and to put them into a privacy statement. Instead of putting these text modules into a privacy page itself I propose to put them into a catalogue in the data folder of a theme. This way a kind of micro MVC pattern could be implemented by offering a specialized layout in combination with a page that extends this layout. The data file would become the model, the layout the view and the page on the consumer project the controller. As @benbalter tagged this issue to be a model: controller: Any page which utilizes the layout from the remote_theme. In the frontmatter boolean switches control which text modules get included in rendering. Reviews welcomed.
|
Not being able to have the _data/ collections in a remote theme be accessible to sites that use the theme is problematic.
There are useful collections that one might consider putting in a remote theme and using across many repositories (the owasp foundation website https://owasp.org is a collection of repositories making up one website). Such data might include a default menu system for all sites that resides in the header or a default set of corporate supporters to display in a footer.
I propose that any collection that exists in a _data folder in the remote theme be accessible via sites that use the theme. Further, in case of name collisions, if the site implementing the remote theme uses a data collection of the same name then the remote theme's version of the collection is replaced by the site's version. This functionality is available in a ruby gem for gem themes and would be useful here.
Currently the alternative to this is to put data in a separate folder in a json file and load the json file via javascript in the remote theme. This workaround assumes the use of javascript and we would like to avoid requiring js.
The text was updated successfully, but these errors were encountered: