Skip to content

Commit 384009e

Browse files
committed
updated articles
1 parent ef74fe5 commit 384009e

19 files changed

Lines changed: 188 additions & 172 deletions

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,7 @@
1818
npm-debug.log*
1919
yarn-debug.log*
2020
yarn-error.log*
21+
package-lock.json
22+
yarn.lock
23+
package-lock.json
24+
package-lock.json

LICENSE

Lines changed: 0 additions & 21 deletions
This file was deleted.

blog/2019-05-28-first-blog-post.md

Lines changed: 0 additions & 12 deletions
This file was deleted.

blog/2019-05-29-long-blog-post.md

Lines changed: 0 additions & 44 deletions
This file was deleted.

blog/2021-08-01-mdx-blog-post.mdx

Lines changed: 0 additions & 20 deletions
This file was deleted.
-93.9 KB
Binary file not shown.

blog/2021-08-26-welcome/index.md

Lines changed: 0 additions & 25 deletions
This file was deleted.
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
---
2+
slug: how-it-works
3+
title: Learn How Docusaurus Works
4+
authors: [personX]
5+
tags: [dhub, docusaurus, features]
6+
---
7+
8+
# Learn How Docusaurus Works
9+
10+
This page is your gateway to understanding the essential features that make your blog tick. Get ready to explore the key elements that make Docusaurus a powerful tool for bloggers.
11+
12+
### Framework
13+
14+
[Docusaurus blogging features](https://docusaurus.io/docs/blog) are powered by the [blog plugin](https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-content-blog). Simply add Markdown files (or folders) to the `blog` directory. The blog post date can be extracted from filenames, such as:
15+
16+
- `2024-01-21.md`
17+
- `2024-01-21-how-it-works/index.md`
18+
19+
### Page structure
20+
21+
Docusaurus relies on _frontmatter variables_ to generate the blog post page. Instead of using the Heading-1 level title from the content, it extracts information from these variables:
22+
23+
```
24+
slug: page-url-slug
25+
title: The title Docusaurus uses to show in a page
26+
authors: [ceo, arijus]
27+
tags: [any, words, here, become, tags]
28+
```
29+
30+
Understanding this structure ensures a cohesive layout for your blog pages, allowing for a personalized and organized reader experience.
31+
32+
### Images
33+
34+
Explore two ways to add visuals to your blog:
35+
36+
1. **Centralized Folder**
37+
38+
Keep your images in a centralized folder. Upload them to `/static/img/`:
39+
40+
[![A closeup shot of rocks](/img/rocks.jpg 'A photo by Nick Nice')](https://unsplash.com/photos/shallow-focus-photography-of-gravels-zwjSCTItiZU)
41+
42+
2. **Next to the Post File**
43+
44+
Place your images next to the post file. For example, `plants.png` can be stored next to the `index.md` file in the `2024-01-20-how-it-works` folder:[![A closeup shop of plants](./plants.jpg 'A photo by Nahil Naseer')](https://unsplash.com/photos/green-leaf-plants-xljtGZ2-P3Y)
45+
46+
## Truncate
47+
48+
Limit the size of your blog posts in the list view using a `<!-- truncate -->` comment. In the Dhub editor, add it as an **embedded MDX** code block from "/" components menu:
49+
50+
<!--truncate-->
51+
52+
## React components
53+
54+
Docusaurus supports interactive components as part of the post's content. For example, if you insert this code block in Dhub's **embedded MDX** component:
55+
56+
```js
57+
<button onClick={() => alert('button clicked!')}>Click me!</button>Tags
58+
```
59+
60+
In the published site, it will show this element:
61+
62+
```mdx-code-block
63+
<button onClick={() => alert('button clicked!')}>Click me!</button>
64+
```
65+
66+
## Tags
67+
68+
Tagging system enhances the organization of your posts, making it easy for readers to explore content based on their interests.
69+
70+
Create new tags by adding them as _frontmatter variables_ at the start of the file:
71+
72+
```
73+
tags: [tag 1, tag 2, tag 3]
74+
```
75+
76+
## Authors
77+
78+
Understand how authors are managed through the `blog/authors.yml` file, ensuring proper attribution to content creators.
79+
80+
:::note
81+
82+
At the moment, Dhub editor doesn't support opening this file; it has to be configured outside the Dhub editor.
83+
84+
:::
85+
86+
Learn about the `authors.yml` file structure at Docusaurus documentation: [Docusaurus Blog Documentation - Global Authors.](https://docusaurus.io/docs/blog#global-authors)
667 KB
Loading

blog/2024-01-21.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
---
2+
slug: welcome
3+
title: Welcome to Your Blog!
4+
authors: [ceo, arijus]
5+
tags: [dhub, hello, docusaurus]
6+
---
7+
8+
# **Welcome to Your Blog!**
9+
10+
## Getting Started with Dhub and Docusaurus
11+
12+
Greetings, blogger! 🚀 Welcome to Dhub, your all-in-one online editor designed for crafting beautiful blogs using the powerful Docusaurus framework.
13+
14+
## Navigating Your Blogging Space
15+
16+
As you embark on your blogging adventure, this initial page serves as your welcome hub. Here, you can find essential information about Dhub, including helpful tips and guidelines to kickstart your blogging journey. The intuitive editor interface is designed to enhance your writing experience, making it both enjoyable and efficient.
17+
18+
## How to Use Dhub
19+
20+
1. **Add Components:**
21+
22+
- Type "/" in the editor to reveal a list of available Docusaurus components.
23+
24+
- Select the desired component to add it to your blog post.
25+
26+
2. **Editing Made Easy:**
27+
28+
- Click on any component to modify its content.
29+
30+
- Utilize the toolbar for additional [_formatting_](#) options.
31+
32+
3. **Create New Blog Posts:**
33+
34+
- Click **"•••"** on the **"blog"** folder in the sidebar to open a contextual menu.
35+
36+
- Choose **"New file..."** to create a new page.
37+
38+
- Give it a name and hit enter. If the file format isn't specified, Dhub will create a .mdx file.
39+
40+
- Dhub supports .md and .mdx files.![](/img/tutorial.jpg)
41+
42+
4. **Push to Github:**
43+
44+
- Hit the "Push to Github" button to store your changes outside Dhub.
45+
46+
5. **Publish your blog:**
47+
48+
- For publishing, we recommend using external platforms like [Netlify](https://www.netlify.com/) or [Vercel](https://vercel.com/), which seamlessly integrate with Docusaurus.
49+
50+
## Understanding Docusaurus
51+
52+
Dhub harnesses the capabilities of Docusaurus, a modern open-source documentation framework by Facebook. It enables you to build and maintain a clean, organized, and feature-rich blog with ease.
53+
54+
:::note Learn more
55+
56+
Go to **"[2024-01-20-how-it-works.md](2024-01-20-how-it-works/index.md)"** file to learn the best practices using Docusaurus.
57+
58+
:::
59+
60+
Remember, your creativity knows no bounds, and Dhub is here to support your blogging journey every step of the way. Happy blogging!

0 commit comments

Comments
 (0)