My personal website
| _includes | ||
| _layouts | ||
| _posts | ||
| _sass | ||
| bin | ||
| css | ||
| evol-osm-escosse-2024 | ||
| fonts | ||
| images | ||
| js | ||
| .gitignore | ||
| .gitlab-ci.yml | ||
| .mailmap | ||
| _config.yml | ||
| ai.md | ||
| apropos.md | ||
| atom.xml | ||
| blog.html | ||
| conferences.md | ||
| cv_sebastien_dinot.html | ||
| Gemfile | ||
| index.html | ||
| LICENSE | ||
| livres.md | ||
| mentions-legales.md | ||
| presentation-informelle.md | ||
| README.md | ||
| ressources.html | ||
| robots.txt | ||
| rss.xml | ||
Build of my personal website
Here is some notes about the build of my personal website.
Deployment
The changesets are deployed on two different virtual hosts, depending on the branch:
mainbranch (production): https://www.palabritudes.net- other branches (test): https://test.palabritudes.net
.gitlab-ci.yml tricks
The content of the SSH_KNOWN_HOSTS variable was provided by the
ssh-keyscan command:
$ ssh-keyscan -H wombat.palabritudes.net > /tmp/SSH_KNOWN_HOSTS
In the following instruction:
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
According to Gitlab CI documentattion, the tr command is used to fix line
endings which makes ed25519 keys work without extra base64 encoding:
https://gitlab.com/gitlab-examples/ssh-private-key/issues/1#note_48526556
Local build and test
$ export JEKYLL_UID=$(id -u)
$ export JEKYLL_GID=$(id -g)
$ export JEKYLL_VERSION=4.2.2
$ export JEKYLL_ENV=development
$ docker run --rm -it \
-e JEKYLL_UID -e JEKYLL_GID -e JEKYLL_ENV \
--volume "$PWD:/srv/jekyll:Z" \
--publish 127.0.0.1:4000:4000 \
jekyll/builder:$JEKYLL_VERSION jekyll serve
Tips and tricks
Block indexing of some pages
<head>
{% assign urlroot = page.url | split: '/' | slice: 1 %}
{%- if jekyll.environment != "production" or urlroot.first == "tag" or urlroot.first == "archives" -%}
<!-- Only the production site needs to be indexed by search engines -->
<!-- In addition, there's no need to index tag or archive pages. -->
<meta name="robots" content="noindex"/>
{%- endif %}
</head>