self-host nostr ghost blog
nostr-based ghost blog See a running demo at https://hello-nblog.vercel.app
Simply click this bright, blue button:
Ensure you have Node.js installed on your computer.
git checkout master
to switch to the master branch for the most stable version.env
file to the project root. See the Configuration sectionyarn
to install node packagesyarn build
to build the production serveryarn preview
to run the sever.If you did it right, that's about it!
Configuration is done with enviroment variables.
PUBLIC_PUBKEYS
List of HEX pubkeys to fetch events for seperated by a ,
PUBLIC_RELAYS
List of relay URLs to connect to seperated by a ,
.
PUBLIC_NAME
A name for your blog. ex: nym's blog
PUBLIC_PICTURE
A Picture URL for your blog, used in favicon and header.PUBLIC_REACTIONS
Controls if you want reactions underneath your posts. Can either be true
or false
.If you want to change the accent color, simply open src/app.css
and look for the --accent-color
variable.
:root {
--accent-color: #ea5a0c;
}
This variable will control the accent color, here you can set a hex value, or RGB, or something else.
Accent color can be applied to elements using tailwind with it's color classes. For changing text color it would be text-accent
, background is bg-accent
and so on.
nblog uses SvelteKit. SvelteKit pages use directory based routing, and these files can be found in src/routes
and are addressed by +page.svelte
or +layout.svelte
.
For example, if you wanted to change the header or footer, those could be found in src/routes/+layout.svelte
.
If you wanted to add info to the home page, you can edit it in src/routes/+page.svelte
Keep in mind that nblog uses Tailwind CSS for styling, so there are built in classes for you to use at your disposal.
Various components are used throughout the app and can be customized. They are all located in src/lib/*.svelte
.