- Create a new folder in
blogs/
with the name of the blog post - Add your markdown file in the new folder and images in in the
<folder-name>/images/
folder. - Add the markdown in _toc.yml under relevant category
- Build the book as mentioned in section
- Verify the changes in the browser as mentioned in section
- Build the regular pdf as mentioned in section
- Build the latex pdf as mentioned in section
- Push the changes to the repo and get the merge request approved.
- After the merge request is approved to be merged with main, the changes will be reflected in the website after workflow is completed in github actions.
git clone https://github.com/dlt-science/science-notes.git
Navigate to the directory of the cloned repo
cd science-notes
- MacOS / Linux
python3 -m venv venv
- Windows
python -m venv venv
- iOS
. venv/bin/activate
- Windows (in Command Prompt, NOT Powershell)
venv\Scripts\activate.bat
pip install -r requirements.txt
Run the below command. Use --all
to force rebuild all
jupyter-book build --all blogs/
View the book in browser
- iOS
open blogs/_build/html/index.html
- Windows
start blogs/_build/html/index.html
Must first install the right version of urllib3
if haven't
pip install -U "urllib3<1.25"
jupyter-book build blogs/ --builder pdfhtml
This command times out, so you'll need to override the timeout manually in the
file : venv/lib/python3.11/site-packages/pyppeteer/page.py
by changing the line 134 to:
self._defaultNavigationTimeout = 3000000 # milliseconds
The generated pdf can be found here. The latex generated pdf can be found here.
jupyter-book build blogs/ --builder pdflatex
Can only be run by admins/maintainers of the repo.
ghp-import -n -p -f blogs/_build/html
- Install VSCode extension
Live Server
- Right-click
blogs/_build/html/index.html
in VSCode and selectOpen with Live Server
. - You can now see the changes in the browser everytime you rebuild the book (
jupyter-book build --all blogs/
).