No description
Find a file
xtcnet 8894b18c93
All checks were successful
Deploy Blog / deploy (push) Successful in 33s
Rewrite intro post with Vietnamese diacritics
2026-03-19 18:07:53 +07:00
.forgejo/workflows Improve deploy error reporting 2026-03-19 17:51:55 +07:00
archetypes Add Hugo LoveIt blog starter 2026-03-19 14:03:27 +07:00
content Rewrite intro post with Vietnamese diacritics 2026-03-19 18:07:53 +07:00
scripts Pin LoveIt theme to v0.3.1 2026-03-19 17:49:12 +07:00
static Add Hugo LoveIt blog starter 2026-03-19 14:03:27 +07:00
.gitignore Add Hugo LoveIt blog starter 2026-03-19 14:03:27 +07:00
hugo.toml Add Hugo LoveIt blog starter 2026-03-19 14:03:27 +07:00
README.md Improve blog deploy setup 2026-03-19 14:37:26 +07:00

Blog Starter

This folder is a standalone starter for a Hugo blog that uses the LoveIt theme and deploys to the static blog host installed by install.sh.

What This Starter Includes

  • Hugo site structure
  • LoveIt bootstrap script
  • sample content
  • a helper script to create new posts
  • a Forgejo Actions workflow that builds and deploys to /opt/blog/public

Create a separate Git repository for your blog, then copy this starter into that repository root.

Local Writing Workflow

  1. Bootstrap the theme:
./scripts/bootstrap-theme.sh
  1. Create a new post:
./scripts/new-post.sh my-first-post
  1. Start the local preview server:
hugo server
  1. Edit the generated file under content/posts/.
  2. When ready to publish, set draft = false, commit, and push.

Forgejo Web Workflow

If you want to create posts directly from the Forgejo web UI, use the manual workflow in .forgejo/workflows/create-post.yml.

From the Actions page:

  1. Run Create Blog Post
  2. Fill in:
    • title
    • slug
    • optional summary
    • optional comma-separated tags
    • optional comma-separated categories
    • draft
  3. The workflow creates content/posts/<slug>.md
  4. The normal deploy workflow publishes the post on the next push

This keeps you out of front matter for most day-to-day writing.

Forgejo Secrets

The workflow expects these repository secrets:

  • BLOG_DEPLOY_HOST: server hostname or IP
  • BLOG_DEPLOY_PORT: SSH port, usually 22
  • BLOG_DEPLOY_USER: deploy user on the server
  • BLOG_DEPLOY_KEY: private SSH key for the deploy user
  • BLOG_DEPLOY_PATH: target directory, usually /opt/blog
  • BLOG_DEPLOY_KNOWN_HOSTS: optional known_hosts entry for stricter SSH

Expected Server State

  • Blog host installed from this repo's install.sh
  • d3v-blog container running
  • a deploy user created by install.sh blog-install or install.sh blog-update
  • install.sh blog-deploy-info prints the exact secret values to paste into Forgejo
  • Nginx Proxy Manager forwards blog.yourdomain.com to d3v-blog:80

Notes

  • This starter fetches LoveIt into themes/LoveIt using Git.
  • The workflow installs Hugo Extended before building.
  • Deployment uses rsync --delete to keep /opt/blog/public in sync with the latest generated public/ output.