Dette er Onlines wiki, overført fra OnlineWeb4!
bun install
bun dev
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
bun run build
This command generates static content into the build
directory and can be served using any static contents hosting service.
Done automatically with GitHub Actions
This project uses a custom Astro sidebar, found in /sidebar/getSiderbar.js
. It will always place any index.md
or index.mdx
on the top of a directory, followed by all subdirectories, followed by all files. Using sort options in the frontmatter, you can control the order inside the files and subdirectories, but not make files appear before subdirectories.
The following frontmatter can be used in the .md
files to control the sidebar:
- title: string
- date: string
- child-directories-sort: "asc" | "desc"
- child-files-sort: "asc" | "desc" | "date"
Notes:
title
will be used as the title in the sidebar and on the page. The file name will be used as a fallback if no title is provided.- If the file is
index.md
orindex.mdx
, the title will also be the name of the directory.
- If the file is
date
should be parsable bynew Date()
child-directories-sort
will sort all directories in same directory, but not all subdirectories.child-files-sort
will sort all files in same directory and all files in all subdirectories.
- The top-level directory is not shown in the sidebar (
astro.config.mjs:69
) - Any file who's path includes
/motereferater-fra-hovedstyret/
and where child items are sorted by date will have their child items (markdown files in child directories) grouped into "Høst" and "Vår". (/sidebar/groupHsMeetings.js
)
Follow these steps to add a new page in the wiki:
- Navigate to the correct folder
- Navigate to the
src/content/docs
folder. Either create a new folder for your page or choose an existing folder.
- Navigate to the
- Creating a page
-
Create a page by adding a
.md
file inside the folder. -
Add a front matter section at the top of your file:
--- title: "Insert Title" ---
-
Fill in the desired content for the page.
-
Option 1: Navigate to the folder containing the .md
file you wish to edit. Open the file in your preferred text editor and make your changes.
Option 2: Visit the page in the wiki. At the bottom of the page, click on the `"Rediger side"`` option. This will redirect you to GitHub, where you can edit the page directly in your browser, eliminating the need for a source code editor.
- Navigate to the folder containing the
.md
file and delete it. Ensure that any references to the deleted page (e.g., links) are updated or removed to prevent broken links in the wiki.
Follow these steps to add a picture or attachments to your wiki page:
-
Add the image file in the repository
- Navigate to the
src/assets/images
folder and add your image file (.png
,.jpg
,.jpeg
,.gif
).
- Navigate to the
-
Add image to your page
- Link to your image in your page:

-
Add the attachment file to the repository
- Navigate to the
public/attachments
folder in the repository's root directory and add your attachment file (.pdf
,.xlsx
,.zip
, etc.).
- Navigate to the
-
Link the attachment to your page
[Attachment 1](/attachments/your-attachment.pdf)