Docusaurus
How to localhost
- cd my-website
- npm run start
If you want to add new blog, docs
- You are gonna use main branch to add new pages.
- gh-pages only using for static web view.
- You need to build and deploy again.
How to use docusaurus with github pages?
npx create-docusaurus@latest folder_name- Change organization name, project name etc. - Add gh-pages deployment branch, trailingslah:true 3.Install
- Build
- Create personal access token or SSH setup for github.
- Deploy with SSH or token.
- Change github repository page view main to gh-pages from repository
settings -> pages(left sidebar) -> branch'gh-pagesand/rootthan save.
How to update?
yarn buildUSE_SSH=true yarn deploy- or
GIT_USER=<gh_personal_access_token> yarn deployor make a alias on the .zshrc:
and use only dinodeploy on your repository path
Front Matter
---
title: Github Token Setup
id: github-token-setup
last_update:
date: 08.15.2025
author: Cyber-Syntax
# This isn't working on the docusaurus front matter
# but I use to track outdated content for my website
publish:
date: 08.15.2025
tags:
- git
- github
---
How to ?
How to update docusaurus?
Core updates
yarn upgrade @docusaurus/core@latest @docusaurus/preset-classic@latest @docusaurus/module-type-aliases@latest @docusaurus/types@latest
Specific updates
How to change some of the css?
[!INFO] css: https://infima.dev/
How to create multiple docs?
// docusaurus.config.js
{
to: "nixos",
position: "right",
label: "NixOS",
},
// sidebar.js
nixosSidebar: [{ type: "autogenerated", dirName: "nixos" }],
// Create file on `my-website/nixos` instead of `docs/`
Templates
Advanced Document Template
---
sidebar_position: 1
slug: /docs/Linux/Github/docusaurus
title: Docusaurus
id: docusaurus
last_update:
date: 08.15.2025
author: Cyber-Syntax
tags:
- github
---
<!-- TOC -->
# Head1
## Head2
- content
<!-- /TOC -->
Blog Templates
Basic Template
[!NOTE] slug: makes the url
blog/security
---
slug: security
title: Why pirate software is dangerous?
authors: cyber-syntax
tags: [security]
---
# Head1
Content
<!-- truncate -->
Content
# Head1
Content
Additional Resource
- Docusourus Github page
- Tutorial guide