Publishing Code

Problem understanding publishing code-

From what I gather it needs three ` before and after (example below) to make code active but I can’t make this work with copy/paste. This publishing of code is new to me as is markdown.

Example:

useradd -r -m -d /srv/writefreely -s /bin/bash writefreely

usermod -a -G www-data writefreely

su – writefreely
` ` `
I attempted this with no luck on my Writefreely blog. I would appreciate either direct help here or a link to better comprehend what I am doing. I am an avid fan of Writefreely and want to pass on what I have learned but I am an old man of almost seventy-six but raring to go. Thank you for your consideration and I hope I wrote this correctly. ACrowe

Try not leaving any spaces between the backquote characters, which should be matched like this (the lisp language designator is optional):

```lisp
(defun square (x)
  (* x x))
```

It renders like this:

(defun square (x)
  (* x x))
1 Like

This is rather new to me so I give you a large thank you for replying. I will do as you suggested as I saw what appeared to be spaces between each and considered trying again without. Then I decided it would be great if I could just get an answer rather than going round and round. I will do this a little later tonight and get back to you should it be the answer. Thank you, ACrowe

2 Likes

That tip worked wonderfully. Another question and I am done for now.

What is the proper code to fill out:

/etc/nginx/sites-available/writefreely.conf

in a Writefreely tutorial I am attempting to build? I have tried the attached below but it seems not to work when nginx -t is entered. I am working with Debian 12 on my VPS server. Thank you all for helping out an old guy.

server {
listen 80;
listen [::]:80;

server_name example.com;

gzip on;
gzip_types
  application/javascript
  application/x-javascript
  application/json
  application/rss+xml
  application/xml
  image/svg+xml
  image/x-icon
  application/vnd.ms-fontobject
  application/font-sfnt
  text/css
  text/plain;
gzipminlength 256;
gzipcomplevel 5;
gziphttpversion 1.1;
gzipvary on;

location ~ ^/.well-known/(webfinger|nodeinfo|host-meta) {
    proxysetheader Host 

remoteaddr;
proxysetheader X-Forwarded-For $remoteaddr;
proxypass http://127.0.0.1:8080;
proxyredirect off;
}

location ~ ^/(css|img|js|fonts)/ {
    root /srv/writefreely/yourdomain.com/static;
    # Optionally cache these files in the browser:
    # expires 12M;
}

location / {
    proxysetheader Host 

remoteaddr;
proxysetheader X-Forwarded-For $remoteaddr;
proxypass http://127.0.0.1:8080;
proxyredirect off;
}
}