Basic Usage
Verify your installation
golda version
Display available commands
golda help
For subcommands, use the --help flag.
golda serve --help
Build your site
To build your site, cd into the project root an run:
golda
The result should be in the publishDir in your site configuration (public by default).
For information on deploying, see this page.
Draft, future and expired content
Golda allows you to set draft, date, publishDate, and expiryDate in the front matter of your content. By default, Golda will not publish content when:
- The
draftvalue istrue - The
dateis in the future - The
publishDateis in the future - The
expiryDateis in the past
Golda publishes descendants of draft, future, and expired node pages. To prevent publication of these descendants, use the
cascadefront matter field to cascade build options to the descendant pages.
You can override the default behavior when running golda or golda serve with command line flags:
golda --buildDrafts # or -D
golda --buildExpired # or -E
golda --buildFuture # or -F
Although you can also set these values in your site configuration, it can lead to unwanted results unless all content authors are aware of, and understand, the settings.
As noted above, Golda does not clear the
publicdirectory before building your site. Depending on the current evaluation of the four conditions above, after the build yourpublicdirectory may contain extraneous files from a previous build.A common practice is to manually clear the contents of the
publicdirectory before each build to remove draft, expired, and future content.
Deploy your site
When you are ready to deploy your site, run:
golda
This builds your site to the public directory.
You can copy your files to the root of a virtual host using ftp, scp, rsync or other solutions from the public directory.
Alternatively, you can use Forgejo Actions with our workflow, where a push to the Forgejo repository triggers a build and deployment to git-pages.