From 6d2f85f981eeaa7a84de1d25d93dfefc3795bf32 Mon Sep 17 00:00:00 2001 From: hex Date: Wed, 14 Aug 2024 02:16:09 +0200 Subject: [PATCH 1/6] fix: static folder not getting transferred --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index c61800d..2a34dc9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,7 +18,8 @@ RUN cp -r /tmp/*.json /tmp/build/ && \ cp -r /tmp/src/views /tmp/build/src/ && \ cp -r /tmp/data.template /tmp/build && \ cp -r /tmp/scripts/docker_bootstrapper.sh /tmp/build/bootstrapper.sh && \ - cp -r /tmp/scripts/docker_run.sh /tmp/build/runner.sh + cp -r /tmp/scripts/docker_run.sh /tmp/build/runner.sh && \ + cp -r /tmp/static /tmp/build/ # The final version of disseminate is now in /tmp/build From ac09290b9313ce61b88d86b899447d77dedc07c2 Mon Sep 17 00:00:00 2001 From: hexlocation Date: Mon, 18 Nov 2024 11:58:54 +0100 Subject: [PATCH 2/6] rename lol --- Dockerfile | 8 +++--- README.md | 59 ++++++++++++++-------------------------- docker-compose.build.yml | 2 +- docker-compose.yml | 6 ++-- 4 files changed, 28 insertions(+), 47 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2a34dc9..190b9be 100644 --- a/Dockerfile +++ b/Dockerfile @@ -40,11 +40,11 @@ RUN deluser node # We want to run disseminate as a non-root user. ARG UID=1000 ARG GID=1000 -RUN addgroup -g $GID disseminate && \ - adduser --home /app --uid $UID -G disseminate --disabled-password disseminate +RUN addgroup -g $GID jabe && \ + adduser --home /app --uid $UID -G jabe --disabled-password jabe # Give our non-root user access to /app -RUN chown -R disseminate:disseminate /app +RUN chown -R jabe:jabe /app # Installing bash, mostly for debugging. RUN apk add bash @@ -53,7 +53,7 @@ RUN apk add bash COPY --chown=$UID:$GID --from=compiled /tmp/build/ /app RUN chown -R $UID:$GID /app # Switching to user. -USER disseminate +USER jabe # Installing the dependencies. RUN yarn install --production diff --git a/README.md b/README.md index 55ac0d7..2619dfd 100644 --- a/README.md +++ b/README.md @@ -1,56 +1,37 @@ -

Disseminate

+

JABE - Just Another Blogging Engine

- Buy Me A Coffee status-badge
+## A short introduction -## A short introduction. - -*Disseminate* is a blogging platform designed to be lightweight, easy to use & powered by Markdown. +_JABE_ is a blogging platform designed to be lightweight, easy to use & powered by Markdown. It stems from an issue i've come across, where no blogging platform i could find was: -* easy to deploy. -* has fast loading times. -* simple enough for my -10 iq brain. - -## State of Project - -Disseminate is a work-in-progress, although it is in a more than usable state. - -## Blogs using Disseminate - -* [My own :)](https://penhub.nl) +- easy to deploy. +- has fast loading times. +- simple enough for my -10 iq brain. -## Opening an issue. - -Registrations are open again! Unfortunately however, i have to manually accept each account. -Please contact me via: - -* email (hex@clatter.cc) -* matrix (@hex:penhub.nl) -* telegram (@inimitableX) -* discord (@hex.maybe) +## State of Project + +JABE is a work-in-progress, although it is in a more than usable state. + +## Blogs using Disseminate + +- [My own :)](https://blog.iwakura.rip) + +## To-do -to get your account accepted. - -## To-do - - [x] [HIGH] Server-side parsing. - [x] [MEDIUM] Docker build system. -- [x] [MEDIUM] Proper metadata (title, date etc). +- [x] [MEDIUM] Proper metadata (title, date etc). - [x] [MEDIUM] **Automated** prebuilt docker images. - [ ] [LOW] Caching for faster load times. - [ ] [LOW] Interface for blog management (web ui?). - [ ] [LOW] Alternative frontend (solution)? (EJS is pretty primitive!) - -## License - -Disseminate uses the GNU GPLv3 license. The two important points (in my opinion) are as follows: -* Any modifications made to disseminate should be open sourced. -* Any projects forking or using disseminate source code must be released under the same license (GNU GPLv3). - -Keep in mind that these two points are important **in my opinion**! Everything stated in the GNU GPLv3 license still applies. -(Paid) themes do *not* have to be open-sourced. + +## License + +JABE uses the GNU GPLv3 license. diff --git a/docker-compose.build.yml b/docker-compose.build.yml index d555337..9e35729 100644 --- a/docker-compose.build.yml +++ b/docker-compose.build.yml @@ -1,5 +1,5 @@ services: - disseminate: + jabe: build: context: . args: diff --git a/docker-compose.yml b/docker-compose.yml index efff7f3..3e88acd 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,8 +1,8 @@ -version: '3' +version: "3" services: - disseminate: + jabe: container_name: disseminate - image: git.clatter.cc/hexlocation/disseminate + image: git.iwakura.rip/hex/jabe:stable-latest volumes: - ./data:/app/data # bind mount is recommended. ports: From a004d10ed4bd6091e96e3b4fc4c3461ad5c79c6b Mon Sep 17 00:00:00 2001 From: hexlocation Date: Mon, 18 Nov 2024 12:07:35 +0100 Subject: [PATCH 3/6] some more renaming --- .woodpecker.yaml | 14 ++++++++------ README.md | 2 +- data.template/posts/welcome.md | 14 +++++++------- docker-compose.yml | 2 +- package-lock.json | 2 +- scripts/docker_bootstrapper.sh | 4 ++-- scripts/docker_build.sh | 6 +++--- scripts/docker_test.sh | 4 ++-- scripts/docker_test_bash.sh | 4 ++-- src/views/themes/default/footer.ejs | 2 +- src/views/themes/iwakura/footer.ejs | 2 +- 11 files changed, 29 insertions(+), 27 deletions(-) diff --git a/.woodpecker.yaml b/.woodpecker.yaml index 6f9c873..e6e5ffa 100644 --- a/.woodpecker.yaml +++ b/.woodpecker.yaml @@ -1,18 +1,20 @@ # yes when: - branch: ['dev', 'stable'] + branch: ["dev", "stable"] event: ["push", "manual"] steps: - name: build image: woodpeckerci/plugin-docker-buildx - secrets: [ gitpat ] + secrets: [gitpat] settings: - repo: git.iwakura.rip/hex/disseminate + repo: git.iwakura.rip/hex/jabe platforms: linux/amd64 dockerfile: Dockerfile - tags: ["${CI_COMMIT_BRANCH}-latest","${CI_COMMIT_BRANCH}-${CI_COMMIT_SHA}"] + tags: + ["${CI_COMMIT_BRANCH}-latest", "${CI_COMMIT_BRANCH}-${CI_COMMIT_SHA}"] username: hex - registry: git.iwakura.rip + registry: + git.iwakura.rip #insecure: true - password: + password: from_secret: gitpat diff --git a/README.md b/README.md index 2619dfd..5fbd983 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ It stems from an issue i've come across, where no blogging platform i could find JABE is a work-in-progress, although it is in a more than usable state. -## Blogs using Disseminate +## Blogs using JABE - [My own :)](https://blog.iwakura.rip) diff --git a/data.template/posts/welcome.md b/data.template/posts/welcome.md index 27c686c..d6e1d7b 100644 --- a/data.template/posts/welcome.md +++ b/data.template/posts/welcome.md @@ -1,13 +1,13 @@ -# Welcome to Disseminate! - +# Welcome to JABE + Welcome, user! We are glad to have you on board! To start, find the "posts" directory in the data folder you have created, or mounted using docker. -This is the same directory you put your config file in. +This is the same directory you put your config file in. + +Create a file named "hello.md", and start the file with: -Create a file named "hello.md", and start the file with: ``` # [Your Title] -``` - -Now you can start writing blog posts! +``` +Now you can start writing blog posts! diff --git a/docker-compose.yml b/docker-compose.yml index 3e88acd..55450fc 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ version: "3" services: jabe: - container_name: disseminate + container_name: jabe image: git.iwakura.rip/hex/jabe:stable-latest volumes: - ./data:/app/data # bind mount is recommended. diff --git a/package-lock.json b/package-lock.json index 69a3a40..7b8d0bd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,5 @@ { - "name": "disseminate", + "name": "JABE", "lockfileVersion": 3, "requires": true, "packages": { diff --git a/scripts/docker_bootstrapper.sh b/scripts/docker_bootstrapper.sh index 70621f1..6952a67 100755 --- a/scripts/docker_bootstrapper.sh +++ b/scripts/docker_bootstrapper.sh @@ -1,4 +1,4 @@ -cat << EOF +cat < - powered by Disseminate + powered by JABE diff --git a/src/views/themes/iwakura/footer.ejs b/src/views/themes/iwakura/footer.ejs index 4ea0579..3147563 100644 --- a/src/views/themes/iwakura/footer.ejs +++ b/src/views/themes/iwakura/footer.ejs @@ -1,3 +1,3 @@ From d15c5557aa90a8268294d9ffd3a40313f3d181fb Mon Sep 17 00:00:00 2001 From: hexlocation Date: Mon, 18 Nov 2024 12:12:32 +0100 Subject: [PATCH 4/6] fix --- .woodpecker.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.woodpecker.yaml b/.woodpecker.yaml index e6e5ffa..8778427 100644 --- a/.woodpecker.yaml +++ b/.woodpecker.yaml @@ -5,7 +5,6 @@ when: steps: - name: build image: woodpeckerci/plugin-docker-buildx - secrets: [gitpat] settings: repo: git.iwakura.rip/hex/jabe platforms: linux/amd64 From 73b44bf5e937b631d0e9af6b0a20106a1d43d102 Mon Sep 17 00:00:00 2001 From: hexlocation Date: Mon, 18 Nov 2024 13:55:15 +0100 Subject: [PATCH 5/6] fix blockquote --- src/views/themes/iwakura/global-style.ejs | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/src/views/themes/iwakura/global-style.ejs b/src/views/themes/iwakura/global-style.ejs index 5648484..3a0e4c3 100644 --- a/src/views/themes/iwakura/global-style.ejs +++ b/src/views/themes/iwakura/global-style.ejs @@ -12,12 +12,30 @@ margin: auto; width: 50%; } + blockquote { + margin-left: 0; + padding-left: 5px; + margin-right: 0px; + color: gray; + } + blockquote p { + padding-left: 5px; + <% if(config.hasOwnProperty("themeOpts") && config.themeOpts.hasOwnProperty("accentColor")) { %> + border-left: 3px solid <%= config.themeOpts.accentColor %>; + <% } else { %> + border-left: 3px solid white; + <% } %> + + } + blockquote p { + display: inline; + } code { font-family: "Source Code Pro"; padding-left: 2px; padding-right: 2px; - border: 1px #2e2e2e solid; - background-color: #2e2e2e; + border: 1px #111111 solid; + background-color: #111111; border-radius: 5px; } hr { From 98732b5867c87d7c9ade945b3a9814d8cd0ad4b6 Mon Sep 17 00:00:00 2001 From: hexlocation Date: Mon, 18 Nov 2024 14:10:07 +0100 Subject: [PATCH 6/6] some more fixes... --- src/views/themes/iwakura/global-style.ejs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/views/themes/iwakura/global-style.ejs b/src/views/themes/iwakura/global-style.ejs index 3a0e4c3..d7fc6d9 100644 --- a/src/views/themes/iwakura/global-style.ejs +++ b/src/views/themes/iwakura/global-style.ejs @@ -14,7 +14,7 @@ } blockquote { margin-left: 0; - padding-left: 5px; + padding-left: 10px; margin-right: 0px; color: gray; } @@ -25,18 +25,22 @@ <% } else { %> border-left: 3px solid white; <% } %> - } blockquote p { display: inline; } - code { + code, pre { font-family: "Source Code Pro"; padding-left: 2px; padding-right: 2px; border: 1px #111111 solid; background-color: #111111; border-radius: 5px; + white-space: pre-wrap; + word-wrap: break-word; + width: auto !important; + left: 0; + right: 0; } hr { color: white; @@ -59,6 +63,8 @@ <% } %> } #post-content { + word-wrap: break-word; + white-space: normal; font-family: "Arial"; } a {