bkleinen.github.io
This is the repository behind my web page:
Production HTW: https://home.htw-berlin.de/~kleinen/
Production Github Pages: https://bkleinen.github.io/
If you find information here - or on the staging server - that is not (yet) linked from your course's page - especially lab exercises - be aware that I haven't released them yet for the current term, so they might and probably will change at least a bit.
Apart from that, feel free to browse and also send me a pull request if you encounter an error.
Now on Hugo
Prerequisites:
- git
- Hugo
- optional: make if using
Checkout
git clone git@github.com:bkleinen/bkleinen.github.io.git
cd bkleinen.github.io
Start with make
make hugo
Start without make
cd hugo ; npm install ; cd ..
hugo --buildDrafts --source hugo -p 4242 server
start options
See the [makefile](makefile) and the hugo doc for other startup options.
Deployment
Automatic deployment via github actions, see https://github.com/bkleinen/bkleinen.github.io/actions
Overview
branch/tag | config | env | drafts | target url | Status | GH Pages Deployment |
---|---|---|---|---|---|---|
main | staging | staging | no | https://bkleinen.github.io/staging/ | ||
main | stagingdrafts | staging | yes | https://bkleinen.github.io/stagingdrafts/ | ||
v0.0 | production | production | no | http://bkleinen.github.io/ | ||
v0.0 | htw | production | no | https://home.htw-berlin.de/~kleinen/ | ||
v0.0 | progwebtec | production | no | http://progwebtec.github.io/ | ||
Deploy via Makefile
make c m="commit message"
make deploy
(assuming access rights)
See makefile for other useful targets.
Deploy w/o Makefile
There have been some reports that make on Windows complains about the format of the makefile. In such cases, a deployment can also be triggered manually:
git pull origin main
git push origin main
git tag (search the latest tag in the output and increment, e.g. if the latest tag is v1.94, use v1.95 in the subsequent steps)
git tag <incremented tag> (e.g. git tag v1.95)
git push origin <incremented tag> (e.g. git push origin v1.95)
Link Checker
Hugo Internal Broken Link Checker · Actions · GitHub Marketplace: https://github.com/marketplace/actions/hugo-internal-broken-link-checker?version=v1.1.0 marojor/hugo-broken-link-checker: GitHub Action to check from broken links in an Hugo site: https://github.com/marojor/hugo-broken-link-checker
Markdown
Hugo uses Goldmark markdown.
Notes on Hugo Setup
The Makefile serves both as shortcuts and documentation for hugo build configurations.
This sites uses an own theme contained in this repository.
In development/debug mode debug.html shows many variables/values useful for debugging.
Classes section logic
subtypes within classes section
Path | classes_type |
---|---|
/classes | all_classes |
/classes/ss2023/ | semester |
/classes/ss2023/info1 | class |
/classes/ss2023/info1/... | class_subpage |
{{
"class_subpage" "/classes/[^/]/[^/]/.+"
"semester" "/classes/[^/]/$"
"class" "/classes/[^/]/[^/]*/$")
}}
All Class Sections have their own subnavigation, defined in hugo/themes/greenpage/layouts/partials/classes/coursenav.html
Courses page title
- html title
- header on top of page
- page title below course navigation
Courses Subnavigation
The Classes Subnavigation consists of an internal part (subpages) and external part (e.g. links to LSF, github, moodle). it can be configured in the section _index.md
Book Topology
tbd
Useful Shortcuts
{{<alert info>}}
{{</alert>}}
Aliases
see Makefile and data/aliases.yml
make aliases_update
make aliases_list
Bibliography
empty bib entry
type = "video" key = author = title = duration = url = accessed = series = series_url = year = about =
about_url =
notes = ''' ''' media_type = "Video" media_provider = "YouTube" tags = []
<script src="node_modules/axe-core/axe.min.js"></script>