The tcsh website is served by GitHub Pages from the docs subdirectory of the master branch. Content is managed using the Hugo open-source static site generator.
The general workflow is as follows:
- Use
git cloneto get a copy of the repository. - Use
git submodule init && git submodule updateto get the theme. - Use
hugo server -Dto start a local web server. - Use
vi content/post/announce-6.21.00.mdto edit a file.
Your browser will show the updated content as soon as you save the file. Keep editing until you are happy with the results.
Commit your changes:
- Commit source changes:
- Use
git diffto review source changes. - Use
git statusto review new, changed, and removed files. - Use
git addto select files to be committed. - Run
git committo commit the changes.
- Use
- Run
hugoto regenerate the files in the docs directory. - Commit regenerated files:
- Use
git diffto review changes from regenerating the site. - Use
git statusto review new, changed, and removed files. - Use
git addto select the regenerated files to be committed. - Run
git committo commit the regenerated files.
- Use
- Merge the two commits and push to GitHub:
- Run
git rebase -i HEAD~2and usefixupto merge the commits. - Run
git pushto push your changes to GitHub.
- Run
The source files must be committed before regenerating the site, because the last-modified timestamp for a source file is derived from its commit timestamp.
Finally create a pull request to get your changes published.
Hugo references:
XMin theme:
Create a new file from a template and edit it.
hugo new post/announce-6.24.00
vi content/post/announce-6.24.00.md
If you are removing content or making other changes that result in generated content being removed, you must make sure old content is gone. The easiest way is to simply regenerate everything.
rm -rf docs && hugo
MacPorts:
sudo port install hugo
Debian/Ubuntu:
apt install hugo
NetBSD/SmartOS/others (pkgsrc):
pkgin install hugo
Or follow the detailed installation instructions from the Hugo documentation.