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

Separate content from config #79

Open
asbjornb opened this issue Mar 19, 2022 · 3 comments
Open

Separate content from config #79

asbjornb opened this issue Mar 19, 2022 · 3 comments
Labels
feature New feature or request

Comments

@asbjornb
Copy link
Contributor

Personally I'd love to have content separated as much as possible from code and configs.

Is your feature request related to a problem? Please describe.
The issue with the current setup is it makes syncing updates to the template into my fork more painful/less clean than it needs to be.

Describe the solution you'd like
Move notes, assets, about.md, index.md etc. into a content sub-directory. Then when merging one can disregard changes in this folder. It's not completely separable since notes.11tydata.js needs to live inside the notes folder unfortunately.

Describe alternatives you've considered
Haven't thought of any.

Additional context
I have a proposed solution made up in my own fork (commit) but looking for others to weigh in before I submit a PR. Maybe noone else is keeping their forks linked to upstream to pull updates? Maybe others have even better ways to structure their repo.

@asbjornb asbjornb added the feature New feature or request label Mar 19, 2022
@binyamin
Copy link
Owner

I can see the problem you're identifying. I agree that this is important.

Two other solutions:

Store the contents externally

With my own site, I store the wiki contents in a separate repository. During the build process, I run a script which pulls the contents, and writes them to the correct folder before running Eleventy. This setup won't work for everyone, but it does separate the content from the notes.11tydata.js file.

Make this a Plugin

Possibly - and this is just a thought - this could become a plugin instead of a template repository. I don't know if it's possible to add computedData via a plugin. This would solve problems like #71 (comment), where the website already exists and it's not feasible to rebuild it from a template.

@asbjornb
Copy link
Contributor Author

Thanks for the quick feedback.

I already do your first solution for my notes - though a simpler pure delete and copy script that works on my filesystem with my current repo-folder-setup. I don't think that excludes my proposed change - having content a bit more separated makes that process easier.

Making it a plugin sounds like a great idea, but alas I don't think I could help much with that. I don't understand much js or 11ty.

Also I think this template still has value even if a plugin is made - this template let me know that there was indeed an easy way to publish interlinked notes even if I'll end up changing a few things. And it looks good and is very plug&play.

@jebeaudoin
Copy link

I'm a newbie, but could you use GitHub submodules for separating content from config?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants