aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Laprade <jesselaprade@gmail.com>2021-05-16 09:36:19 -0400
committerJesse Laprade <jesselaprade@gmail.com>2021-05-16 09:36:19 -0400
commit661df9556f492eafde8a1355f0e5d2bfce136c10 (patch)
tree0da7d419787838a4b58ed24951028d0d90c9329f
parent98208634eeb69dc5dbddc9da2fdd63e1efdc2a1e (diff)
downloadsprout-661df9556f492eafde8a1355f0e5d2bfce136c10.tar.gz
sprout-661df9556f492eafde8a1355f0e5d2bfce136c10.tar.bz2
sprout-661df9556f492eafde8a1355f0e5d2bfce136c10.zip
Improved readme and made the config file a little easier to parse with your eyes
-rw-r--r--README.md188
-rw-r--r--sprout.rkt34
2 files changed, 159 insertions, 63 deletions
diff --git a/README.md b/README.md
index b7416fa..32e05a6 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
# sprout
-an interface for writing and managing my weed.
+a tool that manages an rss-only blog.
probably the ugliest code base, interface, and documentation you'll ever see.
@@ -12,11 +12,19 @@ probably the ugliest code base, interface, and documentation you'll ever see.
* [what's a web feed?](#whats-a-web-feed)
* [why not just make a regular blog post?](#why-not-just-make-a-regular-blog-post)
* [why over RSS?](#why-over-rss)
-* [system setup](#system-setup)
- * [requirements](#requirements)
- * [install sprout on your local machine](#install-sprout-on-your-local-machine)
- * [prepare your server](#prepare-your-server)
-* [for tilde.town users!](#for-tildetown-users)
+* [setting up sprout](#setting-up-sprout)
+ * [setting up sprout: for server owners](#setting-up-sprout-for-server-owners)
+ * [requirements](#requirements)
+ * [installing sprout](#installing-sprout)
+ * [setting up sprout: for tilde.town users](#setting-up-sprout-for-tildetown-users)
+ * [requirements](#requirements-1)
+ * [installing sprout](#installing-sprout-1)
+* [configuring sprout](#configuring-sprout)
+ * [configuring sprout: for server owners](#configuring-sprout-for-server-owners)
+ * [setting up your server](#setting-up-your-server)
+ * [setting up sprout on your local machine](#setting-up-sprout-on-your-local-machine)
+ * [configuring sprout: for tilde.town users](#configuring-sprout-for-tildetown-users)
+ * [setting up sprout on tilde.town](#setting-up-sprout-on-tildetown)
* [todos](#todos)
<!-- vim-markdown-toc -->
@@ -46,53 +54,83 @@ something that someone can just browse to with an internet browser.
so many readers for rss exist nowadays, and it's a great way to keep things
decentralized.
-## system setup
+## setting up sprout
-**warning: i am not liable for any damage or data loss that may occur when using
-sprout or following these procedures**
+sprout generates an rss feed of of your blog posts, and can publish them to a
+local or remote location. you can choose where you you publish your posts.
-this section will guide you through installing sprout on your local machine, and
-preparing your server, where you'll host your weed.
+following one of the sections below:
-the following examples will be used in the sections below:
+* [setting up sprout: for server owners](#setting-up-sprout-for-server-owners)
+* [setting up sprout: for tilde.town users](#setting-up-sprout-for-tildetown-users)
-* server username: `m455`
-* hostname: `m455.casa`
-* url: `m455.casa`
-* nginx site: `m455.casa`
+### setting up sprout: for server owners
-### requirements
+this section guides you through setting up sprout on your local machine. the
+setup installs sprout into `/usr/local/bin`.
+
+#### requirements
* racket
* rsync
-### install sprout on your local machine
-
-sprout will exist on your local machine. sprout will create a directory at
-`~/.weed`, where your posts will be stored.
+#### installing sprout
-follow the steps below to install sprout on your local machine:
+follow the steps below to install sprout:
1. run `git clone https://git.m455.casa/m455/sprout`
2. run `cd sprout`
3. run `make install` as root
-4. run `sprout`
-5. type `y` when prompted
-6. type `s` to change your settings
-### prepare your server
+### setting up sprout: for tilde.town users
+
+this section guides you through setting up sprout on tilde.town. the setup
+installs sprout into `~/.local/bin`.
+
+#### requirements
+
+* racket
+* rsync
+
+#### installing sprout
+
+follow the steps below to install sprout:
+
+1. run `git clone https://git.m455.casa/m455/sprout`
+2. run `cd sprout`
+3. run `mkdir -p ~/.local/bin`
+3. run `make install DESTDIR=~/.local/bin`
+
+## configuring sprout
+
+sprout comes with a default configuration file that you need to change,
+depending on your use case.
+
+following one of the sections below:
+
+* [configuring sprout: for server owners](#configuring-sprout-for-server-owners)
+* [configuring sprout: for tilde.town users](#configuring-sprout-for-tildetown-users)
+
+### configuring sprout: for server owners
+
+you need to set up your server, and then configure sprout, so you can
+publish your posts to your server.
+
+this guide assumes you have the following on your server:
+
+* nginx
+* systemd
+* root access to your server
-you'll need a place on your server to contain your weed, which is just an rss
-file. this section assumes you have root access and you are using nginx as your
-web server.
+#### setting up your server
-follow the steps below to prepare your server:
+follow the steps below as the root user:
-1. as root, run `mkdir -p /var/www/weed`
-2. as root, run `chown -R m455:m455 /var/www/weed`
-3. as root, run `chmod -R 755 /var/www/weed`
-4. as root, add the following lines to your `server {}` block in
- `/etc/nginx/sites-available/m455.casa`:
+1. run `mkdir -p /var/www/weed`
+2. run `chown -R username:username /var/www/weed`
+3. run `chmod -R 755 /var/www/weed`
+4. add the following to your `server {}` block in
+ `/etc/nginx/sites-available/example.com`:
```
location /weed {
@@ -100,20 +138,80 @@ follow the steps below to prepare your server:
index weed.rss;
}
```
-5. restart nginx
-## for tilde.town users!
+5. run `ln -s /etc/nginx/sites-available/example.com
+ /etc/nginx/sites-enabled/example.com`
+6. as root, run `systemctl restart nginx`
-follow the steps below on tilde.town:
+#### setting up sprout on your local machine
+
+sprout creates the following directory structure in your home directory:
+
+```
+.weed/
+├── build/
+├── config/
+└── posts/
+```
+
+follow the steps below on your local machine:
+
+1. run `sprout`
+2. agree to the setup
+3. type `s`
+4. change the `title` value to the title you want
+5. change the `description` value to the title you want
+6. change the `url-base` value to the URL that you want others to access your
+ weed from
+
+ for example: `(url-base "https://example.com/weed/")`
+
+7. change the `output-path` to where you want your weed to publish remotely
+
+ for example: `(output-path "username@example.com:/var/www/weed/")`
+
+8. save the file
+
+**note**: make sure you include a slash at the end of the `url-base` and
+`output-path` values.
+
+### configuring sprout: for tilde.town users
+
+you need to set up your `~/public_html` directory on tilde.town, and then
+configure sprout, so you can publish your posts to tilde.town.
+
+#### setting up sprout on tilde.town
+
+sprout creates the following directory structure in your home directory:
+
+```
+.weed/
+├── build/
+├── config/
+└── posts/
+```
+
+follow the steps below to set up sprout on tilde.town:
1. run `mkdir ~/public_html/weed`
-2. run `git clone https://git.m455.casa/m455/sprout`
-3. run `cd sprout`
-4. run `mkdir -p ~/.local/bin`
-4. run `make install DESTDIR=~/.local/bin`
-5. run `sprout`
-6. type `y` when prompted
-7. type `s` to change your settings
+1. run `sprout`
+2. agree to the setup
+3. type `s`
+4. change the `title` value to the title you want
+5. change the `description` value to the title you want
+6. change the `url-base` value to the URL that you want others to access your
+ weed from
+
+ for example: `(url-base "https://tilde.town/~username/weed/")`
+
+7. change the `output-path` to where you want your weed to publish locally
+
+ for example: `(output-path "~/public_html/weed/")`
+
+8. save the file
+
+**note**: make sure you include a slash at the end of the `url-base` and
+`output-path` values.
## todos
diff --git a/sprout.rkt b/sprout.rkt
index 83a7929..6b85479 100644
--- a/sprout.rkt
+++ b/sprout.rkt
@@ -20,24 +20,22 @@
(define config-file-contents
#<<string-block
-;; This is the config file for your weed.
-;; Change the values here to your own values
-
-((title "My Cool Weed")
- (description "My feels and good thoughts and such")
-
- ;; This is the web directory of your weed file
- ;; Note: Make sure you include the trailing slash :o
- (url-base "https://example.site/weed/")
-
- ;; This is where your feed will be published using rsync.
- ;; This could be a local path or a remote path.
- ;;
- ;; Examples:
- ;; Local example: "~/public_html/weed/"
- ;; Remote example: "user@host:/var/www/weed/"
- ;; Note: Make sure you include the trailing slash :o
- (output-path "~/sites/my-example-site/www/weed/"))
+;; this is the configuration file for your weed.
+;;
+;; change these values to your own.
+;;
+;; note: Make sure you have a slash at the end of
+;; the url-base and output-path values.
+
+((title "my cool weed")
+ (description "shitposts and feels alllll day")
+ (url-base "https://example.com/weed/")
+ (output-path "user@example.com:/var/www/weed/"))
+
+;; Examples of output-path values:
+;; Local example: "~/public_html/weed/"
+;; Remote example: "user@example.com:/var/www/weed/"
+;; Note: Make sure you include the trailing slash
string-block
)