This sounds fantastic, Kaushal. I'm struggling to follow, so wl lask some questions inline.
Sure, my answers are below.
- the doc/ directory contains the full Hugo source directory, with config.toml, content/, layouts, etc., as well as the theme, which looks like it's statically installed
Correct.
Travis CI deals with that. You can look at the use-package Travis setup here[1]. The revelant portion for the site deployment is:
=====
before_deploy: cd doc && make doc
deploy:
provider: pages
skip_cleanup: true
github_token: $GITHUB_TOKEN
local_dir: public
on:
branch: master
condition: $EMACS_VERSION = 26
=====
(I use emacs 26 specifically to build the site as it comes with Org 9.1.4.. so then I don't need to install Org on the Travis CI machine.)
No. The latest ox-hugo version available on Melpa is used. That is done via the same Makefile.. it loads a setup file I have: setup-ox-hugo.el[2].
The same setup-ox-hugo.el has some minimal "sane settings" (Look at the "(with-eval-after-load 'org" in there for example). You can also add your personal setup to that as needed.
1. The .travis.yml file mentioned above.
2. Get your GITHUB_TOKEN (minimum permission level: public_repo) to assign to Travis[3].
In setup-ox-hugo.el, I define this simple wrapper function:
(defun org-hugo-export-all-wim-to-md ()
(org-hugo-export-wim-to-md :all-subtrees nil nil :noerror))
In the Makefile, that function is used in the "md1" rule.
And that rule is called in loop by the "md" rule:
md: $(org_files)
$(org_files):
@$(MAKE) md1 ORG_FILE=$@ TIMEZONE=UTC # Use UTC/Universal time zone for tests
So you only need to tweak the "org_files" rule which is a simple find command to collect an array of all the Org files you want to export (doesn't matter if they are file-based or subtree-based).
I hope above helps!
Netlify can be thought of just a CI machine. Your site can live in Github/Gitlab/etc. repos, but Netlify will link to those. So the site source will stay exactly where it is.. just that now Netlify will be receptive to the git commit actions on your repo and auto-deploy the site with each commit. For example: The ox-hugo doc site source is on GitHub, but it is published using Netlify (
https://ox-hugo.scripter.co).
Another thing: GitHub Pages does not support https on custom domains.. Netlify does.
You are welcome.
And finally, let's move all non-Org discussion off the Org mailing list.