The build command
The build command is used to generate a static web site from imported
content and media attachments. It's used like so:
cd my-mastodon-site
fossilizer build
pagefind --keep-index-url --site build
Note: Until or unless Pagefind can be integrated into Fossilizer, it needs to be run as a separate command to provide search indexes and code modules for the site.
After using the build command, you should end up with a build directory
with a structure somewhat like this:
my-mastodon-site/
├── build
│ ├── 2020
│ ├── 2021
│ ├── 2022
│ ├── 2023
│ ├── index.css
│ ├── index.html
│ ├── index.js
│ ├── media
│ ├── pagefind
│ └── vendor
-
Activities are organized into a
{year}/{month}/{day}.htmlfile structure -
An
index.htmlpage is generated for the site overall, linking to the pages for each day -
The
mediadirectory is copied directly fromdata/media -
The
pagefinddirectory is generated by Pagefind for client-side search -
Other files and directories like
index.js,index.css,vendorare static assets copied into the build
You can customize both the templates and the static web assets used in this build. Check out the init --customize option for more information.
Options
--theme
Use the theme named <THEME> for rendering the site. This will look for a directory named themes/<THEME> in the data directory.
--clean
Delete build directory before proceeding
--skip-index
Skip building index page in HTML
--skip-index-json
Skip building index page in JSON
--skip-activities
Skip building pages for activities
--skip-assets
Skip copying over web assets