chore(global): 👷 improve 404 page and Gitpod config, plus some VSC ws config changes

Also in this commit, we also apply changes needed for
the use of social cards in the theme we do use.

Signed-off-by: Andrei Jiroh Halili <ajhalili2006@gmail.com>
This commit is contained in:
Andrei Jiroh Halili 2023-03-24 17:36:48 +00:00
parent e4d61e9f51
commit d9b6b87724
6 changed files with 52 additions and 9 deletions

View file

@ -1,12 +1,19 @@
image: alpine/edge
environment:
FF_ENABLE_COMMIT_DATA: "true"
FF_GENERATE_SOCIAL_CARDS: "true"
packages:
- openssh-client
- python3
- py3-pip
- py3-wheel
- py3-setuptools
- cairo-dev
- freetype-dev
- libffi-dev
- jpeg-dev
- libpng-dev
- zlib-dev
sources:
- https://git.sr.ht/~ajhalili2006/tildeweb
secrets:
@ -32,12 +39,10 @@ tasks:
cd tildeweb && pip3 install -r requirements.txt --user
export PATH="$PATH:$HOME/.local/bin"
mkdocs build -d public -f mkdocs.yml \
&& mkdocs build -d public_ctrl-c -f mkdocs.ctrl-c.yml \
&& mkdocs build -d public_pages.dev -f mkdocs.pages.dev.yml
mkdocs build -d public -f mkdocs.yml
- generate-archive: |
cd tildeweb
tar cvzf tildeweb-prod-build.tar.gz public public_ctrl-c public_pages.dev
tar cvzf tildeweb-prod-build.tar.gz public
- deploy: |
if [ "$BUILD_REASON" == "patchset" ] && [ "$BUILD_SUBMITTER" == "hub.sr.ht" ]; then
complete-build
@ -51,7 +56,7 @@ tasks:
echo "StrictHostKeyChecking=no" >> ~/.ssh/config
eval $(ssh-agent) && ssh-add ~/.ssh/passwordless-auth-sshfs
rsync -rP public ajhalili2006@vern.cc:/home/ajhalili2006/public_html/ || true
rsync -rP public_ctrl-c ajhalili2006@ctrl-c.club:/home/ajhalili2006/public_html/ || true
rsync -rP public ajhalili2006@ctrl-c.club:/home/ajhalili2006/public_html/ || true
#rsync -rP gmi ajhalili2006@vern.cc:/home/ajhalili2006/public_gemini/
#rsync -rP gmi ajhalili2006@ctrl-c.club:/home/ajhalili2006/public_gemini/

1
.gitignore vendored
View file

@ -4,3 +4,4 @@ public_ctrl-c
site
venv
.venv
.cache

13
.gitpod.Dockerfile vendored Normal file
View file

@ -0,0 +1,13 @@
FROM gitpod/workspace-full
# https://squidfunk.github.io/mkdocs-material/setup/setting-up-social-cards/#linux
RUN sudo install-packages \
libcairo2-dev \
libfreetype6-dev \
libffi-dev \
libjpeg-dev \
libpng-dev \
libz-dev
# brew maintenance + install ShellCheck and Hadolint
RUN brew update && brew install hadolint shellcheck

View file

@ -4,12 +4,22 @@
# Learn more from ready-to-use templates: https://www.gitpod.io/docs/introduction/getting-started/quickstart
checkoutLocation: tildeweb-ajhalili2006
image:
file: .gitpod.Dockerfile
tasks:
- init: |
python3 -m venv .venv
source .venv/bin/activate
pip3 install -r requirements.txt
command: mkdocs serve
command: |
# since it might not be carried on venv shell, we did this instead
FF_ENABLE_COMMIT_DATA=true mkdocs serve
name: site-localdev
env:
FF_ENABLE_COMMIT_DATA: "true" # Required to use git-revision-date-localized, like in prod.
ports:
- port: 8000

15
.vscode/settings.json vendored
View file

@ -4,5 +4,18 @@
},
"marquee.widgets.npm-stats.packageNames": [
"@ajhalili2006/tildeverse-web"
]
],
"conventionalCommits.scopes": [
"mkdocs.yml",
"gitlab-ci",
"builds.sr.ht",
"docker",
"markdown",
"readme",
"meta",
"global"
],
"conventionalCommits.autoCommit": false,
"conventionalCommits.promptCI": true,
"git.alwaysSignOff": true
}

View file

@ -5,7 +5,8 @@
{% extends "main.html" %}
{% block content %}
<h1>404 - Not found</h1>
<p>Either the URL has been moved without redirects, taken down for any reasons, or it doesn't exist (yet).</p>
<h2>Troubleshooting tips</h2>
<p>Try checking the URL for any misspellings or improper use of dashes, underscores and periods.</p>
<p>If you're developing this site and you hit an URL that's</p>
<p>If you're working in this site and you hit an URL configured for redirects (at Cloudflare Pages or similiar), try <a href="https://go.recaptime.eu.org/pkgs/pip3/mkdocs-redirects">configuring redirects in the config first</a>.</p>
{% endblock %}