/netdata-blog

Netdata's Blog!

Primary LanguageMDXMIT LicenseMIT

Website

This website is built using Docusaurus 2, a modern static website generator.

Create Blog Post

  1. Create a branch for your post.
  2. In your branch create a file like blog/2022-01-01-my-blog-slug.md or (better since can add images in folder alongside the post) blog/2022-01-01-my-blog-slug/index.md (so blog/<yyyy-mm-dd>-<url-slug-you-want>.md or blog/<yyyy-mm-dd>-<url-slug-you-want>/index.md).
  3. Add frontmater metadata at top of post (use an existing post as an example or starting point). Add yourself to /blog/authors.yml if needed.
  4. Create your post in markdown, or .mdx like this one if need to embed a YouTube video or do anything else a bit more fancy.
  5. Create a PR from your branch into master (this will trigger a deployment preview).

Tips

  • Use ![my image alt text](url to image) for images.
  • For tags, pick from existing tags if any seem relevant. Feel free to make new ones if needed.
  • Use H2 and H3 section headings like this: ## This is a H2 and '### This is a H3. They will appear as useful section headings on the right hand side when a user is in the blog.
  • Anything between start of post and <!--truncate--> will appear as a preview on blog landing page.
  • Use code blocks and tell the code block what language to use so it looks as pretty as possible.
  • If you have images you can upload them to your PR and just use the github url for them. Better would be to make a folder for your post and include images locally. See this post as an example.
  • If you want to work locally you can create a development preview of the site with npm install and then npm run start. If builds successfully a local version of the blog will be at: http://localhost:3000/
  • Use https://socialsharepreview.com/ to check the url before sharing on social media sites. This is to make sure it appears nice when shared on social.

Installation

$ yarn

or

$ npm install

Local Development

$ yarn start

or

$ npm run start

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

Build

$ yarn build

or

$ npm run build

This command generates static content into the build directory and can be served using any static contents hosting service.

Deployment

Deployment is automated by Netlify. All PR's to master will trigger a deployment preview in Netlify which will be added to the PR.