You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+19-13Lines changed: 19 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,24 @@
2
2
3
3
This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.
4
4
5
+
### Create Blog Post
6
+
7
+
1. Create a branch for your post.
8
+
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`).
9
+
3. Add [frontmater](https://docusaurus.io/docs/create-doc#doc-front-matter) metadata at top of post (use an existing post as an example or starting point). Add yourself to [`/blog/authors.yml`](/blog/authors.yml) if needed.
10
+
4. Create your post in markdown, or .mdx [like this one](https://raw.githubusercontent.com/netdata/blog/improve-readme/blog/2022-09-01-how-netdatas-machine-learning-works.mdx) if need to embed a YouTube video or do anything else a bit more fancy.
11
+
5. Optionally build site locally with `npm install` and then `npm run start`. If builds successfully a local version of the blog will be at: http://localhost:3000/
12
+
6. Create a PR from your branch into `master` (this will trigger a deployment preview).
13
+
14
+
#### Tips
15
+
16
+
- Use `` for images.
17
+
- For `tags`, pick from [existing tags](https://blog.netdata.cloud/tags/) if any seem relevant. Feel free to make new ones if needed.
18
+
- 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.
19
+
- Anything between start of post and `<!--truncate-->` will appear as a preview on blog landing page.
20
+
- Use [code blocks](https://docusaurus.io/docs/markdown-features/code-blocks) and tell the code block what language to use so it looks as pretty as possible.
21
+
- 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](https://github.com/netdata/blog/tree/master/blog/2022-10-19-pandas-python) as an example.
22
+
5
23
### Installation
6
24
7
25
```
@@ -26,16 +44,4 @@ This command generates static content into the `build` directory and can be serv
26
44
27
45
### Deployment
28
46
29
-
Using SSH:
30
-
31
-
```
32
-
$ USE_SSH=true yarn deploy
33
-
```
34
-
35
-
Not using SSH:
36
-
37
-
```
38
-
$ GIT_USER=<Your GitHub username> yarn deploy
39
-
```
40
-
41
-
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
47
+
Deployment is automated by Netlify. All PR's to `master` will trigger a deployment preview in Netlify which will be added to the PR.
0 commit comments