问题
The documentation for standard F# (following ProjectScaffold) has the following structure
- project
| - docs
| | content
| | files
| | output
| | tools
The generated docs are saved into output, which are then pushed to the gh-pages branch.
Recently, GitHub has changed the way serving pages work and now you can just serve the docs folder directly from the master branch. The problem is that the actual folder I wish to serve is docs/output.
Jekyll has a source configuration that allow me to do this locally. My docs/_config.yml is just:
source: output
Which works fine if I run jekyll serve in the docs folder locally. But after pushing to GitHub, the pages are still served under /output prefix.
So apparently GitHub is overriding the source option. Is there anyway this can be worked out?
回答1:
Is Jekyll's documentation unclear. Yes.
New github pages publication branch/folder :
Available options are (doc) :
- gh-pages branch
- master branch
- master branch /docs folder
- Disable GitHub Pages.
Three first options defines your root publication folder.
Github pages uses this root folder to generate your site. You cannot override source key in your _config.yml.
Your can store your sources in a _docs folder and output in docs
- project
| - _docs
| | content
| | files
| | tools
|
| - docs << output here
来源:https://stackoverflow.com/questions/41183724/github-pages-serving-from-docs-and-jekyll-source-folder-config