Starting a blog this days couldn’t be easier. Ten simple steps to get started.
-
Check it out locally, e.g. to
~/blog
. Every file you put in the repo will be published automatically:By default, Jekyll doesn’t build files or folders that:
- are located in a folder called
/node_modules
or/vendor
- start with
_
,.
, or#
- end with
~
- are excluded by the exclude setting in your configuration file
- are located in a folder called
-
Configure custom domain or just use the default
<repo>.github.io
. -
Create
~/blog/_hugo/config.toml
baseURL = "http://sarg.org.ru/" languageCode = "en-us" title = "Random forest" theme = "anubis" # see the next step publishDir = "../" # github pages look in the root folder by default
-
Checkout some theme.
git submodule add \ https://github.com/Mitrichius/hugo-theme-anubis.git \ _hugo/themes/anubis
-
Add
_hugo/content
to.gitignore
.This directory will be generated by
ox-hugo
, no need to store it in git. -
Create
org-mode
file where all the content would be placed.Use the instruction from
ox-hugo
documentation. But make sure that#+HUGO_BASE_DIR
points to_hugo
directory. You can put the file whenever you want, not strictly necessary in the repository. -
Export the file with
ox-hugo
.Press
C-c C-e H A
to export everything. Now_hugo/content
should be populated. You might want to enable auto export on saving. -
Check that your blog works locally.
Go to
_hugo/
and runhugo server -D
. Hugo should start on http://localhost:1313 -
Generate html for github pages.
Run
hugo
and it’ll create all the files inpublishDir
. -
Commit and push all the changes. You’re done! 🎉