https://github.com/tiennhm/personal-blog-template
Personal Blog Template using Docusaurus2
https://github.com/tiennhm/personal-blog-template
algolia-search boilerplate canny-feedback docusaurus2 gitcus i18n markdown mdx personal-blog quickstart reactjs ready-to-deploy seo-friendly template
Last synced: 2 months ago
JSON representation
Personal Blog Template using Docusaurus2
- Host: GitHub
- URL: https://github.com/tiennhm/personal-blog-template
- Owner: TienNHM
- License: mit
- Created: 2023-07-29T09:16:21.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2023-10-07T08:16:02.000Z (over 2 years ago)
- Last Synced: 2025-01-27T23:35:38.238Z (over 1 year ago)
- Topics: algolia-search, boilerplate, canny-feedback, docusaurus2, gitcus, i18n, markdown, mdx, personal-blog, quickstart, reactjs, ready-to-deploy, seo-friendly, template
- Language: TypeScript
- Homepage: https://tiennhm.github.io/
- Size: 8.32 MB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Personal blog template














This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator. It is deployed on [GitHub Pages](https://pages.github.com/). You can use this template to build your own personal blog.
Beside that, this website is integrated with some useful tools, such as [GitHub Actions](https://docs.github.com/en/actions), [GitCus](https://giscus.app/), [Algolia](https://www.algolia.com/), [Canny for GitHub](https://canny.io/integrations/github), ... to help you manage your blog easily.
### Installation
```
$ npm install
```
### Local Development
Update some information in the website:
- Update the `baseUrl` in `docusaurus.config.js` to match your GitHub Pages URL (or custom domain). For example, if you are using GitHub Pages with a custom domain `https://mywebsite.com`, then `baseUrl` should be set to `/`.
- Change all occurrences of `YourName` to your GitHub username. For example, if your GitHub username is `TienNHM`, then replace all occurrences of `YourName` with `TienNHM`.
- Update your personal information, including `name`, `title`, `url`, `image_url` in `authors.yml`. Notice that, `image_url` is the URL to your GitHub avatar.
- Please change your contact information in `docusaurus.config.js` and `contact.md`.
- There are some process environment variables in `.env` file. You must update them to match your information.
After that, you can run the website in the development mode using:
```
$ 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
```
$ npm run build
```
This command generates static content into the `build` directory and can be served using any static contents hosting service.
### Deployment
If there is the first time you deploy the website, you need to update permissions for `Workflow permissions` in `Settings > Code and automation > Actions > General` tab of your repository.
You must enable `Read and write permissions` permission for `Workflows` section, and check `Allow GitHub Actions to create and approve pull requests`.
If you are using GitHub pages for hosting, please ensure the `gh-pages` branch is existed. If not, please create it. After that, please enable GitHub pages in `Settings > Pages` tab of your repository, and choose `gh-pages` branch as the source.
Using SSH:
```
$ USE_SSH=true yarn deploy
```
Not using SSH:
```
$ GIT_USER= yarn deploy
```
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.
## Demo
You can see the demo of this website at [https://tiennhm.github.io](https://tiennhm.github.io).

## References
- [Docusaurus](https://docusaurus.io/)
- [GitHub Actions](https://docs.github.com/en/actions)
- [GitCus](https://giscus.app/)
- [Algolia](https://www.algolia.com/)
- [Canny for GitHub](https://canny.io/integrations/github)