Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
D docker-containers
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Public
  • docker-containers
  • Wiki
  • docusaurus

docusaurus · Changes

Page history
feat: add documentation for checking coding style and for docusaurus authored Oct 30, 2020 by Yogesh Hegde's avatar Yogesh Hegde
Hide whitespace changes
Inline Side-by-side
Showing with 75 additions and 0 deletions
+75 -0
  • docusaurus.md docusaurus.md +75 -0
  • No files found.
docusaurus.md 0 → 100644
View page @ 7b51a87e
## Building Docusaurus website using docusaurus container.
1. Installing docker. Open up a new Terminal by pressing `Ctrl` + `Alt` + `t`
```sh
sudo apt update
sudo apt install git
git clone https://gitlab.iotiot.in/newbies/pre-office-office/docker-containers.git
cd docker-containers
sudo install-docker-ubuntu-16.04.sh
```
- **Note:** The script will automatically install and **reboot** your system.
- **Note:** These steps only work on Ubuntu 16.04 OS. Any other OS will cause an error.
- After the system reboots, Open up a new Terminal by pressing `Ctrl` + `Alt` + `t`.
- Run command `sudo docker --version` to verify that docker is successfully installed.
```sh
# The output should be a docker version
$ sudo docker --version
Docker version 19.03.13, build 4484c46d9d
```
2. Start docker container by running command, in the same terminal
```sh
cd docker-containers/docusaurus-container
sudo ./start
```
3. You will get a new Terminal prompt,
![terminal](upload/Selection_018.png)
4. Initialize the docusaurus by running the command
```sh
npx @docusaurus/init@next init {name-of-the-website} classic
```
5. To preview the website run command
```sh
cd {name-of-the-website}
yarn start --host 0.0.0.0 --port 3000
```
![terminal-preview](upload/Selection_019.png)
See your website by typing http://localhost:3000 in the address bar of your browser.
![website-preview](upload/wesite-preview.png)
6. Making changes to the website
- Navigate to folder {repo-root}/docusaurus/{name-of-the-website}, you will find all the docusaurus website files here.
- Edit and make changes to these files in any text editor of your choice.
![docusaurus-folder](upload/Selection_020.png)
7. Uploading website to Github.
- Configure your website for Github, You need to these changes to your `docusaurus.config.js`
```js
...
url: 'https://__userName__.github.io', // Your website URL
baseUrl: '/testProject/',
projectName: 'testProject',
organizationName: 'userName'
...
```
For example :
Lets say my github project name is - `Shuny-Interfaces` and my user name is `shunyaos`
Then the `docusaurus.config.js` will be
```js
...
url: 'https://shunyaos.github.io', // Your website URL
baseUrl: '/Shunya-Interfaces/',
projectName: 'Shunya-Interfaces',
organizationName: 'shunyaos'
...
```
- To upload the website to github run command.
```sh
git config --global user.email "{your-email-id}"
git config --global user.name "{Your-name}"
GIT_USER={your-git-username} yarn deploy
```
\ No newline at end of file
Clone repository
  • Installing tools
  • Readme doc format
  • code refactoring
  • code style container
  • day0
  • devops practical
  • docusaurus
  • Home
  • install on mac
  • install tools ubuntu 16.04
  • install tools windows