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

Symlink ./glossary.yml to ./_data/glossary.yml to avoid duplication #17

Closed
gvwilson opened this issue Jul 21, 2020 · 4 comments
Closed
Labels
help wanted Extra attention is needed question Further information is requested

Comments

@gvwilson
Copy link
Contributor

This repo currently stores two versions of the glossary: one in ./glossary.yml (for editing) and one in ./_data/glossary.yml (because Jekyll only reads data files from _data, and we need that for rendering the online GitHub Pages version of the glossary).

  1. Should we replace the duplicate in ./_data/glossary.yml with a symlink to ../glossary.yml?
  2. Will this be OK on Windows? (Or does this not matter?)
  3. Should we rename the file glosario.yml for consistency's sake?
  4. What impact will this have on the build?
@gvwilson gvwilson added help wanted Extra attention is needed question Further information is requested labels Jul 21, 2020
@zkamvar
Copy link
Contributor

zkamvar commented Jul 21, 2020

  1. I might be missing something, but I don't see a ./_data/ directory. IME, it's perfectly fine to have a symlink (I used to do this for my NEWS.md to get it to build on GH pages and CRAN).
  2. Are we expecting people to practice pull/push with their contributions to this or would they be expected to initially contribute via the github interface? if majority latter, then I think it doesn't matter
  3. Yes
  4. I think the impact will be whatever Jekyll thinks about symlinks.

@gvwilson
Copy link
Contributor Author

It looks like .gitignore is ignoring _data/glossary.yml, so is it being created during an automated build step? If so, how do I trigger that build step locally to make sure that file is up to date when previewing the site locally? cc @ian-flores

@fmichonneau
Copy link
Contributor

it doesn't look like there is an automated building happening yet but that should work nicely.

  • on GitHub: development takes place in the main branch, changes trigger the CI/CD that calls make site the content of the _site folder gets pushed to an orphan gh-pages branch that takes care of the website rendering.
  • locally: you can run make serve.

Both make site and make serve create copy the yml file from the root to the _data folder before the actual build.

I could look into setting this up tomorrow if needed.

@gvwilson
Copy link
Contributor Author

👍 I'll close this one and rely on the Makefile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants