From 6990bbee27dc65e66dee75093b47ae5b8045c672 Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Thu, 20 Apr 2023 22:03:12 +0200 Subject: [PATCH] Fix dead links, add CI check --- .woodpecker.yml | 8 +++- src/en/about/about.md | 6 +-- src/en/about/features.md | 2 +- src/en/administration/first_steps.md | 6 +-- src/en/administration/install_docker.md | 2 +- src/en/administration/troubleshooting.md | 4 +- .../client_development/client_development.md | 1 - src/en/client_development/custom_frontend.md | 2 +- src/en/client_development/rust_api.md | 4 +- src/en/code_of_conduct.md | 4 +- src/en/contributing/contributing.md | 4 +- src/en/contributing/resources.md | 3 +- src/en/federation/administration.md | 40 ------------------- src/en/federation/lemmy_protocol.md | 2 +- src/en/federation/overview.md | 2 +- 15 files changed, 28 insertions(+), 62 deletions(-) delete mode 100644 src/en/federation/administration.md diff --git a/.woodpecker.yml b/.woodpecker.yml index 0a4b511..aaab91a 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -5,13 +5,19 @@ clone: recursive: true submodule_update_remote: true pipeline: + dead_links: + image: becheran/mlc:latest + commands: + - mlc src/en --ignore-links "*localhost*" --ignore-links "*127.0.0.1*" --ignore-links /api + check_formatting: image: alpine:3 commands: - apk add prettier --repository=https://dl-cdn.alpinelinux.org/alpine/edge/testing - prettier -c src + check_documentation_build: - image: rust:1.61-slim-buster + image: rust:1.68-slim-bullseye commands: - cargo install mdbook --git https://github.com/Ruin0x11/mdBook.git --branch localization --rev 9d8147c --force --debug diff --git a/src/en/about/about.md b/src/en/about/about.md index 0df9b6d..38b5a11 100644 --- a/src/en/about/about.md +++ b/src/en/about/about.md @@ -2,9 +2,9 @@ ## About The Project -| Front Page | Post | -| ---------------------------------------------- | ---------------------------------------------- | -| ![main screen](/docs/en/about/main_screen.png) | ![chat screen](/docs/en/about/chat_screen.png) | +| Front Page | Post | +| ------------------------------- | ------------------------------- | +| ![main screen](main_screen.png) | ![chat screen](chat_screen.png) | [Lemmy](https://github.com/LemmyNet/lemmy) is similar to sites like [Reddit](https://reddit.com), [Lobste.rs](https://lobste.rs), [Raddle](https://raddle.me), or [Hacker News](https://news.ycombinator.com/): you subscribe to forums you're interested in, post links and discussions, then vote, and comment on them. Behind the scenes, it is very different; anyone can easily run a server, and all these servers are federated (think email), and connected to the same universe, called the [Fediverse](https://en.wikipedia.org/wiki/Fediverse). diff --git a/src/en/about/features.md b/src/en/about/features.md index 2d7c396..f4b8411 100644 --- a/src/en/about/features.md +++ b/src/en/about/features.md @@ -1,6 +1,6 @@ # Features -- Open source, [AGPL License](/LICENSE). +- Open source, [AGPL License](https://github.com/LemmyNet/lemmy/blob/main/LICENSE). - Self hostable, easy to deploy. - Comes with [Docker](#docker) and [Ansible](#ansible). - Clean, mobile-friendly interface. diff --git a/src/en/administration/first_steps.md b/src/en/administration/first_steps.md index 3ad1799..e724a51 100644 --- a/src/en/administration/first_steps.md +++ b/src/en/administration/first_steps.md @@ -1,14 +1,14 @@ # Administration First Steps -After you successfully installed Lemmy either [manually with Docker](administration/install_docker.html) or [automatically with Ansible](administration/install_ansible.html) here are some recommendations for a new administrator of a Lemmy server. +After you successfully installed Lemmy either [manually with Docker](install_docker.md) or [automatically with Ansible](install_ansible.md) here are some recommendations for a new administrator of a Lemmy server. ## Admin Settings The first thing to do is to go to your admin panel, which can be found by clicking on the cog at the top right next to the search icon. Here you can define a description for your site, so that people know if it is about one specific topic or if all subjects are welcome. You can also add an icon and a banner that define your server, it can for example be the logo of your organization. -Take the time to browse through the entire page to discover the different options you have to customize your Lemmy instance, on the same page you can edit your [configuration file](configuration.html), where you can find information about your database, the email used by the server, the federation options or who is the main administrator. +Take the time to browse through the entire page to discover the different options you have to customize your Lemmy instance, on the same page you can edit your [configuration file](configuration.md), where you can find information about your database, the email used by the server, the federation options or who is the main administrator. -It is always good to define another administrator than yourself, in case it is necessary to take actions while you take your best nap. Take a look at the [moderation guide](../moderation/moderation.html) for more information on how to do this. +It is always good to define another administrator than yourself, in case it is necessary to take actions while you take your best nap. Take a look at the [moderation guide](../moderation/moderation.md) for more information on how to do this. ## Check that everything is working properly diff --git a/src/en/administration/install_docker.md b/src/en/administration/install_docker.md index 763cb23..c7cc1f8 100644 --- a/src/en/administration/install_docker.md +++ b/src/en/administration/install_docker.md @@ -9,7 +9,7 @@ cd /lemmy # download default config files wget https://raw.githubusercontent.com/LemmyNet/lemmy/release/v0.17/docker/prod/docker-compose.yml -wget https://raw.githubusercontent.com/LemmyNet/lemmy/release/v0.17/docker/lemmy.hjson +wget https://raw.githubusercontent.com/LemmyNet/lemmy/release/v0.17/docker/prod/lemmy.hjson # Set correct permissions for pictrs folder mkdir -p volumes/pictrs diff --git a/src/en/administration/troubleshooting.md b/src/en/administration/troubleshooting.md index 26b6186..793e20f 100644 --- a/src/en/administration/troubleshooting.md +++ b/src/en/administration/troubleshooting.md @@ -2,7 +2,7 @@ Different problems that can occur on a new instance, and how to solve them. -Many Lemmy features depend on a correct reverse proxy configuration. Make sure yours is equivalent to our [nginx config](https://github.com/LemmyNet/lemmy/blob/main/ansible/templates/nginx.conf). +Many Lemmy features depend on a correct reverse proxy configuration. Make sure yours is equivalent to our [nginx config](https://github.com/LemmyNet/lemmy-ansible/blob/main/templates/nginx.conf). ## General @@ -62,7 +62,7 @@ curl -H "Accept: application/activity+json" https://your-instance.com/comment/12 ### Fetching remote objects works, but posting/commenting in remote communities fails -Check that [federation is allowed on both instances](../federation/administration.md#instance-allowlist-and-blocklist). +Check that [federation is allowed on both instances](federation_getting_started.md). Also ensure that the time is accurately set on your server. Activities are signed with a timestamp, and will be discarded if it is off by more than 10 seconds. diff --git a/src/en/client_development/client_development.md b/src/en/client_development/client_development.md index fe7edbe..96f37fe 100644 --- a/src/en/client_development/client_development.md +++ b/src/en/client_development/client_development.md @@ -2,4 +2,3 @@ - [API docs](/api) - [HTTP API extras](http_api_extras.md) -- [Theming Guide](theming.md) diff --git a/src/en/client_development/custom_frontend.md b/src/en/client_development/custom_frontend.md index 19524c6..e5a59be 100644 --- a/src/en/client_development/custom_frontend.md +++ b/src/en/client_development/custom_frontend.md @@ -1,6 +1,6 @@ # Creating a Custom Frontend -The backend and frontend are completely decoupled, and run in independent Docker containers. They only communicate over the [Lemmy API](api_reference.md), which makes it quite easy to write alternative frontends. +The backend and frontend are completely decoupled, and run in independent Docker containers. They only communicate over the [Lemmy API](client_development.md), which makes it quite easy to write alternative frontends. This creates a lot of potential for custom frontends, which could change much of the design and user experience of Lemmy. For example, it would be possible to create a frontend in the style of a traditional forum like [phpBB](https://www.phpbb.com/), or a question-and-answer site like [stackoverflow](https://stackoverflow.com/). All without having to think about database queries, authentification or ActivityPub, which you essentially get for free. diff --git a/src/en/client_development/rust_api.md b/src/en/client_development/rust_api.md index 56ab6a2..e02a6cc 100644 --- a/src/en/client_development/rust_api.md +++ b/src/en/client_development/rust_api.md @@ -33,5 +33,5 @@ pub fn list_posts() -> GetPostsResponse { You can also look at the following real-world projects as examples: -- [lemmyBB](https://github.com/Nutomic/lemmyBB) -- [lemmy-stats-crawler](https://yerbamate.ml/LemmyNet/lemmy-stats-crawler) +- [lemmyBB](https://github.com/LemmyNet/lemmyBB) +- [lemmy-stats-crawler](https://github.com/LemmyNet/lemmy-stats-crawler) diff --git a/src/en/code_of_conduct.md b/src/en/code_of_conduct.md index e399fcd..e7a12fc 100644 --- a/src/en/code_of_conduct.md +++ b/src/en/code_of_conduct.md @@ -11,7 +11,7 @@ [**Message the Moderation Team on Mastodon**](https://mastodon.social/@LemmyDev) -[**Email The Moderation Team**](mailto:contact@lemmy.ml) +[**Email The Moderation Team**](mailto:contact@join-lemmy.org) ## Moderation @@ -30,6 +30,6 @@ In the Lemmy community we strive to go the extra step to look out for each other And if someone takes issue with something you said or did, resist the urge to be defensive. Just stop doing what it was they complained about and apologize. Even if you feel you were misinterpreted or unfairly accused, chances are good there was something you could’ve communicated better — remember that it’s your responsibility to make others comfortable. Everyone wants to get along and we are all here first and foremost because we want to talk about cool technology. You will find that people will be eager to assume good intent and forgive as long as you earn their trust. -The enforcement policies listed above apply to all official Lemmy venues; including git repositories under [github.com/LemmyNet](https://github.com/LemmyNet) and [yerbamate.ml/LemmyNet](https://yerbamate.ml/LemmyNet), the [Matrix channel](https://matrix.to/#/!BZVTUuEiNmRcbFeLeI:matrix.org); [lemmy.ml](https://lemmy.ml) and other instances under that domain. For other projects adopting the Lemmy Code of Conduct, please contact the maintainers of those projects for enforcement. If you wish to use this code of conduct for your own project, consider explicitly mentioning your moderation policy or making a copy with your own moderation policy so as to avoid confusion. +The enforcement policies listed above apply to all official Lemmy venues; including git repositories under [github.com/LemmyNet](https://github.com/LemmyNet) and [git.join-lemmy.org/LemmyNet](https://git.join-lemmy.org/LemmyNet/), the [Matrix chat](https://matrix.to/#/#lemmy-space:matrix.org); [lemmy.ml](https://lemmy.ml) and other instances under that domain. For other projects adopting the Lemmy Code of Conduct, please contact the maintainers of those projects for enforcement. If you wish to use this code of conduct for your own project, consider explicitly mentioning your moderation policy or making a copy with your own moderation policy so as to avoid confusion. Adapted from the [Rust Code of Conduct](https://www.rust-lang.org/policies/code-of-conduct), which is based on the [Node.js Policy on Trolling](http://blog.izs.me/post/30036893703/policy-on-trolling) as well as the [Contributor Covenant v1.3.0](https://www.contributor-covenant.org/version/1/3/0/). diff --git a/src/en/contributing/contributing.md b/src/en/contributing/contributing.md index 590d96b..ed3e5fd 100644 --- a/src/en/contributing/contributing.md +++ b/src/en/contributing/contributing.md @@ -5,12 +5,12 @@ Information about contributing to Lemmy, whether it is translating, testing, des ## Issue tracking / Repositories - [GitHub (for issues and pull requests)](https://github.com/LemmyNet/lemmy) -- [Gitea (only for pull requests)](https://yerbamate.ml/LemmyNet/lemmy) +- [Gitea (only for pull requests)](https://git.join-lemmy.org/LemmyNet/lemmy/) - [Codeberg](https://codeberg.org/LemmyNet/lemmy) ## Translating -Check out [Lemmy's Weblate](https://weblate.yerbamate.ml/projects/lemmy/) for translations. You can also help by [translating this documentation](https://github.com/LemmyNet/lemmy-docs#adding-a-new-language). +Check out [Lemmy's Weblate](https://weblate.join-lemmy.org/projects/lemmy/) for translations. You can also help by [translating this documentation](https://github.com/LemmyNet/lemmy-docs#adding-a-new-language). ## Architecture diff --git a/src/en/contributing/resources.md b/src/en/contributing/resources.md index 4ebd1c1..2bdfb5a 100644 --- a/src/en/contributing/resources.md +++ b/src/en/contributing/resources.md @@ -37,6 +37,7 @@ ## Examples and Libraries +- [activitypub-federation-rust library](https://crates.io/crates/activitypub-federation) - [ActivityPub example server](https://github.com/tOkeshu/activitypub-example) - [ActivityStreams crate](https://docs.rs/activitystreams/) -- [HTTP Signatures crate](https://git.asonix.dog/Aardwolf/http-signature-normalization) +- [HTTP Signatures crate](https://git.asonix.dog/asonix/http-signature-normalization) diff --git a/src/en/federation/administration.md b/src/en/federation/administration.md deleted file mode 100644 index 60e7a26..0000000 --- a/src/en/federation/administration.md +++ /dev/null @@ -1,40 +0,0 @@ -# Federation Administration - -Note: ActivityPub federation is still under development. We recommend that you only enable it on test instances for now. - -To enable federation, change the setting `federation.enabled` to `true` in `lemmy.hjson`, and restart Lemmy. - -Federation does not start automatically, but needs to be triggered manually through the search. To do this you have to enter a reference to a remote object, such as: - -- `!main@lemmy.ml` (Community) -- `@nutomic@lemmy.ml` (User) -- `https://lemmy.ml/c/programming` (Community) -- `https://lemmy.ml/u/nutomic` (User) -- `https://lemmy.ml/post/123` (Post) -- `https://lemmy.ml/comment/321` (Comment) - -For an overview of how federation in Lemmy works on a technical level, check out our [Federation Overview](contributing_federation_overview.md). - -## Federation Modes - -Through the combination of federation config options, there are a couple different federation modes, differing in their restrictiveness. For now we don't recommend to use open federation, because moderation tools are lacking and there might be security problems in the federation code. Open federation should be fine for test instances and smaller instances, but bigger instances should prefer to use a more closed federation. - -It is important to note that these settings only affect sending and receiving of data between instances. If allow federation with a certain instance, and then remove it from the allowlist, this will not affect previously federated data. These communities, users, posts and comments will still be shown. They will just not be updated anymore. And even if an instance is blocked, it can still fetch and display public data from your instance. - -### Using allowlist, strict_allowlist = true - -The most strict mode. Lemmy will only federate with instances from the allowlist, and block everything else. This includes all posts, comments, votes and private messages, you will only see them if the author is on an allowed instance. This means that remote communities or threads can be incomplete, as your instance will block any posts or comments whose author is not on an allowed instance. - -The blocklist is ignored in this mode. - -### Using allowlist, strict_allowlist = false - -This mode is a bit more open than the one above. For local communities, the behaviour is identical, only users from allowed instances can post, comment or vote. The difference is with remote communities. The allowlist doesn't apply to them, so you will see all posts, comments and votes in remote communities (unless the author's instance is blocked). Private messages can be sent by any remote user that isn't blocked. - -If a blocklist is set, all communication with the blocked instances will be prevented, no matter in which context. - -### Using only blocklist - -If no allowlist is specified, Lemmy will federate with any instance. This is the most open mode, and potentially the most risky, as someone could create a malicious instance, and immediately send spam or other problematic content to your instance. You can use the blocklist to prevent federation with such instances one by one. - -`strict_allowlist` is ignored in this case. diff --git a/src/en/federation/lemmy_protocol.md b/src/en/federation/lemmy_protocol.md index 295fbbc..8df88f5 100644 --- a/src/en/federation/lemmy_protocol.md +++ b/src/en/federation/lemmy_protocol.md @@ -4,7 +4,7 @@ The Lemmy Protocol (or Lemmy Federation Protocol) is a subset of the [ActivityPu This document is targeted at developers who are familiar with the ActivityPub and ActivityStreams protocols. It gives a detailed outline of the actors, objects and activities used by Lemmy. -Before reading this, have a look at our [Federation Overview](contributing_federation_overview.md) to get an idea how Lemmy federation works on a high level. +Before reading this, have a look at our [Federation Overview](overview.md) to get an idea how Lemmy federation works on a high level. diff --git a/src/en/federation/overview.md b/src/en/federation/overview.md index 6e5203e..e8ccb3c 100644 --- a/src/en/federation/overview.md +++ b/src/en/federation/overview.md @@ -1,6 +1,6 @@ # Federation Overview -This document is for anyone who wants to know how Lemmy federation works, without being overly technical. It is meant provide a high-level overview of ActivityPub federation in Lemmy. If you are implementing ActivityPub yourself and want to be compatible with Lemmy, read our [ActivityPub API outline](contributing_apub_api_outline.md). +This document is for anyone who wants to know how Lemmy federation works, without being overly technical. It is meant provide a high-level overview of ActivityPub federation in Lemmy. If you are implementing ActivityPub yourself and want to be compatible with Lemmy, read our [ActivityPub Protocol](lemmy_protocol.md). ## Documentation conventions