-
-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Docs: Add API Reference as top-level nav (#2180)
can either link to redoc hosted elsewhere or make a local copy: - for local frontend build, just redirect to http://localhost:30870/api/redoc - for deployment, make local copy: run copy-api-docs.sh, copy locally from prod and serve at /api/ - copy-api-docs.sh copies openapi.json, redoc and logo to /api/ dir - if analytics enabled, also injects analytics scripts - for local testing, run copy-api-docs.sh and then run mkdocs serve - ci: copy from prod server - fixes #1582
- Loading branch information
Showing
5 changed files
with
26 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/usr/bin/env bash | ||
CURR=$(dirname "${BASH_SOURCE[0]}") | ||
|
||
TARGET=$CURR/docs/api/ | ||
mkdir $TARGET | ||
curl "$DOCS_SOURCE_URL/api/openapi.json" > $TARGET/openapi.json | ||
curl "$DOCS_SOURCE_URL/api/redoc" > $TARGET/index.html | ||
curl "$DOCS_SOURCE_URL/docs-logo.svg" > $TARGET/../docs-logo.svg | ||
|
||
if [ -n $ENABLE_ANALYTICS ]; then | ||
SCRIPT_1=' <script defer data-domain=\"docs.browsertrix.com\" src=\"https://p.webrecorder.net/js/script.outbound-links.js\"></script>' | ||
SCRIPT_2=' <script>window.plausible = window.plausible || function () { (window.plausible.q = window.plausible.q || []).push(arguments) }</script>' | ||
awk "1;/<head>/{ print \"$SCRIPT_1\"; print \"$SCRIPT_2\" }" $TARGET/index.html > $TARGET/index.html.new | ||
mv $TARGET/index.html.new $TARGET/index.html | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,7 @@ Docs are organized into the following sections: | |
- [User Guide](./user-guide/index.md) — Instructions on how to use Browsertrix to create and share web archives. | ||
- [Self-Hosting](./deploy/index.md) — Instructions on how to install, set up, and deploy self-hosted Browsertrix. | ||
- [Development](./develop/index.md) — Contribute to the open source development of Browsertrix software. | ||
- [API Reference](/api) - Full API reference for interacting with the Browsertrix backend. | ||
|
||
If you have feedback on the docs, please feel free to [reach out to us](mailto:[email protected]). | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters