website: Update commands. (#15561)

This commit is contained in:
Teffen Ellis
2025-07-15 16:36:20 +02:00
committed by GitHub
parent b30500094f
commit 118e05f256
6 changed files with 31 additions and 25 deletions

View File

@@ -31,4 +31,4 @@ If changes to the frontend have been made
If applicable
- [ ] The documentation has been updated
- [ ] The documentation has been formatted (`make website`)
- [ ] The documentation has been formatted (`make docs`)

View File

@@ -1,4 +1,4 @@
.PHONY: gen dev-reset all clean test web website
.PHONY: gen dev-reset all clean test web docs
SHELL := /usr/bin/env bash
.SHELLFLAGS += ${SHELLFLAGS} -e -o pipefail
@@ -73,7 +73,7 @@ core-i18n-extract:
--ignore website \
-l en
install: node-install website-install core-install ## Install all requires dependencies for `web`, `website` and `core`
install: node-install docs-install core-install ## Install all requires dependencies for `node`, `docs` and `core`
dev-drop-db:
dropdb -U ${pg_user} -h ${pg_host} ${pg_name}
@@ -226,22 +226,28 @@ web-i18n-extract:
cd web && npm run extract-locales
#########################
## Website
## Docs
#########################
website: website-lint-fix website-build ## Automatically fix formatting issues in the Authentik website/docs source code, lint the code, and compile it
docs: docs-lint-fix docs-build ## Automatically fix formatting issues in the Authentik docs source code, lint the code, and compile it
website-install:
cd website && npm ci
docs-install:
npm ci --prefix website
website-lint-fix: lint-codespell
cd website && npm run prettier
docs-lint-fix: lint-codespell
npm run prettier --prefix website
website-build:
cd website && npm run build
docs-build:
npm run build --prefix website
website-watch: ## Build and watch the documentation website, updating automatically
cd website && npm run watch
docs-watch: ## Build and watch the topics documentation
npm run start --prefix website
docs-integrations-build:
npm run build --prefix website -w integrations
docs-integrations-watch: ## Build and watch the Integrations documentation
npm run start --prefix website -w integrations
#########################
## Docker

View File

@@ -12,9 +12,9 @@ Adhering to the following guidelines will help us get your PRs merged much easie
- Remember to use our [docs templates](./templates/index.md) when possible; they are already set up to follow our style guidelines, they make it a lot easier for you (no blank page frights!), and keeps the documentation structure and headings consistent.
- To test how the documentation renders you can build locally and then use the Netlify Deploy Preview, especially when using Docusaurus-specific features. You can also run the `make website-watch` command on your local build, to see the rendered pages as you make changes.
- To test how the documentation renders you can build locally and then use the Netlify Deploy Preview, especially when using Docusaurus-specific features. You can also run the `make docs-watch` command on your local build, to see the rendered pages as you make changes.
- Be sure to run the `make website` command on your local branch, before pushing the PR to the authentik repo. This command does important linting, and the build check in our repo will fail if the linting has not been done.
- Be sure to run the `make docs` command on your local branch, before pushing the PR to the authentik repo. This command does important linting, and the build check in our repo will fail if the linting has not been done.
- For new entries, make sure to add any new pages to the appropriate `sidebar.js` file. Otherwise, the new page will not appear in the table of contents to the left.
@@ -26,21 +26,21 @@ Requirements:
The docs and the code are in the same Github repo, at https://github.com/goauthentik/authentik, so if you have cloned the repo, you already have the docs.
You can do local builds of the documentation to test your changes or review your new content, and to run the required `make website` command (which runs `prettier` and other linters) before pushing your PR.
You can do local builds of the documentation to test your changes or review your new content, and to run the required `make docs` command (which runs `prettier` and other linters) before pushing your PR.
The documentation site is situated in the `/website` folder of the repo.
The site is built using npm, below are some useful make commands:
- **Installation**: `make website-install`
- **Installation**: `make docs-install`
This command is required before running any of the following commands, and after upgrading any dependencies.
- **Formatting**: `make website`, `make website-lint-fix`, or `npm run prettier`
- **Formatting**: `make docs`, `make docs-lint-fix`, or `npm run prettier`
Run the appropriate formatting command for your set up before committing, to ensure consistent syntax, clean formatting, and verify links. Note that if the formatting command is not run, the build will fail with an error about linting.
- **Live editing**: `make website-watch`
- **Live editing**: `make docs-watch`
For real-time viewing of changes, as you make them.

View File

@@ -31,7 +31,7 @@
If the release notes are created in advance without a fixed date for the release, only add them to the sidebar once the release is published.
- Run `make website`
- Run `make docs`
#### For subsequent releases:
- Paste the list of commits since the previous release into `website/docs/releases/v2022.12.md`, creating a new section called `## Fixed in 2022.12.2` underneath the `Minor changes/fixes` section
@@ -40,7 +40,7 @@
- Run `make gen-diff` and copy the contents of `diff.md` under `API Changes`, replacing the previous changes
- Run `make website`
- Run `make docs`
- Run `bumpversion` on the version branch with the new version (i.e. `bumpversion --new-version 2022.12.2 minor --verbose`)
- Push the tag and commit

View File

@@ -22,6 +22,6 @@ Depending on platform, some native dependencies might be required. On macOS, run
### Instructions
1. Clone the git repo from https://github.com/goauthentik/authentik
2. Run `make website-install` to install the website development dependencies
3. Run `make website-watch` to start a development server to see and preview your changes
4. Finally when you're about to commit your changes, run `make website` to run the linter and auto-formatter.
2. Run `make docs-install` to install the docs development dependencies
3. Run `make docs-watch` to start a development server to see and preview your changes
4. Finally when you're about to commit your changes, run `make docs` to run the linter and auto-formatter.

View File

@@ -58,7 +58,7 @@ Because the structure is completely changed, you will need to modify/reconstruct
## Test the results
To test the internal links, navigate up a level to `authentik` and then run `make website-watch`.
To test the internal links, navigate up a level to `authentik` and then run `make docs-watch`.
## Troubleshooting