diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..be56b70 --- /dev/null +++ b/.env.example @@ -0,0 +1,15 @@ +# wrangler specifics, DO NOT LEAK SHIT! +# see https://developers.cloudflare.com/workers/wrangler/system-environment-variables/ for details +# After selecting your CF account, copy the account ID after dash.cloudflare.com/ into the +# variable below. +CLOUDFLARE_ACCOUNT_ID=cf0bd808c6a294fd8c4d8f6d2cdeca05 +# DO NOT PASTE IT IN .env.example file! +CLOUDFLARE_API_TOKEN= +# CLI options stuff +WRANGLER_SEND_METRICS=true +WRANGLER_LOG=log + +# build configurations as feature flags +FF_ENABLE_COMMIT_DATA=true +# applies at build time, make sure required deps for +FF_GENERATE_SOCIAL_CARDS=false \ No newline at end of file diff --git a/.github/workflows/deploybot.yml b/.github/workflows/deploybot.yml new file mode 100644 index 0000000..d97ba95 --- /dev/null +++ b/.github/workflows/deploybot.yml @@ -0,0 +1,65 @@ +# Simple workflow for deploying static content to GitHub Pages +name: Deploy website CI + +on: + # Runs on pushes targeting the default branch + push: + branches: ["main"] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + gh-pages: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Setup Python + uses: actions/setup-python@v4.6.0 + with: + python-version: 3.10 + cache: pip + - name: Install dependencies + uses: brettcannon/pip-secure-install@v1.0.0 + - name: Setup Pages + uses: actions/configure-pages@v3 + - name: Build + run: | + sudo apt-get install \ + libcairo2-dev libfreetype6-dev libffi-dev libjpeg-dev libpng-dev libz-dev \ + --yes + FF_ENABLE_COMMIT_DATA=true FF_GENERATE_SOCIAL_CARDS=true mkdocs build --use-directory-urls + - name: Upload artifact + uses: actions/upload-pages-artifact@v1 + with: + path: './public' + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v2 + repo-sync: + runs-on: ubuntu-latest + steps: + - name: Checkout repository with full history + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Setup Git user details + run: | + git config --global user.name "Recap Time Bot" + git config --global user.email "service-accounts+git@recaptime.eu.org" diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 98c80a3..f095947 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -22,6 +22,33 @@ stages: - lint - deploy +build:mr: + extends: [ .setupkit ] + stage: build + script: + - bash ./bin/build.sh + artifacts: + paths: + - public + untracked: false + when: on_success + expire_in: "21 days" + cache: + paths: + - .cache + - .venv + key: pages-build-main + rules: + - if: $CI_COMMIT_BRANCH != 'main' && $CI_PIPELINE_SOURCE == "merge_request" + changes: + - mkdocs.yml + - markdown/* + - markdown/**/* + - .gitlab-ci.yml + - docker/Dockerfile + - package*.json + - .trigger-deploy + build:main: extends: [ .setupkit ] stage: build diff --git a/.gitpod.Dockerfile b/.gitpod.Dockerfile index 8cf2ce8..28cbef5 100644 --- a/.gitpod.Dockerfile +++ b/.gitpod.Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 FROM gitpod/workspace-full # https://squidfunk.github.io/mkdocs-material/setup/setting-up-social-cards/#linux @@ -9,5 +10,8 @@ RUN sudo install-packages \ libpng-dev \ libz-dev +# https://docs.docker.com/build/install-buildx/ +COPY --from=docker/buildx-bin:latest /buildx /usr/libexec/docker/cli-plugins/docker-buildx + # brew maintenance + install ShellCheck and Hadolint RUN brew update && brew install hadolint shellcheck \ No newline at end of file diff --git a/.gitpod.yml b/.gitpod.yml index ef55ace..0d6fd47 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -15,6 +15,8 @@ tasks: source .venv/bin/activate pip3 install -r requirements.txt command: | + source .venv/bin/activate + # since it might not be carried on venv shell, we did this instead FF_ENABLE_COMMIT_DATA=true mkdocs serve name: site-localdev diff --git a/.vscode/settings.json b/.vscode/settings.json index 0b64f86..85b70ba 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -15,9 +15,11 @@ "meta", "global", "deps-dev", - "docker" + "docker", + "scripts" ], "conventionalCommits.autoCommit": false, "conventionalCommits.promptCI": true, - "git.alwaysSignOff": true + "git.alwaysSignOff": true, + "gitlens.remotes": [{ "domain": "mau.dev", "type": "GitLab" }] } \ No newline at end of file diff --git a/.wakatime-project b/.wakatime-project new file mode 100644 index 0000000..18d023c --- /dev/null +++ b/.wakatime-project @@ -0,0 +1 @@ +tildeweb-ajhalili2006 diff --git a/README.md b/README.md index d79deb1..69bc92b 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,23 @@ # ~ajhalili2006's website -This is my sources for both [`andreijiroh.dev`](https://andreijiroh.eu.org) and tilde userpages in Ctrl-C Club and ~vern, built with Mkdocs + Material theme by ~squidfunk. (Sources for Gemini version of the website is available at `gmi` directory.) +[![Hosted on pages.dev](https://img.shields.io/badge/hosted%20on-pages.dev-orange?style=for-the-badge&logo=cloudflare)](https://pages.dev) +[![GitLab last commit](https://img.shields.io/gitlab/last-commit/ajhalili2006/tildeverse-web?gitlab_url=https%3A%2F%2Fmau.dev&style=for-the-badge)](https://mau.dev/ajhalili2006/tildeverse-web/commits) -Site content (exluding external content) is licensed -under CC BY-SA 4.0. +This is my sources for both [`andreijiroh.(eu.org|dev)`](https://andreijiroh.eu.org) and tilde userpages in Ctrl-C Club and ~vern, +built with Mkdocs + [Material theme](https://go.andreijiroh.eu.org/mkdocs-material) by [~squidfunk](https://go.andreijiroh.eu.org/squidfunk). +(Sources for Gemini version of the website is available at `gmi` directory.) ## Development ```bash # clone the repo # pick one on the clone URLs -git clone https://mau.dev/ajhalili2006/tildeverse-web -git clone git@git.sr.ht:~ajhalili2006/tildeverse-web +glab repo clone https://mau.dev/ajhalili2006/tildeverse-web +gh repo clone ajhalili2006/tildeverse-web +git clone git@git.sr.ht:~ajhalili2006/tildeweb # maybe do this on a feature branch -git switch -c username/my-suggestion-here +git switch -c your-git-username/your-suggestion-here # install deps via venv python3 -m venv venv @@ -28,15 +31,16 @@ nano markdown/path-to-file.md # done? git stage . && git commit --signoff -# send patches via GitLab through the CLI -glab -R https://mau.dev/ajhalili2006/tildeverse-web mr create --allow-collaboration -b main +# send patches via GitLab or GitHub through the CLI +glab -R https://mau.dev/ajhalili2006/tildeverse-web mr create --allow-collaboration -b main +gh -R ajhalili2006/tildeverse-web pr create # might automatically closes PR due to mirror status # or via my public inbox on sourcehut # see https://git-send-email.io for setup and guide git config sendemail.to "~ajhalili2006/public-inbox@lists.sr.ht" -git config format.subjectPrefix "PATCH tildeweb" +git config format.subjectPrefix "PATCH tildeweb" # identification in archives + builds.sr.ht git config --global sendemail.annotate yes -git config --global format.signOff true +git config --global format.signOff true # needed for compliance with Linux DCO git send-email HEAD^ ``` @@ -46,3 +50,9 @@ Patches are always welcome, although you must sign-off your commits to comply wi Please be reminded that while this is a personal open-source project, please expect long waiting times during pathc reviews and don't be disappointed when I disagree on stuff and chose not to merge the patches for any reasons, including mental health breaks. + +## License + +Unless otherwise noted, + +The only thing that's not covered by this is [the favicon version](markdown/assets/images/favicon.png) of my profile picture. diff --git a/bin/deploykit-pages.sh b/bin/deploykit-pages.sh index ecf0d69..5d7f64a 100755 --- a/bin/deploykit-pages.sh +++ b/bin/deploykit-pages.sh @@ -1,12 +1,13 @@ #!/usr/bin/env bash -set -e +set -ea if [[ $DEBUG != "" ]]; then set -x fi ## source vars from .env first ## _root_directory_git=$(git rev-parse --show-toplevel) -export "$(xargs < "$_root_directory_git/.env")" +# shellcheck file=/dev/null +source "$_root_directory_git/.env" _branch_name_git=$(git rev-parse --abbrev-ref HEAD) _commit_sha=$(git rev-parse HEAD) @@ -49,4 +50,5 @@ fi if [[ $DEBUG != "" ]]; then set +x -fi \ No newline at end of file +fi +set +a diff --git a/docker/Dockerfile b/docker/Dockerfile index 90df30d..8fdcc61 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,6 +1,14 @@ -FROM python:alpine3.17 +# Since hadolint isn't in the package repos for Alpineyet, we'll copying from the offical +# Docker image instead. +FROM ghcr.io/hadolint/hadolint:latest-alpine AS hadolint-binary + +# Since we're building against edge at risk +FROM alpine:edge AS buildkit + +COPY --stage=hadolint-binary /bin/hadolint /usr/bin/hadolint # https://squidfunk.github.io/mkdocs-material/setup/setting-up-social-cards/#linux but for Alpine +# hadolint ignore=DL3018,DL3013 RUN apk add --no-cache \ cairo-dev \ freetype-dev \ @@ -9,13 +17,14 @@ RUN apk add --no-cache \ libpng-dev \ zlib-dev \ bash \ - coreutils -RUN /usr/local/bin/pip3 install \ + coreutils \ + python3 \ + py3-pip \ + py3-wheel \ + shellcheck \ + && pip3 install --no-cache \ mkdocs-material \ mkdocs-redirects \ mkdocs-git-revision-date-localized-plugin \ pillow \ cairosvg - -ENTRYPOINT [ "mkdocs" ] -CMD [ "serve" ] \ No newline at end of file diff --git a/markdown/_redirects b/markdown/_redirects index dde20af..970afd4 100644 --- a/markdown/_redirects +++ b/markdown/_redirects @@ -1,11 +1,12 @@ # internal redirects /resume /user-manual/resume -/portfolio /user-manual/resume +#/portfolio /user-manual/resume +/dni /user-manual/dni # external redirects /blog https://ajhalili2006.substack.com /pkgs https://gcdn.todo.com -/socials https://ajhalili2006.bio.link +/socials https://ajhalili2006.start.page # user manual /manual /user-manual @@ -16,7 +17,7 @@ /privacy/coda /legal/privacy/coda /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 +/code-of-conduct https://coda.io/@ajhalili2006/readme/community-code-of-conduct-7 # this is obvious, right? /favicon.ico /assets/images/favicon.png \ No newline at end of file diff --git a/markdown/user-manual/boundaries.md b/markdown/user-manual/boundaries.md index 88ffa76..a4d9ed9 100644 --- a/markdown/user-manual/boundaries.md +++ b/markdown/user-manual/boundaries.md @@ -6,3 +6,23 @@ --- +## General + +* Don’t leak nor spill beans on what shouldn’t be discussed, especially confidential and personal stuff. +* Read my personal user manual in full before you ask. +* For fandom-related stuff and other things, consider [reading my DNI](./dni.md) + +## Personal + +!!! note + Looking for mental health parts, especially on neurodivergence/disability? You might be looking at [:material-wheelchair-accessibility::fontawesome-solid-brain: Neurodivergence and Disability](./neurodivergence-and-disability.md). + +## Professional + +## What happened when boundaries are disrespected? + +Hopefully tantrums, meltdowns and shutdowns don’t happen in front of your own eyes in levels I can’t handle, especially the silent ones. + +In most cases, I might be frustated + +## What about your DNI (Do Not Interact) list? diff --git a/markdown/user-manual/communications.md b/markdown/user-manual/communications.md index 96d9dc4..9c2bf4a 100644 --- a/markdown/user-manual/communications.md +++ b/markdown/user-manual/communications.md @@ -40,18 +40,21 @@ Generally, I’m not a fan of sync meetings, especially if iot is scheduled outs ### Office Hours +!!! warning "Currently left TBD due to school" + | Day | Regular Hours in PHT | Holidays / Rest Days [^1] | | --- | --- | --- | -| Weekdays | | | -| Weekends | | | +| Weekdays | TBD | TBD | +| Weekends | TBD | TBD | ### Recap Time Squad specifics * Work-related stuff should be discussed in Recap Time Squad’s chatrooms (either public or staff-only, although anything confidential/internal should be stay in staff-only chat). * Ping me when only needed. Also, DO NOT ping @everyone. +* I don't usually read email, but if you sent me some important emails (via my `@crew.recaptime.eu.org` ) ## Additional resources TBD -[^1]: My regular rest days usually happen on Saturdays. \ No newline at end of file +[^1]: My regular rest days usually happen on Saturdays, although they might be adjusted because of holidays and other reasons. diff --git a/markdown/user-manual/dni.md b/markdown/user-manual/dni.md new file mode 100644 index 0000000..21805f2 --- /dev/null +++ b/markdown/user-manual/dni.md @@ -0,0 +1,21 @@ +# Do Not Interact List + +!!! info "This content is also available on my multifandom Tumblr" + +This page contains the list of people where ~ajhalili2006 specifically does not want to interact with them. It is expected for those who are affected by this DNI list to avoid following him, although blocking him is too much unless otherwise needed. + +If spotted (even when following the Community Code of Conduct) in my his personal spaces (not in professional settings including Recap Time Squad, although his boundaries still apply), expect moderation actions up to and including wielding banhammers against your Tumblr blogs (plus other accounts across the internet). + +## Table of contents + +* General Shitfuckeries +* Shippers +* Dream Stans/Supporters + +## Shippers + +I’m not a pro-shipper, although sometimes things go horribly wrong when I ship people that shouldn’t be shipped. I’m more of a silent “ship responsibly” advocate like anyone else. + +## (Toxic) Dream Stans/Supporters + +I do not generally banhammer any people who support/stan Dream and the crew (aka Dream Team for the uninitiated), unless they do things toxic do fans in the interwebs. diff --git a/markdown/user-manual/index.md b/markdown/user-manual/index.md index 8fa3ff0..8d7f7f6 100644 --- a/markdown/user-manual/index.md +++ b/markdown/user-manual/index.md @@ -21,7 +21,7 @@ I'm Andrei Jiroh, a Filipino 16-year-old junior high school student at day and N ## Contents -Most of the links below will redirect you to the Coda version of my personal README +Although they originally editied in Coda, I slowly moving some of them here. * [:material-chat: Communications](./communications.md) * [:material-fence: Personal and professional boundaries](./boundaries.md) diff --git a/mkdocs.yml b/mkdocs.yml index f9c7b72..27001ca 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -110,6 +110,10 @@ plugins: - redirects: redirect_maps: "user-manual/portfolio.md": "portfolio.md" + "dni.md": "user-manual/dni.md" + "resume.md": "user-manual/resume.md" + "blog.md": "https://ajhalili2006.substack.com" + "socials.md": "https://ajhalili2006.start.page" # debugging/bug reporting purposes only, proceed with caution #- info - git-revision-date-localized: @@ -137,6 +141,10 @@ markdown_extensions: - md_in_html - admonition - abbr + - pymdownx.caret + - pymdownx.keys + - pymdownx.mark + - pymdownx.tilde # extras extra: diff --git a/package.json b/package.json index e189a61..6e8e652 100644 --- a/package.json +++ b/package.json @@ -3,9 +3,11 @@ "version": "0.1.0", "description": "Personal website for my tildes + Gemini version of blog posts", "scripts": { - "dev": "./bin/localdev.sh", - "build": "mkdocs build", - "docker:ci": "docker build -t dock.mau.dev/ajhalili2006/tildeverse-web/build-ci:localdev ./docker" + "start": "npm run dev", + "dev": "bash ./bin/localdev.sh", + "build": "bash ./bin/build.sh", + "deploy": "./bin/deploykit-pages.sh", + "docker:ci": "DOCKER_BUILDKIT=1 docker build -t dock.mau.dev/ajhalili2006/tildeverse-web/build-ci:localdev ./docker" }, "repository": { "type": "git", diff --git a/requirements.txt b/requirements.txt index 3a4a48e..34ac86c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ mkdocs-git-revision-date-localized-plugin==1.2.0 -mkdocs-material==9.1.4 +mkdocs-material==9.1.9 mkdocs-minify-plugin==0.6.4 mkdocs-redirects==1.2.0 pillow