The example site: https://chen-yulin.github.io/Besiege-Modern-Docs/
Initialize the local project
node -v >= 18.0
1 | npm init docusaurus@latest Besiege-Modern-Mod-docs classic |
1 | /developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility |
Configuration
Add a source code button
src/pages/index.js
,in function HomepageHeader()
, add a <div>
.
1 | function HomepageHeader() { |
Two button too close to each other, change the css
style for button.
In src/pages/index.module.css
1 | .buttons { |
Deployment
Add the remote repository on github.
1 | git remote add origin git@github.com:Chen-Yulin/Besiege-Modern-Docs.git |
Change the deployment configurations
1 | // Set the production url of your site here |
Change the page setting in repository settings, Branch
set to deploy
branch.
Deploy command: yarn deploy
1 | [INFO] `git commit -m "Deploy website - based on aa492c3f0934f0177ca946345c2d32940c1900c3"` code: 0 |