Practical sites:
I followed the steps of this site: https://streakycobra.github.io/posts/blogging-in-org-mode-with-nikola/
Other useful sites
- https://jiaweizhuang.github.io/blog/nikola-guide/
- https://www.frankliu.org/posts/setting-up-nikola-org-mode/
https://gist.github.com/redguardtoo
First install nikola
pip install nikola
pip install aiohttp # for nikola auto to work
pip install watchdog # for nikola auto to work
pip install ghp-import2 # for deploying to github
Then install the org mode plugin
nikola plugin -i orgmode
Check the file making-an-exercise-and-solution-environment.org
in posts/
to see how to update init.el
Add the macros in preamble.org
to plugins/orgmode/macros.org
. I need the macros in preamble.org
to export to latex, and in macros.org
for the export to html.
pygmentize -S default -a .highlight -f html >> files/assets/css/custom.css
Download tufte.css
.
Pas aan in tufte.css
zodat je minder marge links krijgt, en meer ruimte rechts ivm 60% ipv 87.5%. En het font wordt sans
wat ik veel beter te lezen vind dat de et-books oid die er standaard in staan.
body { width: 60%; margin-left: 1em; margin-right: 1em; padding-left: 1.5%; font-family: sans; background-color: #fffff8; color: #111; max-width: 1400px; counter-reset: sidenote-counter; }
emacs --batch -l /home/nicky/Dropbox/homepage/plugins/orgmode/init.el --eval '(nikola-html-export "/home/nicky/Dropbox/homepage/posts/solving-a-number-game-with-a-mip-solver.org" "/home/nicky/Dropbox/homepage/cache/posts/solving-a-number-game-with-a-mip-solver.html")'
Make an empty repo, no readme
or -.gitignore=
git clone https://github.com/ndvanforeest/ndvanforeest.github.io.git ~/homepage
cd homepage
git co -b src
nikola init my_site
Fill in the questions. My homepage is this: https://ndvanforeest.github.io/
mv my_site/* .
rm -rf my_site/
git add README.org
nikola new_post -f orgmode -t "Solving a number game with a MIP solver"
It seems that when updating files that are symlinks, that nikola
does not quite get the updates.
nikola serve
nikola auto
nikola new_page -f orgmode -t "bio"
Stay in the src
branch! Don’t commmit. The following handles all.
cd /home/nicky/Dropbox/homepage/
nikola github_deploy
Clean up:
cd /home/nicky/Dropbox/homepage/
nikola check --clean-files