2.2 KiB
2.2 KiB
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
Recommended Setup
Create a separate Git repository for your blog, then copy this starter into that repository root.
Local Writing Workflow
- Bootstrap the theme:
./scripts/bootstrap-theme.sh
- Create a new post:
./scripts/new-post.sh my-first-post
- Start the local preview server:
hugo server
- Edit the generated file under
content/posts/. - 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:
- Run
Create Blog Post - Fill in:
titleslug- optional
summary - optional comma-separated
tags - optional comma-separated
categories draft
- The workflow creates
content/posts/<slug>.md - 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 IPBLOG_DEPLOY_PORT: SSH port, usually22BLOG_DEPLOY_USER: deploy user on the serverBLOG_DEPLOY_KEY: private SSH key for the deploy userBLOG_DEPLOY_PATH: target directory, usually/opt/blogBLOG_DEPLOY_KNOWN_HOSTS: optionalknown_hostsentry for stricter SSH
Expected Server State
- Blog host installed from this repo's
install.sh d3v-blogcontainer running- the deploy user can write to
/opt/blog/public - Nginx Proxy Manager forwards
blog.yourdomain.comtod3v-blog:80
Notes
- This starter fetches LoveIt into
themes/LoveItusing Git. - The workflow installs Hugo Extended before building.
- Deployment uses
rsync --deleteto keep/opt/blog/publicin sync with the latest generatedpublic/output.