From 79404c875dbf20ba783c72b31111c6e2228d28a2 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Sun, 7 Aug 2022 14:38:49 -0400 Subject: begin rehighlighting of custom info in templates --- content/basic/nginx.md | 14 +++++++------- content/calibre.md | 4 ++-- content/cgit.md | 14 +++++++------- content/coturn.md | 10 +++++----- content/ejabberd.md | 12 ++++++------ content/fosspay.md | 4 ++-- content/git.md | 6 +++--- content/gitea.md | 8 ++++---- content/i2p.md | 2 +- content/irc.md | 4 ++-- content/jitsi.md | 22 +++++++++++----------- content/matrix.md | 6 +++--- static/style.css | 6 ++++++ 13 files changed, 59 insertions(+), 53 deletions(-) diff --git a/content/basic/nginx.md b/content/basic/nginx.md index fb8f15a..3ec3af7 100644 --- a/content/basic/nginx.md +++ b/content/basic/nginx.md @@ -25,7 +25,7 @@ bottom here. Now pull up a terminal and type: ```sh -ssh root@example.org +ssh root@{{}}example.org{{}} ``` This command will attempt to log into your server. It should prompt you @@ -73,7 +73,7 @@ paste (with required changes) but I will also explain what the lines do. Create a file in `/etc/nginx/sites-available` by doing this: ```sh -nano /etc/nginx/sites-available/mywebsite +nano /etc/nginx/sites-available/{{}}mywebsite{{}} ``` Note that \"nano\" is a command line text editor. You will now be able @@ -88,8 +88,8 @@ this** will be different depending on what you want to call your site. server { listen 80 ; listen [::]:80 ; - server_name landchad.net ; - root /var/www/landchad ; + server_name {{}}example.org{{}} ; + root /var/www/{{}}mysite{{}} ; index index.html index.htm index.nginx-debian.html ; location / { try_files $uri $uri/ =404 ; @@ -129,14 +129,14 @@ ahead and create a little page that will appear on when someone looks up the domain. ```sh -mkdir /var/www/landchad +mkdir /var/www/{{}}mysite{{}} ``` Now let\'s create and index file inside of that directory which will appear when the website is accessed: ```sh -nano /var/www/landchad/index.html +nano /var/www/{{}}mysite{{}}/index.html ``` I\'ll add the following basic content, but you can add whatever you @@ -155,7 +155,7 @@ Once you save that file, we can enable it making a link to it in the `sites-enabled` directory: ```sh -ln -s /etc/nginx/sites-available/mywebsite /etc/nginx/sites-enabled +ln -s /etc/nginx/sites-available/{{}}mywebsite{{}} /etc/nginx/sites-enabled ``` Now we can just `reload` or `restart` to make `nginx` service the new diff --git a/content/calibre.md b/content/calibre.md index 3e82b62..9768acf 100644 --- a/content/calibre.md +++ b/content/calibre.md @@ -27,7 +27,7 @@ Either upload your existing library using `rsync`. For example to ```sh cd ~/Documents -rsync -avuP your-library-dir root@example.org:/opt/calibre/ +rsync -avuP your-library-dir root@{{}}example.org{{}}:/opt/calibre/ ``` Or create a library and add a book to it: @@ -86,7 +86,7 @@ following: server { listen 80; client_max_body_size 64M; # to upload large books - server_name calibre.example.org ; + server_name {{}}calibre.example.org{{}} ; location / { proxy_pass http://127.0.0.1:8080; diff --git a/content/cgit.md b/content/cgit.md index 7e3dadc..ce6214c 100644 --- a/content/cgit.md +++ b/content/cgit.md @@ -41,9 +41,9 @@ Cgit, while serving static files directly: server { listen 443 ssl; listen [::]:443 ssl; - ssl_certificate /etc/ssl/nginx/git.example.org.crt; - ssl_certificate_key /etc/ssl/nginx/git.example.org.key; - server_name git.example.org; + ssl_certificate /etc/ssl/nginx/{{}}git.example.org{{}}.crt; + ssl_certificate_key /etc/ssl/nginx/{{}}git.example.org{{}}.key; + server_name {{}}git.example.org{{}}; root /usr/share/cgit ; try_files $uri @cgit ; @@ -83,11 +83,11 @@ configure Cgit to our liking, by editing `/etc/cgitrc`. css=/cgit.css logo=/cgit.svg virtual-root=/ -clone-prefix=https://git.example.org +clone-prefix=https://{{}}git.example.org{{}} # Title and description shown on top of each page -root-title=Chad's git server -root-desc=A web interface to LandChad's git repositories, powered by Cgit +root-title={{}}Chad's git server{{}} +root-desc={{}}A web interface to LandChad's git repositories, powered by Cgit{{}} # The location where git repos are stored on the server scan-path=/srv/git/ @@ -107,7 +107,7 @@ yours. Cgit shows the owner\'s system name, so you need to modify the git user to give it your name: ```sh -usermod -c "Your Name" git +usermod -c "{{}}Your Name{{}}" git ``` ### Changing the repository description diff --git a/content/coturn.md b/content/coturn.md index 5dd60b3..7c9687c 100644 --- a/content/coturn.md +++ b/content/coturn.md @@ -36,8 +36,8 @@ turnserver. Here is an example of some sane defaults: ```md -server-name=turn.example.org -realm=turn.example.org +server-name={{}}turn.example.org{{}} +realm={{}}turn.example.org{{}} listening-ip=your_public_ip listening-port=3478 @@ -75,7 +75,7 @@ configuration in `turnserver.conf`: ```txt use-auth-secret -static-auth-secret=your_auth_secret +static-auth-secret={{}}your_auth_secret{{}} ``` ## TURNS (TLS Encryption) @@ -89,8 +89,8 @@ To utilize TURNS, certificates need to be declared for **turn.example.org** in `turnserver.conf`: ```txt -cert=/etc/letsencrypt/live/turn.example.org/fullchain.pem -pkey=/etc/letsencrypt/live/turn.example.org/privkey.pem +cert=/etc/letsencrypt/live/{{}}turn.example.org{{}}/fullchain.pem +pkey=/etc/letsencrypt/live/{{}}turn.example.org{{}}/privkey.pem ``` ## Starting Coturn diff --git a/content/ejabberd.md b/content/ejabberd.md index 0080dba..5a7b716 100644 --- a/content/ejabberd.md +++ b/content/ejabberd.md @@ -53,7 +53,7 @@ The **XMPP hostname** is specified in the `hosts` section of ```yml hosts: - - example.org + - {{}}example.org{{}} ``` ### Certificates @@ -69,7 +69,7 @@ for both the fullchain cert and private key. Using certbot, this process can be easily automated with these commands: ```sh -$DOMAIN=subdomain.example.org +$DOMAIN={{}}subdomain.example.org{{}} certbot --nginx -d $DOMAIN certonly; mkdir -p /etc/ejabberd/certs/$DOMAIN cp /etc/letsencrypt/live/$DOMAIN/fullchain.pem /etc/ejabberd/certs/$DOMAIN cp /etc/letsencrypt/live/$DOMAIN/privkey.pem /etc/ejabberd/certs/$DOMAIN @@ -213,7 +213,7 @@ Then, using `ejabberdctl` as the ejabberd user, register the admin user which is set in `ejabberd.yml`: ```sh -su -c "ejabberdctl register admin example.org password" ejabberd +su -c "ejabberdctl register {{}}admin example.org password{{}}" ejabberd ``` This will create the user **admin@example.org.** @@ -245,13 +245,13 @@ your turnserver: ```yml mod_stun_disco: - secret: "your_auth_secret" + secret: "{{}}your_auth_secret{{}}" services: - - host: turn.example.org + host: {{}}turn.example.org{{}} type: stun - - host: turn.example.org + host: {{}}turn.example.org{{}} type: turn ``` diff --git a/content/fosspay.md b/content/fosspay.md index f7e3ae9..6c1f251 100644 --- a/content/fosspay.md +++ b/content/fosspay.md @@ -96,7 +96,7 @@ whatever reason, change them in the command above, but also in the Now open up `/var/www/fosspay/config.ini` and we will set things up. Here are a list of things to edit. -- `domain` should be set to `donate.example.org`, with your domain. +- `domain` should be set to `{{}}donate.example.org{{}}`, with your domain. - `protocol` can be set to `https`. - Get or create an email account to use as a mailer and add the account/server information to the email settings. @@ -135,7 +135,7 @@ Nginx configuration file modeled as below: server { listen 80 ; listen [::]:80 ; - server_name donate.example.org ; + server_name {{}}donate.example.org{{}} ; location / { proxy_pass http://localhost:5000 ; } diff --git a/content/git.md b/content/git.md index e186cd0..f11d79d 100644 --- a/content/git.md +++ b/content/git.md @@ -65,7 +65,7 @@ The `-l` option should put us in `git`'s home directory, but you can `cd Now you can create the bare repository with ```sh -git init --bare my-repo.git +git init --bare {{}}my-repo.git{{}} ``` By convention, bare repository names end with \".git\". (A bare repository is @@ -104,7 +104,7 @@ How that we've set that up, we can push a repository we have on our computer to that newly created bare repo. First, on our local computer, we run a command like this: ```sh -git remote add origin git@example.org:my-repo.git +git remote add origin git@{{}}example.org{{}}:{{}}my-repo.git{{}} ``` Note some of the things you will change: @@ -116,7 +116,7 @@ Note some of the things you will change: Once you run that command successfully to add a new remote repository, and also assuming you change `origin` to let's say the more unique `personal`, you can push your local git server as expected: ```sh -git push personal master +git push {{}}personal{{}} master ``` That's all a git server is! Very simple. diff --git a/content/gitea.md b/content/gitea.md index e09b6c0..8fbf3e8 100644 --- a/content/gitea.md +++ b/content/gitea.md @@ -64,9 +64,9 @@ subdomain to Gitea running on port 3000: server { listen 443 ssl; listen [::]:443 ssl; - ssl_certificate /etc/ssl/nginx/git.example.org.crt; - ssl_certificate_key /etc/ssl/nginx/git.example.org.key; - server_name git.example.org; + ssl_certificate /etc/ssl/nginx/{{}}git.example.org{{}}.crt; + ssl_certificate_key /etc/ssl/nginx/{{}}git.example.org{{}}.key; + server_name {{}}git.example.org{{}}; location / { proxy_pass http://localhost:3000/; # The / is important! proxy_redirect off; @@ -129,7 +129,7 @@ DEFAULT_PUSH_CREATE_PRIVATE = true If you now add a remote to a repository like this ```sh -git remote add origin 'ssh://gitea@git.example.org/username/coolproject.git' +git remote add origin 'ssh://gitea@{{}}git.example.org{{}}/username/coolproject.git' ``` and push, Gitea will automatically create a private `coolproject` diff --git a/content/i2p.md b/content/i2p.md index fec9d8c..d0b2edb 100644 --- a/content/i2p.md +++ b/content/i2p.md @@ -73,7 +73,7 @@ code. Instead, paste this: ```nginx server { listen 127.0.0.1:8080 ; - root /var/www/example ; + root /var/www/{{}}example{{}} ; index index.html ; } ``` diff --git a/content/irc.md b/content/irc.md index d07345f..4e0b8a2 100644 --- a/content/irc.md +++ b/content/irc.md @@ -147,7 +147,7 @@ Change the server name to your server\'s domain name. # server configuration server: # server name - name: "example.org" + name: "{{}}example.org{{}}" ``` ### Network password {#configuring-password} @@ -172,7 +172,7 @@ the `#` before the `password:` line): ```yaml # password to login to the server, generated using `ergo genpasswd`: -password: "" +password: "{{}}your hashed password{{}}" ``` ### Message of the day (MotD) {#configuring-motd} diff --git a/content/jitsi.md b/content/jitsi.md index aa6bab4..82246dd 100644 --- a/content/jitsi.md +++ b/content/jitsi.md @@ -61,7 +61,7 @@ I\'ll be using [certbot](/basic/certbot) and Jitsi subdomain to allow encrypted connections. ```sh -certbot --nginx certonly -d meet.example.org +certbot --nginx certonly -d {{}}meet.example.org{{}} ``` We will not create an Nginx config file for Jitsi because the Jitsi @@ -76,19 +76,19 @@ apt install jitsi-meet ``` It will ask you for your `hostname`; there you\'ll need to input the -subdomain you have just added to Nginx, like `meet.example.org`. +subdomain you have just added to Nginx, like `{{}}meet.example.org{{}}`. For the SSL certificate, choose `I want to use my own certificate`. When it ask you for the certification key and cert files, input -`/etc/letsencrypt/live/meet.example.org/privkey.pem` and -`/etc/letsencrypt/live/meet.example.org/fullchain.pem` respectively. +`/etc/letsencrypt/live/{{}}meet.example.org{{}}/privkey.pem` and +`/etc/letsencrypt/live/{{}}meet.example.org{{}}/fullchain.pem` respectively. ## Using Jitsi {{< img alt="Jitsi once installed" src="/pix/jitsi-01.webp" >}} -Jitsi can be used in a browser by then just going to `meet.example.org`. +Jitsi can be used in a browser by then just going to `{{}}meet.example.org{{}}`. Note that there are also Jitsi clients for all major platforms: @@ -118,11 +118,11 @@ database. First, we need to enable password authentication in [Prosody](/prosody). Edit -`/etc/prosody/conf.avail/meet.example.org.cfg.lua`, and locate this +`/etc/prosody/conf.avail/{{}}meet.example.org{{}}.cfg.lua`, and locate this block: ```lua -VirtualHost "meet.example.org" +VirtualHost "{{}}meet.example.org{{}}" authentication = "anonymous" ``` @@ -133,14 +133,14 @@ Then, to enable guests to login and join your chatrooms, add the following block **after** the one you just edited: ```lua -VirtualHost "guest.meet.example.org" +VirtualHost "guest.{{}}meet.example.org{{}}" authentication = "anonymous" c2s_require_encryption = false ``` ### Jitsi Meet configuration -Next, in `/etc/jitsi/meet/meet.example.org-config.js`, uncomment the +Next, in `/etc/jitsi/meet/{{}}meet.example.org{{}}-config.js`, uncomment the following line: ```js @@ -152,7 +152,7 @@ var config = { ``` And change `'guest.jitsi-meet.example.com'` to -`'guest.meet.example.org'`. +`'{{}}guest.meet.example.org{{}}'` (your Jitsi domain preceded by `meet.`). ### Jicofo configuration @@ -165,7 +165,7 @@ jicofo { authentication: { enabled: true type: XMPP - login-url: meet.example.org + login-url: {{}}meet.example.org{{}} } ``` diff --git a/content/matrix.md b/content/matrix.md index 893d58a..338ff9b 100644 --- a/content/matrix.md +++ b/content/matrix.md @@ -47,7 +47,7 @@ Create an Nginx configuration file for Matrix, say ```nginx server { - server_name matrix.example.org ; + server_name {{}}matrix.example.org{{}} ; listen 80; listen [::]:80; location / { @@ -59,7 +59,7 @@ server { client_max_body_size 50M ; } location /.well-known/matrix/server { - return 200 '{"m.homeserver": {"base_url": "https://matrix.example.org"}}'; + return 200 '{"m.homeserver": {"base_url": "https://{{}}matrix.example.org{{}}"}}'; default_type application/json; add_header Access-Control-Allow-Origin *; } @@ -86,7 +86,7 @@ Obviously, we need to encrypt our `matrix` subdomain as well. Let\'s do that with certbot: ```sh -certbot --nginx -d matrix.example.org +certbot --nginx -d {{}}matrix.example.org{{}} ``` ## Configuration diff --git a/static/style.css b/static/style.css index 24ce191..99c0a5e 100644 --- a/static/style.css +++ b/static/style.css @@ -324,3 +324,9 @@ br { #servicelist li:hover .title, .desc, .tags { display: none ; } + +mark { + background: unset ; + color: orange ; + font-weight: bold ; +} -- cgit v1.2.3