Update the online NeoMutt Guide
The NeoMutt Guide and Man Pages are transformed into html using a series of scripts and hand-editing. When the new Help System is finished, we can convert all the docs to Markdown and updating will become trivial.
Repos needed:
Before starting, check the docs:
codespell docs/manual.xml
./configure --full-doc
make validate-docs
Now,
neomutt -v | head -n1
cp docs/manual.xml ../docbook
The next part takes place in the docbook
repo.
We start by processing the manual.xml
file.
<sect1 id="attach-headers-color">
<chapter id="security">
S/{sect1,sect2,sect3,sect4,sect5}/{chapter,sect1,sect2,sect3,sect4}/w
s/^ //
<chapter>
There’s now an extra <chapter>
tag at the end of the Features.
Move it before the Features, to close the previous section.s:"fmemopen":"feature/fmemopen":
../management/docs-bin/transform-links.vim
git diff
will help find them)
Some links are transformed that shouldn’t have been.
There are a few feature/
links that don’t refer to features, just config.
There are some suffixes that shouldn’t be there, e.g. -hook
, -patch
, -folder
Any remaining changes should be those expected by the changes to the docs.
./build
cp guide/* ../neomutt.github.io/guide/
cp feature/* ../neomutt.github.io/_feature/
After checking the results (in the next section), commit with full NeoMutt version string:
git commit --all --message 'NeoMutt 20180716-2125-b37a78'
git push origin main
This part takes place in the neomutt.github.io
repo.
The html still needs some more processing.
sed -i -f ../management/docs-bin/fix-links.sed guide/* _feature/*
cd _features
../../management/docs-bin/fix-feature-since.sh
jekyll build
The docs will be build into the _site
directoryjekyll serve
This will start a local webserver at http://127.0.0.1:4000/
rake
This runs html-proofer to check all the links (and it takes a while)git commit --all --message 'guide: NeoMutt 20180716-2125-b37a78'
git push origin main
This part takes place in the neomutt.github.io
repo.
Next, generate the man pages.
cd _man
_generate ../../neomutt
Now, commit the man pages:
git commit --all --message 'man: NeoMutt 20180716-2125-b37a78'
git push origin main
To demonstrate the process, I’ve committed all the steps in a recent update. You can check your results as you work.
Start in the neomutt
repo at commit b37a784d4
.
Each of the steps in the docbook
repo is a separate commit in a side-branch.
* 8e06133 merge: NeoMutt 20180716-2125-b37a78
|\
| * c5e3a97 fix some broken links
| * 897cb61 transform links
| * ea2c564 promote the features section
| * 41f1eea manual.xml, unchanged from source build
|/
*
Each of the steps in the neomutt.github.io
repo is a separate commit in a side-branch.
* c0b013f merge: NeoMutt 20180716-2125-b37a78
|\
| * 6ebc022 fix fmemopen
| * 0c65904 fix-features-since
| * 1117c51 fix links
| * ae4db49 html copied from docbook
|/
*