Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion .github/actions/build-release-assets/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,18 @@ bun release
theme-github-pink-*.css theme-github-gitea-*.css theme-github-catppuccin-*.css
)

tar -zcf dist/theme-github-templates.tar.gz templates -C dist assets/js
# Template assets must extract beside templates under the documented custom root.
# Keep page-specific styles out of theme packs; they are required by the templates.
template_stage=$(mktemp -d)
trap 'rm -rf "$template_stage"' EXIT
mkdir -p "$template_stage/public/assets/css" "$template_stage/public/assets/js"
cp -R templates "$template_stage/templates"
cp -R dist/assets/js/. "$template_stage/public/assets/js/"
for stylesheet in dist/*.css; do
case "${stylesheet##*/}" in
theme-*) ;;
*) cp "$stylesheet" "$template_stage/public/assets/css/" ;;
esac
done
tar -zcf dist/theme-github-templates.tar.gz -C "$template_stage" templates public
tar -zcf dist/theme-github-fonts.tar.gz -C dist assets/fonts
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Install the resulting files using your Forgejo data directory (commonly `data/gi
3. Extract `theme-github-fonts.tar.gz` into `<forgejo-data>/public`. This supplies the Mona Sans variable font; its SIL
Open Font License is included beside the font.
4. Extract the optional `theme-github-templates.tar.gz` archive into `<forgejo-data>`. It includes the templates and
their required JavaScript assets.
their required JavaScript and page-specific CSS assets under `public/assets`.
5. Modify `<forgejo-data>/conf/app.ini` and append the CSS filename without the `theme-` prefix to `THEMES` under the
`[ui]` section.
6. Restart Forgejo.
Expand Down