Hugo-based blog
This blog uses the hugo-blog-awesome theme, written by hugo-sid.
To run these commands, your environment will need to have both Hugo and Go available.
When running these commands, note these arguments/flags:
-b <BASE_URL>: Specifies the hostname and path (the URL) to the root. (e.g.https://example.com/blog/)- NOTE: If not specified, it is assumed for this project to be
https://anarchbool.dev/blog/.
- NOTE: If not specified, it is assumed for this project to be
-d <PATH>: The path to write the build output to. If not specified, this will bepublic.- NOTE: Even in
servermode, the build will be written to this path.
- NOTE: Even in
-D: Includes content marked as drafts. (e.g.hugo server -D)-E: Includes content marked as expired. (e.g.hugo server -E)-F: Includes content marked as in the future. (e.g.hugo server -F)--cleanDestinationDir: Removes existing files from the build directory that are not generated by the Hugo build. Useful when building/running with Hugo repeatedly.--gc: Enables cleanup tasks after the build. Recommended when building.--minify: Minifies output files of the build (e.g. scripts and HTML pages). Recommended when building.
Runs a webserver to preview the Hugo project with.
Open http://localhost:1313/blog/ to view it in the browser.
Upon any new edits, the project will automatically be rebuilt, with the page reloaded to reflect those edits.
To set the port to listen to (by default, 1313), add the -p <PORT_NUMBER> flag to the command: hugo server -p 8080
Builds the project for publication to the public directory.
NOTE: This project is automatically deployed to GitHub Pages upon a successful push to the main branch, thanks to the CI/CD pipeline in GitHub Actions, but can be deployed anywhere else, provided that you copy the contents of the public folder to where a web server will be looking.
Creates a new content file with the specified file name to the specified path, with an automatically-set date and time. Generally, this should be to the path content/en/posts (e.g. hugo new content content/en/posts/<FILE_NAME>).
Example command: hugo new content content/en/posts/my_first_post.md
Lists content for the Hugo project. Note that this command requires a subcommand after it (e.g. all).
Here are the possible subcommands:
all: Lists all content, regardless of state. (e.g.hugo list all)drafts: List all draft content. (e.g.hugo list drafts)expired: Lists all expired content. (e.g.hugo list expired)future: Lists all future content. (e.g.hugo list future)published: Lists all published content. (e.g.hugo list published)
To update the Hugo project, run hugo mod get -u, and then to remove unused entries in the go.mod and go.sum files, run hugo mod tidy.