Collecting the formatting I use most, so new members can copy it.
Collapsible section
Click to expand
Hidden until someone opens it. Handy for long logs.
Code with highlighting
fmt.Println("hello from casnode")
Tables
| Database | driverName |
|---|---|
| MySQL | mysql |
| PostgreSQL | postgres |
| SQLite | sqlite |
| SQL Server | mssql |
Emoji: đ đ đ
Mention someone with @ and their user name, like @priya_r.
We have about 3,000 topics on a self-hosted Discourse. Moving would be much easier with an importer. Is anyone working on one?
Yes, you can combine these with your words:
| Filter | Finds |
|---|---|
@maria_dev |
posts by that user |
#configuration |
topics in that category |
tags:docker |
topics with that tag |
in:title |
matches in titles only |
in:messages |
your personal messages |
status:open |
topics that are not closed |
order:latest, order:likes, order:views |
sorting |
For example postgres #configuration order:likes.
Every topic, category, tag and profile page is rendered on the server, so the full text is in the HTML. On top of that:
- canonical URLs, Open Graph tags and
DiscussionForumPostingstructured data on topics /sitemap.xml, and RSS at/latest.rssand/top.rssrobots.txtthat keeps private pages out?page=links on lists and long topics that crawlers can follow- a topic URL with an old slug redirects to the current one
Set site_url on the Site Settings page, so that canonical URLs and the sitemap use your domain.
Yes, all of it is on Admin â Site Settings â Branding:
- logo and favicon
- brand, accent and header colors, each with a dark-mode variant
- fonts
- header links (
Label,URL|Label,URL) - the homepage banner: title, text, image and whether it shows the search box
- custom CSS for anything else
This demo uses the logo, the banner and the header links. Changes on that page apply right away.
No Casdoor needed. You need Go 1.25+, Node.js 20+ and Yarn 1:
git clone https://github.com/casnode/casnode
cd casnode
echo "devSignin = true" > conf/app.local.conf
go run . # backend on http://localhost:16900, SQLite file casnode.db
cd web
yarn install
yarn dev # frontend on http://localhost:13900 with hot reload
Open http://localhost:13900/login and sign in as admin (or any user name). devSignin only answers requests from the same computer; never turn it on on a server.
The pages are in web/src/app, the components in web/src/components, and the translations in web/src/lib/locales.
Docker is the quickest. The repository has a Dockerfile, so build the image and run it:
git clone https://github.com/casnode/casnode
cd casnode
docker build -t casnode .
docker run -d -p 16900:16900 -v casnode-data:/app/data \
-e casdoorEndpoint=https://door.casdoor.com -e clientId=<client id> -e clientSecret=<client secret> \
-e casdoorOrganization=<organization> -e casdoorApplication=<application> -e admins=<your user name> \
casnode
Then open http://your-server:16900. The only other thing you need is a Casdoor application for sign-in: its client ID and secret go in the variables above, and https://<your forum>/callback goes in its redirect URLs.
By default the data is a SQLite file kept, together with the uploads, in the casnode-data volume, which is fine for a trial.
