From 089aefa5a92567907e262e0781ca5c0ace5e43e6 Mon Sep 17 00:00:00 2001 From: Andrei Jiroh Halili Date: Sat, 18 Feb 2023 17:50:05 +0000 Subject: [PATCH] chore(global): update redirects and config again (including build.yml one) Signed-off-by: Andrei Jiroh Halili --- .build.yml | 18 ++++++++++++++++++ .gitignore | 1 + build.sh | 6 ++---- markdown/_redirects | 16 ++++++++++++++++ mkdocs.yml | 17 +++++++---------- requirements.txt | 2 +- 6 files changed, 45 insertions(+), 15 deletions(-) diff --git a/.build.yml b/.build.yml index bb05beb..8795fb8 100644 --- a/.build.yml +++ b/.build.yml @@ -3,6 +3,8 @@ packages: - openssh-client - python3 - py3-pip + - py3-wheel + - py3-setuptools sources: - https://git.sr.ht/~ajhalili2006/tildeweb secrets: @@ -13,11 +15,26 @@ triggers: to: ~ajhalili2006/public-inbox@lists.sr.ht cc: ajhalili2006@gmail.com tasks: + # in case of triggered from hottub + - repo-sync: | + cd tildeweb + env + + git remote add hub https://github.com/ajhalili2006/tildeverse-web && git pull hub main + git remote add lab https://mau.dev/ajhalili2006/tildeverse-web && git pull lab main + + if [ "$BUILD_REASON" != "patchset" ] && [ "$BUILD_SUBMITTER" != "hub.sr.ht" ]; then + git remote set-url origin ssh://git@git.sr.ht/~ajhalili2006/tildeweb + fi - build: | 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 - deploy: | + if [ "$BUILD_REASON" != "patchset" ] && [ "$BUILD_SUBMITTER" != "hub.sr.ht" ]; then + complete-build + fi + cd tildeweb echo "StrictHostKeyChecking=no" >> ~/.ssh/config eval $(ssh-agent) && ssh-add ~/.ssh/passwordless-auth-sshfs @@ -25,3 +42,4 @@ tasks: rsync -rP public_ctrl-c ajhalili2006@ctrl-c.club:/home/ajhalili2006/public_html/ #rsync -rP gmi ajhalili2006@vern.cc:/home/ajhalili2006/public_gemini/ #rsync -rP gmi ajhalili2006@ctrl-c.club:/home/ajhalili2006/public_gemini/ + git push origin -o skip-ci diff --git a/.gitignore b/.gitignore index 09645d5..ef50372 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ public +public_html public_ctrl-c site venv diff --git a/build.sh b/build.sh index 234aa0f..7ac8ac3 100755 --- a/build.sh +++ b/build.sh @@ -2,11 +2,9 @@ set -xe TARGET_DIR=${TARGET_DIR:-"$HOME/public_html"} +FF_OFFLINE_MKDOCS_PLUGIN=${FF_OFFLINE_MKDOCS_PLUGIN:-"false"} -if ! command -v mkdocs > /dev/null; then - pip3 install -r requirements.txt --user -fi - +pip3 install -r requirements.txt --user mkdocs build -d $TARGET_DIR set +xe diff --git a/markdown/_redirects b/markdown/_redirects index 1d85d44..d3ebd6b 100644 --- a/markdown/_redirects +++ b/markdown/_redirects @@ -1,4 +1,20 @@ +# internal redirects /resume /user-manual/resume /portfolio /user-maula/resume + +# external redirects /blog https://ajhalili2006.substack.com /pkgs https://gcdn.todo.com + +# user manual +/user-manual/communications https://coda.io/@ajhalili2006/readme/communications-10 +/user-manual/boundaries https://coda.io/@ajhalili2006/readme/personal-and-professional-boundaries-9 +/user-manual/flaws-and-quirks https://coda.io/@ajhalili2006/readme/flaws-and-quirks-11 +/user-manual/job-employment-availability https://coda.io/@ajhalili2006/readme/job-employment-availability-12 +/user-manual/roleplaying-hellspace https://coda.io/@ajhalili2006/readme/roleplaying-hellscape-13 +/user-manual/rp https://coda.io/@ajhalili2006/readme/roleplaying-hellscape-13 + +# legal +/legal/privacy/coda https://coda.io/@ajhalili2006/readme/privacy-policy-for-coda-hosted-pages-4 +/coc https://coda.io/@ajhalili2006/readme/community-code-of-conduct-7 +/code-of/conduct https://coda.io/@ajhalili2006/readme/community-code-of-conduct-7 diff --git a/mkdocs.yml b/mkdocs.yml index a9fa363..702fe84 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -64,7 +64,13 @@ theme: # plugins plugins: - search - - info + # debugging/bug reporting purposes only, proceed with caution + #- info + - git-revision-date-localized: + enabled: !ENV [CI, false] + fallback_to_build_date: true + enable_creation_date: true + # TODO: Get Insiders for contributors and authors # makrdown extensions markdown_extensions: @@ -81,13 +87,6 @@ markdown_extensions: - pymdownx.emoji: emoji_index: !!python/name:materialx.emoji.twemoji emoji_generator: !!python/name:materialx.emoji.to_svg - - git-revision-date-localized: - enabled: !ENV [CI, false] - fallback_to_build_date: true - enable_creation_date: true - - offline: - enabled: !ENV [FF_OFFLINE_MKDOCS_PLUGIN, false] - # TODO: Get Insiders for contributors and authors # extras extra: @@ -117,5 +116,3 @@ extra: - icon: fontawesome/brands/linkedin link: https://linkedin.com/in/ajhalili2006 name: ~ajhalili2006 on linkedin for employers - - diff --git a/requirements.txt b/requirements.txt index d337ca7..8fdf8ba 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ mkdocs-material -#mkdocs-git-revision-date-localized-plugin +mkdocs-git-revision-date-localized-plugin