website: separate development docs

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-04-18 17:25:03 +02:00
parent 8628595590
commit 84ce2c1df2
5 changed files with 45 additions and 11 deletions

View file

@ -6,6 +6,6 @@ Starting with 2021.3.5, every authentik instance has a built-in API browser, whi
To generate an API client, you can use the Swagger schema at https://authentik.company/api/v2beta/swagger.json. To generate an API client, you can use the Swagger schema at https://authentik.company/api/v2beta/swagger.json.
While testing, the API requests are authenticated by your browser session. To send an API request from outside the browser, you need to set an `Authorization` header. While testing, the API requests are authenticated by your browser session.
The value needs to be set to the base64-encoded token key. To send an API request from outside the browser, you need to set the `Authorization` Header to `Bearer <your token>`.

View file

@ -1,5 +1,6 @@
--- ---
title: Setting up a local dev environment title: Getting started
slug: /
--- ---
## Backend ## Backend
@ -27,6 +28,10 @@ Afterwards, you can start authentik by running `./manage.py runserver`. Generall
Most functions and classes have type-hints and docstrings, so it is recommended to install a Python Type-checking Extension in your IDE to navigate around the code. Most functions and classes have type-hints and docstrings, so it is recommended to install a Python Type-checking Extension in your IDE to navigate around the code.
Before committing code, run `make lint` to ensure your code is formatted well. This also requires `pyright`, which can be installed with npm.
Run `make gen` to run all unittests and generated an updated swagger document for any changes you made.
## Frontend ## Frontend
By default, no transpiled bundle of the frontend is included. To build the UI, you need Node 12 or newer. By default, no transpiled bundle of the frontend is included. To build the UI, you need Node 12 or newer.
@ -54,3 +59,5 @@ npm run build
``` ```
If you want to make changes to the UI, run `npm run watch` instead. If you want to make changes to the UI, run `npm run watch` instead.
To ensure the code is formatted well, run `npx eslint . --fix` and `npm run lit-analyse`.

View file

@ -21,6 +21,12 @@ module.exports = {
label: "Docs", label: "Docs",
position: "left", position: "left",
}, },
{
to: "developer-docs/",
activeBasePath: "developer-docs",
label: "Developer Docs",
position: "left",
},
{ {
to: "api/", to: "api/",
activeBasePath: "api", activeBasePath: "api",
@ -48,6 +54,10 @@ module.exports = {
label: "Documentation", label: "Documentation",
to: "docs/", to: "docs/",
}, },
{
label: "Developer Documentation",
to: "developer-docs/",
},
{ {
label: "Installations", label: "Installations",
to: "docs/installation/index", to: "docs/installation/index",
@ -83,6 +93,7 @@ module.exports = {
"@docusaurus/preset-classic", "@docusaurus/preset-classic",
{ {
docs: { docs: {
id: "docs",
sidebarPath: require.resolve("./sidebars.js"), sidebarPath: require.resolve("./sidebars.js"),
editUrl: "https://github.com/beryju/authentik/edit/master/website/", editUrl: "https://github.com/beryju/authentik/edit/master/website/",
}, },
@ -92,4 +103,16 @@ module.exports = {
}, },
], ],
], ],
plugins: [
[
'@docusaurus/plugin-content-docs',
{
id: 'docsDevelopers',
path: 'developer-docs',
routeBasePath: 'developer-docs',
sidebarPath: require.resolve('./sidebarsDev.js'),
editUrl: "https://github.com/beryju/authentik/edit/master/website/",
},
],
],
}; };

View file

@ -163,13 +163,5 @@ module.exports = {
"troubleshooting/image_upload_backup", "troubleshooting/image_upload_backup",
], ],
}, },
{
type: "category",
label: "Development",
items: [
"development/local-dev-environment",
"development/api"
],
},
], ],
}; };

12
website/sidebarsDev.js Normal file
View file

@ -0,0 +1,12 @@
module.exports = {
docs: [
{
type: "doc",
id: "local-dev-environment",
},
{
type: "doc",
id: "api",
},
],
};