⚙️
UBCWiki Project
The UBCWiki was initially started by moderators of the /r/UBC subreddit. It has since been moved to GitHub to allow for easier collaboration and contribution.
This page is for those who want to contribute to the website directly, and it requires some technical background. You can also contribute in other ways!
Technical Details
This wiki is powered by mkDocs-Material, a free and open source project. The wiki is hosted on GitHub Pages, and is automatically built and deployed using GitHub Actions.
You can use this Documentation for information about what is possible with mkDocs-Material, and how to further extend functionality.
Note
We were previously using mdBook, but we found that the functionality was too limited for what we needed in this project. You can still find the old setup and configuration notes on the old config page.
Installation
This guide assumes you know how to use the command line and git. If you don't, please see the contributing section on other ways to help or make changes.
- Clone this repository: https://github.com/CommunityUBC/ubcwiki
-
Install with pip with the command below, or refer to the official instructions.
-
Install the other plugins with the following commands. We use these plugins for things like zooming on images.
Run the site locally
When you are making edits, it is helpful to spin up a local webserver so that you can see your changes live. You can do that by running mkdocs serve
once everything is installed.
Want to add a new page?
-
Create a new markdown file somewhere in the
~/docs
directory. The file name and location will become the URL slug, so make it something short and descriptive. For example,~/docs/campus/ubc-sights.md
will be available athttps://ubcwiki.ca/campus/ubc-sights
. -
Add content to the page. You can use this website for guides on how to do things. Remember, the entire project is open source, so you can always take a peek at the source of other pages to see how they were formatted!
-
Add the page to the
./mkdocs.yml
file in thenav:
section. This file is used to generate links and structure for the wiki, and your page will not show up unless it is added here.
You can copy this boilerplate into your file:
#
<p align="center" style="font-size:60px;">😃</p>
<p align="center" style="font-size:36px;">Title goes here</p>
Content goes here
Please note that we may not merge in all requests, so don't get started on a huge project without checking in with us first! To make things easier, please select the "Allow edits from maintainers" option when submitting a pull request so we can make minor changes if needed.
Don't know where to make the page?
If you want to create a page but you don't know where to put it, or if you want to restructure some content without messing with the main directory, you can create files and folders in the ~/drafts
directory or you can reach out to us for help.