commit 70423ce723b89271f937d483a3001e4e08abb1d4 Author: Nicholas Ward Date: Sat Jul 5 15:36:34 2025 +0000 Clean history, git LFS diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..88e52dc --- /dev/null +++ b/.gitattributes @@ -0,0 +1,7 @@ +*.png filter=lfs diff=lfs merge=lfs -text +*.PNG filter=lfs diff=lfs merge=lfs -text +*.jpg filter=lfs diff=lfs merge=lfs -text +*.JPG filter=lfs diff=lfs merge=lfs -text +*.mp4 filter=lfs diff=lfs merge=lfs -text +*.MP4 filter=lfs diff=lfs merge=lfs -text +*.webm filter=lfs diff=lfs merge=lfs -text diff --git a/.gitea/workflows/containerize.yaml b/.gitea/workflows/containerize.yaml new file mode 100644 index 0000000..37a84a5 --- /dev/null +++ b/.gitea/workflows/containerize.yaml @@ -0,0 +1,50 @@ +name: Build & Push Hugo Site Image + +on: + push: + branches: + - master + - feature/external-media + workflow_dispatch: + +jobs: + containerize: + name: 'containerize' + env: + REGISTRY_USERNAME: nicholas + IMAGE_REGISTRY: git.uuard.com + IMAGE_NAME: nicholas/web-log + IMAGE_TAG: ${{ github.sha }} + runs-on: ubuntu-latest + steps: + - name: โฌ‡๏ธ Checkout repo + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: โš™๏ธ Setup Hugo + uses: peaceiris/actions-hugo@v3 + with: + hugo-version: '0.147.9' + extended: true + + - name: ๐Ÿ—๏ธ Build Hugo site + working-directory: container/site + run: hugo --minify + + - name: ๐Ÿ” Gitea Registry Login + uses: docker/login-action@v3 + with: + registry: ${{ env.IMAGE_REGISTRY }} + username: ${{ env.REGISTRY_USERNAME }} + password: ${{ secrets.REPO_PKG_TOKEN }} + + - name: ๐Ÿ‹ Build Docker image + run: docker build -t $IMAGE_REGISTRY/$IMAGE_NAME:$IMAGE_TAG ./container + + - name: ๐Ÿš€ Push Docker image + run: docker push $IMAGE_REGISTRY/$IMAGE_NAME:$IMAGE_TAG + + - name: ๐Ÿงน Prune images + if: always() + run: docker image prune -f diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..40d0ce7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,21 @@ +# Created by https://www.toptal.com/developers/gitignore/api/hugo +# Edit at https://www.toptal.com/developers/gitignore?templates=hugo + +### Hugo ### +# Generated files by hugo +container/site/public/ +container/site/resources/_gen/ +container/site/assets/jsconfig.json +container/site/hugo_stats.json + +# Executable may be added to repository +hugo.exe +hugo.darwin +hugo.linux + +# Temporary lock file while building +container/site/.hugo_build.lock + +# End of https://www.toptal.com/developers/gitignore/api/hugo + +/.vscode/ diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..418914f --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "container/site/themes/LoveIt"] + path = container/site/themes/LoveIt + url = https://github.com/sulrich/LoveIt.git diff --git a/README.md b/README.md new file mode 100644 index 0000000..be453f8 --- /dev/null +++ b/README.md @@ -0,0 +1,42 @@ +# web log +This is my personal blog. + +## Tech Stack +- [Hugo](https://gohugo.io/) +- [Markdown](https://daringfireball.net/projects/markdown/) +- Submodules: + - [LoveIt theme](https://github.com/dillonzq/LoveIt) + +### clone repository +To clone the repo and its submodules in one step: + ```shell +git clone --recurse-submodules https://git.uuard.com/nicholas/web-log.git +``` +or + +```shell +git clone https://git.uuard.com/nicholas/web-log.git +cd web-log/themes +git submodule update --init --recursive +``` + +### update submodules +```shell +git submodule update --remote --merge` +``` + +### development server +```shell +hugo server +``` + +### production +I have configured the Hugo site to serve media assets (images, videos) from an external host. To enable this, I have: + +- Defined a base URL for file server in my `hugo.toml`: + + `filesBase = "https://files.web-log.uuard.com"` +- Created custom shortcodes (gallery, video, image) that: + - Accept a relative path (e.g. `"videos/fells-point-path.webm"`) + - Resolve the full asset URL using the `filesBase` parameter + - Use the full URL in (e.g. `