From 5fca90c9ab36354215b7e261fca87956df99c40b Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Mon, 25 Oct 2021 12:13:19 +0200 Subject: [PATCH] Download embeds over http instead of using git submodule --- .drone.yml | 1 + .gitignore | 2 +- .gitmodules | 3 --- README.md | 1 + lemmy | 1 - src/en/administration/configuration.md | 2 +- src/en/federation/lemmy_protocol.md | 10 +++++----- update-includes.sh | 14 ++++++++++++++ 8 files changed, 23 insertions(+), 11 deletions(-) delete mode 160000 lemmy create mode 100755 update-includes.sh diff --git a/.drone.yml b/.drone.yml index cbee8ce..65697d6 100644 --- a/.drone.yml +++ b/.drone.yml @@ -13,4 +13,5 @@ steps: commands: - cargo install mdbook --git https://github.com/Ruin0x11/mdBook.git --branch localization --rev 9d8147c --force --debug + - ./update-includes.sh - mdbook build . diff --git a/.gitignore b/.gitignore index 4af85eb..aa42eee 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ book -generated +include node_modules .idea diff --git a/.gitmodules b/.gitmodules index 8009f1c..e69de29 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +0,0 @@ -[submodule "lemmy"] - path = lemmy - url = https://github.com/LemmyNet/lemmy.git diff --git a/README.md b/README.md index 45e985d..78a613b 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@ Our documentation tool [mdbook](https://github.com/rust-lang/mdBook) doesn't sup ```bash cargo install mdbook --git https://github.com/Ruin0x11/mdBook.git \ --branch localization --rev 9d8147c +./update-includes.sh # generate static page in `book` subfolder mdbook build # serve the book at `http://localhost:3000`, and rebuilds on changes diff --git a/lemmy b/lemmy deleted file mode 160000 index 149a4e0..0000000 --- a/lemmy +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 149a4e0de88f82b6378c044423bf7d628108fc86 diff --git a/src/en/administration/configuration.md b/src/en/administration/configuration.md index ca955a5..9a1b449 100644 --- a/src/en/administration/configuration.md +++ b/src/en/administration/configuration.md @@ -16,5 +16,5 @@ cd server ## Full config with default values ```hjson -{{#include ../../../lemmy/config/defaults.hjson}} +{{#include ../../../include/config/defaults.hjson}} ``` \ No newline at end of file diff --git a/src/en/federation/lemmy_protocol.md b/src/en/federation/lemmy_protocol.md index c58eee3..3a969c2 100644 --- a/src/en/federation/lemmy_protocol.md +++ b/src/en/federation/lemmy_protocol.md @@ -84,7 +84,7 @@ Sends activities to user: `Accept/Follow`, `Announce` Receives activities from user: `Follow`, `Undo/Follow`, `Create`, `Update`, `Like`, `Dislike`, `Remove` (only admin/mod), `Delete` (only creator), `Undo` (only for own actions) ```json -{{#include ../../../lemmy/crates/apub/assets/lemmy-community.json}} +{{#include ../../../include/activitypub/lemmy-community.json}} ``` | Field Name | Mandatory | Description | @@ -159,7 +159,7 @@ Receives activities from Community: `Accept/Follow`, `Announce` Sends and receives activities from/to other users: `Create/Note`, `Update/Note`, `Delete/Note`, `Undo/Delete/Note` (all those related to private messages) ```json -{{#include ../../../lemmy/crates/apub/assets/lemmy-person.json}} +{{#include ../../../include/activitypub/lemmy-person.json}} ``` | Field Name | Mandatory | Description | @@ -196,7 +196,7 @@ The user inbox is not actually implemented yet, and is only a placeholder for Ac A page with title, and optional URL and text content. The URL often leads to an image, in which case a thumbnail is included. Each post belongs to exactly one community. ```json -{{#include ../../../lemmy/crates/apub/assets/lemmy-post.json}} +{{#include ../../../include/activitypub/lemmy-post.json}} ``` | Field Name | Mandatory | Description | @@ -218,7 +218,7 @@ A page with title, and optional URL and text content. The URL often leads to an A reply to a post, or reply to another comment. Contains only text (including references to other users or communities). Lemmy displays comments in a tree structure. ```json -{{#include ../../../lemmy/crates/apub/assets/lemmy-comment.json}} +{{#include ../../../include/activitypub/lemmy-comment.json}} ``` | Field Name | Mandatory | Description | @@ -235,7 +235,7 @@ A reply to a post, or reply to another comment. Contains only text (including re A direct message from one user to another. Can not include additional users. Threading is not implemented yet, so the `inReplyTo` field is missing. ```json -{{#include ../../../lemmy/crates/apub/assets/lemmy-private-message.json}} +{{#include ../../../include/activitypub/lemmy-private-message.json}} ``` | Field Name | Mandatory | Description | diff --git a/update-includes.sh b/update-includes.sh new file mode 100755 index 0000000..abac37c --- /dev/null +++ b/update-includes.sh @@ -0,0 +1,14 @@ +#!/bin/bash +set -e + +mkdir -p include/config +mkdir -p include/activitypub +cd include/config +curl https://raw.githubusercontent.com/LemmyNet/lemmy/main/config/defaults.hjson -o defaults.hjson + +cd ../activitypub +curl https://raw.githubusercontent.com/LemmyNet/lemmy/main/crates/apub/assets/lemmy-person.json -o lemmy-person.json +curl https://raw.githubusercontent.com/LemmyNet/lemmy/main/crates/apub/assets/lemmy-community.json -o lemmy-community.json +curl https://raw.githubusercontent.com/LemmyNet/lemmy/main/crates/apub/assets/lemmy-post.json -o lemmy-post.json +curl https://raw.githubusercontent.com/LemmyNet/lemmy/main/crates/apub/assets/lemmy-comment.json -o lemmy-comment.json +curl https://raw.githubusercontent.com/LemmyNet/lemmy/main/crates/apub/assets/lemmy-private-message.json -o lemmy-private-message.json