|
|
||
|---|---|---|
| .forgejo/workflows | ||
| content | ||
| themes | ||
| .gitignore | ||
| .gitmodules | ||
| ikiwiki.setup | ||
| LICENSE | ||
| README.md | ||
Example ikiwiki website using Ilot Pages
Learn more about Ilot Pages at https://pages.ilot.io and the official documentation https://wiki.ilot.io/books/pages
Forge CI
This project's static Pages are built by Forge CI, following the steps
defined in .forgejo/workflows/pages.yaml:
on:
push:
branches:
- 'main'
jobs:
render:
runs-on: aarch64
container:
image: alpine:latest
steps:
- name: Environment setup
run: |
apk add git ikiwiki perl-yaml-tiny tree nodejs imagemagick-perlmagick imagemagick imagemagick-jpeg findutils bash imagemagick-webp
- name: Repo pull
uses: actions/checkout@v4
with:
fetch-depth: 1
submodules: recursive
- name: Pages repo pull
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: pages
path: public
- name: Render website
run: ikiwiki --setup ikiwiki.setup --libdir themes/ikistrap/lib
- name: Website upload
run: |
[ -f .domains ] && cp .domains public/.domains || echo '.domains not found, skipping.'
[ -f _redirects ] && cp _redirects public/_redirects || echo '_redirects not found, skipping.'
git log -1 --pretty=%B > commit.txt
cd public
date > generated.txt
# Note: the following account information will not work on GHES
git config user.name "forgejo-actions[bot]"
git config user.email "pages@ilot.page"
git add .
git commit -F ../commit.txt
git push
We are using a theme based on Bootstrap 4 using submodules, and in order to
enable the theme plugin, we must pass the libdir parameter.
Forge makes available to the hosting server whatever files are sent to the
pages branch. The workflow does the following:
- Installs the dependencies with
alpine:latestimage - Fetches the
mainbranch and submodules, and changes directory into it - Fetches the
pagesbranch under./public - Renders website to
./public - Copies (if available)
.domainsand_redirectsfile if available if using custom domains or custom directs - Writes current commit information to
commit.txtto be picked up later - Commits changes to
pagesbranch, matching commit message - Pushes changes to
pagesbranch
Once push is done, the pages server will make it available after a few minutes
Other workflows are setup under previews.yaml and cleanup.yaml to generate
previews under $url/previews when working within a pull requests. These workflows
are still a work
in progress.
Building locally
To work locally with this project, you'll have to follow the steps below:
- Fork, clone or download this project
- Install ikiwiki
- Clone the submodules:
git submodule init && git submodule update - Generate the website:
ikiwiki --setup ikiwiki.setup --libdir themes/ikistrap/lib - Preview your project: open
public/index.htmlin a browser
Read more at ikiwiki's documentation.
Did you fork this project?
If you forked this project for your own use, please go to your project's Settings and remove the forking relationship, which won't be necessary unless you want to contribute back to the upstream project.
Troubleshooting
-
CSS is missing! That means two things:
Either that you have wrongly set up the CSS URL in your templates, or your static generator has a configuration option that needs to be explicitly set in order to serve static assets under a relative URL.