File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change 11# Netlify configuration for PR previews - this is NOT for the live site! That uses GH actions
22[build ]
3- publish = " docs/_build/html"
4- environment = { PYTHON_VERSION = " 3.12" }
3+ # Netlify previews are served from ./publish with the site nested in /blog.
4+ # This keeps BASE_URL=/blog working since we intend to proxiy the blog at jupyterbook.org/blog.
5+ publish = " publish"
6+ environment = { PYTHON_VERSION = " 3.12" , BASE_URL = " /blog" }
57 command = """
68 pip install pyyaml && \
79 python src/download_nav_items.py && \
810 npm install -g mystmd@latest && \
9- cd docs && myst build --html -d
11+ cd docs && \
12+ myst build --html -d && \
13+ mkdir -p ../publish/blog && \
14+ mv _build/html/* ../publish/blog/ && \
15+ if [ "$CONTEXT" = "deploy-preview" ]; then \
16+ printf "/ /blog/ 302\n " > ../publish/_redirects; \
17+ fi
1018 """
1119
1220# Keep all deploy contexts out of search indexing because we use github actions for the live site
You can’t perform that action at this time.
0 commit comments