Comments (3)
I've written a Netlify Build plugin (98a812b) to generate a _config_override.yml
file, but issue 1 and 4 above still remain for some reason. I'll see if I can reproduce them locally by setting JEKYLL_ENV=production
on my laptop's build.
from jkan.
Okay, I've dug in a lot deeper to the github-metadata
gem, and I think I understand what's behind the two main issues:
- It's setting
site.github.source.branch
to the default branch of the upstream repository, not the fork. This probably isn't an issue in practice, but could be (whether for debugging, or if an admin wants to change the default branch of their repo, since they're not actually using github pages) - It's setting
baseurl
according to the fact that the repository is a "user repository" rather than an "org repository". The plugin's designed to get the site working on github pages, and not for compatibility elsewhere. I've solved this one by explicitly declaringbaseurl: ""
in_config_override.yml
Very nearly there!
from jkan.
All right, I've reported the branch issue on the github-metadata repo, and implemented a workaround: the Netlify Build Plugin now saves the name of the branch being deployed to site.branch
. When we configure the Editor UI in /editor/index.html
, it now says branch: {{ site.branch | default: site.github.source.branch }}
, using the value from the config if it's available, and defaulting back to whatever's generated by the github-metadata gem.
So, just to recap, we've essentially made the github-metadata gem "get out of the way" when deploying to Netlify. We do this by generating a supplemental _config.ci.yml
file during the build process — but only in a Netlify build (via a Netlify build plugin). Jekyll loads this _config.ci.yml
first, then loads the normal _config.yml
, so an admin can override anything that's generated, if they prefer.
I think once we switch the GitHub Pages approach to using Actions, we should explore moving away from the github-metadata gem (because we can have the Action generate a _config.ci.yml
file as well).
from jkan.
Related Issues (20)
- Simplify JS compliation
- Update docs & website to reflect Netlify as recommended hosting provider HOT 2
- Document how to self-host Editor UI HOT 1
- Move categories into a collection HOT 1
- Netlify CMS still supported? HOT 4
- Consider replacing search with Lunr
- Add a Deploy to Netlify button
- Netlify should automatically use the correct build command HOT 1
- Validate data.json
- Netlify CMS shows empty category when category is a string
- Update docs for v2, and move them to version control
- Check browser support
- Consider publishing an upgrade plugin
- Update jkan.io for v2 HOT 1
- After v2 release, delete the wiki
- Improve the default styles HOT 11
- When should we markdownify things? HOT 2
- strict_front_matter: true important for GitHub flow
- does JKAN server host the data or is it just a list of links for data hosted somewhere else? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jkan.