Skip to content

ndvanforeest/ndvanforeest.github.io

Repository files navigation

This is my file

Practical sites:

I followed the steps of this site: https://streakycobra.github.io/posts/blogging-in-org-mode-with-nikola/

Other useful sites

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

Set up org mode plugin

Update init.el

Check the file making-an-exercise-and-solution-environment.org in posts/ to see how to update init.el

Update the macros

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.

Code styling

pygmentize -S default -a .highlight -f html >> files/assets/css/custom.css

Tufte style

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; }

compiling

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 a github io repo

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

Making new posts

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.

Test locally

nikola serve
nikola auto

Making new pages

nikola new_page -f orgmode -t "bio"

Upload to github

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published