Skip to content
Snippets Groups Projects
Commit bdf17c6a authored by Red Oak's avatar Red Oak
Browse files

Merge branch 'readme' into 'master'

Add readme

See merge request social.coop/tech/wiki.social.coop!4
parents a3e3111c f5f4b41e
No related branches found
No related tags found
1 merge request!4Add readme
# wiki.social.coop
## Overview
- Our wiki is hosted at https://wiki.social.coop
- The content for the wiki comes from the [social.coop/general
wiki](https://git.coop/social.coop/general/-/wikis/home) here on git.coop (in
order to be easily editable by all)
- This repo uses the [metalsmith](https://github.com/segmentio/metalsmith)
static site generator to build the markdown into html
## Content
- wiki is a git repo under the hood (it gets cloned into src/)
- wiki also holds some templates (like gitlab issue and email) **which aren't
visible through the gitlab wiki interface**, so you need to clone the repo to
edit them
## Authenticated routes
- to secure a page behind mastodon authentication you need a handler using
`ensureAuthenticated` and (if you want to load a page from the wiki after
authentication) calling `next()`
- ensureAuthenticated basically redirects to social.coop through [the mastodon
oauth flow](https://docs.joinmastodon.org/spec/oauth/) requesting the minimum
permissions (read:accounts) and, if successful, saves the user's mastodon
username into a signed cookie (to avoid redirecting next time)
## Deployment
- the wiki is deployed by [our ansible
config](https://git.coop/social.coop/tech/ansible) like so: `ansible-playbook
server.playbook.yml --tags wiki --user $YOUR_SERVER_USERNAME`
- the code grabs various values from a `config.js` file (see
[example-config.js](https://git.coop/social.coop/tech/wiki.social.coop/-/blob/master/example-config.js))
which exists in the ansible config as
[config.js.j2](https://git.coop/social.coop/tech/ansible/-/blob/master/roles/wiki.social.coop/templates/config.js.j2)
- the secret values in config.js are templated in config.js.j2 and mapped in
[server.playbook.yaml](https://git.coop/social.coop/tech/ansible/-/blob/master/server.playbook.yml)
to secrets encypted in [our pass repo](https://git.coop/social.coop/tech/pass)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment