From eea77bc23439d6e7761a983522602d621104484b Mon Sep 17 00:00:00 2001 From: jooola Date: Tue, 22 Nov 2022 20:52:06 +0000 Subject: [PATCH] ci: scan for broken links --- .gitlab-ci.yml | 15 +++++++ CONTRIBUTING.md | 6 +-- README.md | 6 +-- api/Readme.md | 10 ++--- .../ci-add-broken-link-checker.misc | 1 + .../upgrade_docs/debian.md | 2 +- .../upgrade_docs/docker.md | 2 +- .../upgrade_docs/quick_install.md | 2 +- docs/swagger.yml | 39 +++++++------------ .../libraries/edit_content.md | 2 +- .../subsonic/disable_subsonic.md | 2 +- front/public/embed.html | 2 +- 12 files changed, 47 insertions(+), 42 deletions(-) create mode 100644 changes/changelog.d/ci-add-broken-link-checker.misc diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index be9f0e20e..08131470b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -105,6 +105,21 @@ review_docs: - if: $CI_PIPELINE_SOURCE != "merge_request_event" && $CI_COMMIT_REF_NAME != $CI_DEFAULT_BRANCH when: manual +find_broken_links: + stage: lint + needs: [] + image: + name: lycheeverse/lychee + entrypoint: [""] + script: + - > + lychee + --exclude-all-private + --exclude-mail + --exclude 'demo\.funkwhale\.audio' + --exclude-path 'docs/_templates/' + -- . + changelog_snippet: interruptible: true image: alpine:3.17 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 139e5f581..168456188 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -8,15 +8,15 @@ The Funkwhale software is the core of the community project. While we have a cor Funkwhale's backend is written in [Python](https://www.python.org/) using [Django](https://www.djangoproject.com) and [Django REST framework](https://www.django-rest-framework.org/). Our web app is written in [Vue.js](https://vuejs.org/) and [Typescript](https://typescriptlang.org). -Whether you're an experienced developer or you're just learning, check out our [developer guide](https://docs.funkwhale.audio/developer_documentation/index.html) to get started. +Whether you're an experienced developer or you're just learning, check out our [developer guide](https://docs.funkwhale.audio/developers/index.html) to get started. ## Document Funkwhale -Funkwhale is a large project with a lot of moving parts. To help users and developers alike, we need to keep our documentation up-to-date and readable. If you have a knack for explaining technical concepts or you've noticed a gap, check out our [documentation guide](https://docs.funkwhale.audio/contributor_documentation/documentation.html) to see how to get involved. +Funkwhale is a large project with a lot of moving parts. To help users and developers alike, we need to keep our documentation up-to-date and readable. If you have a knack for explaining technical concepts or you've noticed a gap, check out our [documentation guide](https://docs.funkwhale.audio/documentation/index.html) to see how to get involved. ## Translate Funkwhale -All Funkwhale content is written in American English, but our community speaks languages from all over the world. If you'd like to see Funkwhale in your language, check out the [translation guide](https://docs.funkwhale.audio/contributor_documentation/translation.html) to see how you can help out. +All Funkwhale content is written in American English, but our community speaks languages from all over the world. If you'd like to see Funkwhale in your language, check out the [translation guide](https://docs.funkwhale.audio/translators.html) to see how you can help out. ## Other contributions diff --git a/README.md b/README.md index 0abf0db34..14dde4835 100644 --- a/README.md +++ b/README.md @@ -10,8 +10,8 @@ Want to help make Funkwhale even better? We welcome contributions from across th You can find contribution information in our [documentation hub](https://docs.funkwhale.audio). -- [Developer guides](https://docs.funkwhale.audio/developer_documentation/index.html) -- [Contributor guides](https://docs.funkwhale.audio/contributor_documentation/index.html) +- [Developer guides](https://docs.funkwhale.audio/developers/index.html) +- [Contributor guides](https://docs.funkwhale.audio/contributing.html) ## Get help @@ -21,6 +21,6 @@ Got a question or need help? Head over to our [forum](https://forum.funkwhale.au If you find a security issue or vulnerability, please report it on our [GitLab instance](https://dev.funkwhale.audio/funkwhale/funkwhale/-/issues). When you open your issue, select the **This issue is confidential and should only be visible to team members with at least Reporter access** option. This ensures developers can verify and patch the issue before disclosing it. -## Code of conduct +## Code of conduct The Funkwhale collective adheres to a [code of conduct](https://funkwhale.audio/en_US/code-of-conduct) in all our community spaces. Please familiarize yourself with this code and follow it when participating in discussions in our spaces. diff --git a/api/Readme.md b/api/Readme.md index e77d12757..005368b99 100644 --- a/api/Readme.md +++ b/api/Readme.md @@ -9,13 +9,13 @@ Funkwhale uses the OAuth [authorization grant flow](https://tools.ietf.org/html/ To authenticate with the Funkwhale API: 1. Create an application by sending a `POST` request to `api/v1/oauth/apps`. Include your scopes and redirect URI (use `urn:ietf:wg:oauth:2.0:oob` -to get an authorization code you can copy) -2. Send an [authorization request](https://www.rfc-editor.org/rfc/rfc6749#section-4.1.2) to the `/authorize` endpoint to receive an authorization code + to get an authorization code you can copy) +2. Send an [authorization request](https://www.rfc-editor.org/rfc/rfc6749#section-4.1.2) to the `/authorize` endpoint to receive an authorization code 3. [Request an access token](https://www.rfc-editor.org/rfc/rfc6749#section-4.1.3) from `/api/v1/oauth/token` 4. Use your access token to authenticate your calls with the following format: `Authorization: Bearer ` 5. Refresh your access token by sending a refresh request to `/api/v1/oauth/token` -For more detailed instructions, see [our API authentication documentation](https://docs.funkwhale.audio/developer_documentation/api/authentication.html). +For more detailed instructions, see [our API authentication documentation](https://docs.funkwhale.audio/developers/authentication.html). ## Application token authentication @@ -32,8 +32,8 @@ Each API call returns HTTP headers to pass the following information: - How many more requests in the scope can be made within the rate-limit timeframe (`X-RateLimit-Remaining`) - How much time does the client need to wait to send another request (`Retry-After`) -For more information, check our [rate limit documentation](https://docs.funkwhale.audio/developer_documentation/api/rate-limit.html) +For more information, check our [rate limit documentation](https://docs.funkwhale.audio/admin/configuration.html#api-configuration) ## Resources -For more information about API usage, refer to [our API documentation](https://docs.funkwhale.audio/developer_documentation/api/index.html). +For more information about API usage, refer to [our API documentation](https://docs.funkwhale.audio/api.html). diff --git a/changes/changelog.d/ci-add-broken-link-checker.misc b/changes/changelog.d/ci-add-broken-link-checker.misc new file mode 100644 index 000000000..a4888badc --- /dev/null +++ b/changes/changelog.d/ci-add-broken-link-checker.misc @@ -0,0 +1 @@ +Add CI broken links checker diff --git a/docs/administrator_documentation/upgrade_docs/debian.md b/docs/administrator_documentation/upgrade_docs/debian.md index a7444a703..f05f75b58 100644 --- a/docs/administrator_documentation/upgrade_docs/debian.md +++ b/docs/administrator_documentation/upgrade_docs/debian.md @@ -1,6 +1,6 @@ # Upgrade your Debian Funkwhale installation -If you installed Funkwhale following the [Debian guide](../installation_docs/debian), follow these steps to upgrade. +If you installed Funkwhale following the [Debian guide](../installation_docs/debian.md), follow these steps to upgrade. :::{dropdown} Upgrading to a new version of Python :icon: alert diff --git a/docs/administrator_documentation/upgrade_docs/docker.md b/docs/administrator_documentation/upgrade_docs/docker.md index 2d4c0e339..6a158627c 100644 --- a/docs/administrator_documentation/upgrade_docs/docker.md +++ b/docs/administrator_documentation/upgrade_docs/docker.md @@ -1,6 +1,6 @@ # Upgrade your Docker Funkwhale installation -If you installed Funkwhale following the [Docker guide](../installation_docs/docker), follow these steps to upgrade. +If you installed Funkwhale following the [Docker guide](../installation_docs/docker.md), follow these steps to upgrade. ## Upgrade Funkwhale diff --git a/docs/administrator_documentation/upgrade_docs/quick_install.md b/docs/administrator_documentation/upgrade_docs/quick_install.md index b8ed02928..f6299561a 100644 --- a/docs/administrator_documentation/upgrade_docs/quick_install.md +++ b/docs/administrator_documentation/upgrade_docs/quick_install.md @@ -1,6 +1,6 @@ # Upgrade using the quick install script -If you installed Funkwhale using the [quick install script](../installation_docs/quick_install), upgrading your instance is as simple as running the following command on your server: +If you installed Funkwhale using the [quick install script](../installation_docs/quick_install.md), upgrading your instance is as simple as running the following command on your server: ```bash sudo sh -c "$(curl -sSL https://get.funkwhale.audio/upgrade.sh)". diff --git a/docs/swagger.yml b/docs/swagger.yml index a732c8be4..c1bc859b1 100644 --- a/docs/swagger.yml +++ b/docs/swagger.yml @@ -28,7 +28,7 @@ info: 4. Use your access token to authenticate your calls with the following format: `Authorization: Bearer ` 5. Refresh your access token by sending a refresh request to `/api/v1/oauth/token` - For more detailed instructions, see [our API authentication documentation](https://docs.funkwhale.audio/developer_documentation/api/authentication.html). + For more detailed instructions, see [our API authentication documentation](https://docs.funkwhale.audio/developers/authentication.html). ## Application token authentication @@ -47,11 +47,11 @@ info: - How many more requests in the scope can be made within the rate-limit timeframe (`X-RateLimit-Remaining`) - How much time does the client need to wait to send another request (`Retry-After`) - For more information, check our [rate limit documentation](https://docs.funkwhale.audio/developer_documentation/api/rate-limit.html) + For more information, check our [rate limit documentation](https://docs.funkwhale.audio/admin/configuration.html#api-configuration) ## Resources - For more information about API usage, refer to [our API documentation](https://docs.funkwhale.audio/developer_documentation/api/index.html). + For more information about API usage, refer to [our API documentation](https://docs.funkwhale.audio/api.html). version: "1.0.0" title: "Funkwhale API" @@ -69,9 +69,9 @@ servers: description: Your Funkwhale Domain protocol: enum: - - 'http' - - 'https' - default: 'https' + - "http" + - "https" + default: "https" components: responses: @@ -154,8 +154,7 @@ paths: post: tags: - "Auth and security" - summary: - Register an OAuth application + summary: Register an OAuth application security: [] responses: 201: @@ -189,8 +188,7 @@ paths: post: tags: - "Auth and security" - summary: - Request an OAuth bearer token in exchange of an authorization_code or a refresh_token + summary: Request an OAuth bearer token in exchange of an authorization_code or a refresh_token security: [] responses: 200: @@ -345,7 +343,6 @@ paths: - oauth2: - "read:libraries" parameters: - - $ref: "./api/parameters.yml#/Search" - $ref: "./api/parameters.yml#/ArtistOrdering" - $ref: "./api/parameters.yml#/Playable" @@ -526,7 +523,6 @@ paths: - oauth2: - "read:libraries" parameters: - - $ref: "./api/parameters.yml#/Search" - name: "artist" in: "query" @@ -694,7 +690,7 @@ paths: 200: description: "" content: - '*/*': + "*/*": schema: description: "Audio file, as binary data" type: string @@ -790,8 +786,7 @@ paths: post: tags: - "Uploads and audio content" - description: - Create a new library + description: Create a new library responses: 201: $ref: "#/components/responses/201" @@ -1031,7 +1026,7 @@ paths: 200: description: "" content: - application/rss+xml: {} + application/rss+xml: {} /api/v1/channels/{uuid}/subscribe/: parameters: @@ -1075,7 +1070,6 @@ paths: tags: - "Uploads and audio content" parameters: - - $ref: "./api/parameters.yml#/Search" - $ref: "./api/parameters.yml#/PageNumber" - $ref: "./api/parameters.yml#/PageSize" @@ -1346,7 +1340,6 @@ paths: 204: $ref: "#/components/responses/204" - ################# # User activity # ################# @@ -1406,8 +1399,7 @@ paths: get: tags: - "Other" - description: - Search artists, tracks, albums and other resources + description: Search artists, tracks, albums and other resources parameters: - $ref: "./api/parameters.yml#/Search" responses: @@ -1420,8 +1412,7 @@ paths: get: tags: - "Other" - description: - Retrieve pod-level configuration such as description or max playlist size + description: Retrieve pod-level configuration such as description or max playlist size responses: 200: description: "" @@ -1462,13 +1453,11 @@ paths: type: string description: "Input type of the setting" - /api/v1/attachments/: post: tags: - "Other" - description: - Upload a new file as an attachment that can be later associated with other objects. + description: Upload a new file as an attachment that can be later associated with other objects. responses: 201: $ref: "#/components/responses/201" diff --git a/docs/user_documentation/libraries/edit_content.md b/docs/user_documentation/libraries/edit_content.md index 8323fd23b..d23152b09 100644 --- a/docs/user_documentation/libraries/edit_content.md +++ b/docs/user_documentation/libraries/edit_content.md @@ -4,7 +4,7 @@ You can only edit content in libraries you own. {term}`Pod` admins can edit all content. ``` -You can edit library content after you have uploaded it. This is helpful if the content isn't [tagged](tag_music). +You can edit library content after you have uploaded it. This is helpful if the content isn't [tagged](./tag_music.md). ```{contents} :local: diff --git a/docs/user_documentation/subsonic/disable_subsonic.md b/docs/user_documentation/subsonic/disable_subsonic.md index ffcb1ab08..ab5814cb8 100644 --- a/docs/user_documentation/subsonic/disable_subsonic.md +++ b/docs/user_documentation/subsonic/disable_subsonic.md @@ -31,4 +31,4 @@ If you don't want to use Subsonic any more, you can disable access. This stops a ::: :::: -You're done! Subsonic apps can no longer access your account. You can re-enable the API at any time by [requesting a new password](subsonic_password). +You're done! Subsonic apps can no longer access your account. You can re-enable the API at any time by [requesting a new password](./subsonic_password.md). diff --git a/front/public/embed.html b/front/public/embed.html index 96c85a992..b02f6359f 100644 --- a/front/public/embed.html +++ b/front/public/embed.html @@ -7,7 +7,7 @@ - + Funkwhale Widget