From b99ddd2bfbca01bbe2f35a57e81b0be133317fc3 Mon Sep 17 00:00:00 2001 From: legitnull Date: Wed, 12 Apr 2023 06:29:36 -0600 Subject: [PATCH] fixed comments, added documentation --- .gitignore | 2 ++ README.md | 42 +++++++++++++++++++++++++++++++++++++++++- assets/_layout.html | 7 ++++--- dev.sh | 14 ++++++++++++++ 4 files changed, 61 insertions(+), 4 deletions(-) create mode 100644 .gitignore create mode 100644 dev.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4eeb276 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +data/ +comments.db/ \ No newline at end of file diff --git a/README.md b/README.md index 50a2480..18b5dd8 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,43 @@ H0wdy!!! feel free to commit, leave suggestions, issues, or really anything <3 +## SETUP +**For a normal user you can follow this process:** + +First clone the repo: +```bash +git clone https://git.tcp.direct/S4D/tcp-wiki.git +``` +Then you have to cd into the repo's folder and run/compile: +```bash +cd tcp-wiki/src +go run . +``` +Then you goto your browser and visit: http://127.0.0.1:8080/ + +**For a develeper setup you can follow this process:** + +First clone the repo: +```bash +git clone ssh://git@git.tcp.direct:2222/S4D/tcp-wiki.git +``` +Then cd and run dev.sh +```bash +cd tcp-wiki +bash dev.sh +``` +Then you goto your browser and visit: http://127.0.0.1:8080/ + +This method just adds in some handy symlinks for development purposes + +### Use with your own repo? + +All you have to do is modify the main.go file: +```go +const repoURL = "https://git.tcp.direct/S4D/tcp-wiki.git" +``` +Change this line to your repo link, and enjoy! + ## TODO - [ ] MANY FUCKING THINGS @@ -13,14 +50,17 @@ feel free to commit, leave suggestions, issues, or really anything <3 - [ ] last edited - [ ] last editor/commit - [ ] pgp signed intergration -- [-] comments using bitcast - almost there! - generated in comments.db/ +- [x] comments using bitcask - generated in comments.db/ - [ ] verification - no login pgp - [ ] captcha - [ ] sub rating system - [ ] sort by date etc + - [ ] reply to replies + - [ ] set security controls per page - [ ] dynamically generated links for all avaiable pages - [ ] sitemap - [ ] anti robot shit here + - [ ] acual working pages!? - [ ] post quantum intergration and verification - [ ] BUILD UP THAT MARKDOWN SUPPORT - [ ] fix whatever i did to fuck up design/layout/css??? \ No newline at end of file diff --git a/assets/_layout.html b/assets/_layout.html index ef5198a..fab327b 100644 --- a/assets/_layout.html +++ b/assets/_layout.html @@ -28,20 +28,21 @@

Comments

{{ range .Comments }}
-

{{ .Body }}

-

{{ .Author }} at {{ .CreatedAt }}

+

{{ .Content }}

+

{{ .Author }} at {{ .Date }}

{{ end }}
+
- +
diff --git a/dev.sh b/dev.sh new file mode 100644 index 0000000..bacc516 --- /dev/null +++ b/dev.sh @@ -0,0 +1,14 @@ +#/bin/bash +# this sets up super annoying shit like hard symlinks and whatever else +# Eventually front end will be in a seperate branch for production +# but for now we can manage by editing via hardlinks. +# This sets up your local readme as the main page and the files in assets as public +cd src && go run . +rm ../data/assets/* +ln ../assets/_layout.html ../data/assets/_layout.html +ln ../assets/main.css ../data/assets/main.css +rm ../data/README.md +ln ./README.md ../data/README.md +echo "Developer setup ready!" +echo "Goto: http://127.0.0.1:8080" +