Skip to content

Commit

Permalink
[docs]: Added instructions for using npm to run the Docusaurus site l…
Browse files Browse the repository at this point in the history
…ocally (#423)

* docs(configuration): added example for handling nested JSON fields

Added example for handling nested JSON fields

Closes #1892

Signed-off-by: GauriBhandari <[email protected]>

* docs: add instructions for using npm to run the Docusaurus site locally

Added instructions for using npm to run the Docusaurus site locally

Closes #2094

Signed-off-by: Gauri Bhandari <[email protected]>
Signed-off-by: GauriBhandari <[email protected]>

* docs: add instructions for using npm to run the Docusaurus site locally

Added note

Closes #2094

Signed-off-by: Gauri Bhandari <[email protected]>
Signed-off-by: GauriBhandari <[email protected]>

* Updated documentation to reflect npm migration

Revised the documentation to include instructions for using npm instead of yarn

Migration from using yarn to npm on docs website

Closes #2094

Signed-off-by: Gauri Bhandari <[email protected]>
Signed-off-by: GauriBhandari <[email protected]>

* docs: update npm migration instructions

Revised the documentation to include instructions for using npm instead of yarn. This change reflects the migration from using yarn to npm for building, testing, and deploying the docs website.

Closes #2094

Signed-off-by: GauriBhandari <[email protected]>

* ci: update lint.yml to ensure proper commit message formatting

This commit updates the lint.yml file to ensure that commit messages follow the required format.

Closes #2094

Signed-off-by: Gauri Bhandari <[email protected]>
Signed-off-by: GauriBhandari <[email protected]>

* docs: update npm migration instructions

Closes #2094

Signed-off-by: Gauri Bhandari <[email protected]>
Signed-off-by: GauriBhandari <[email protected]>

* docs: update installation instructions for npm migration

Revised the documentation to reflect the migration from Yarn to npm for building, testing, and deploying the docs website.

Closes #2094

Signed-off-by: GauriBhandari <[email protected]>

---------

Signed-off-by: GauriBhandari <[email protected]>
Signed-off-by: Gauri Bhandari <[email protected]>
Co-authored-by: Animesh Pathak <[email protected]>
  • Loading branch information
GauriBhandari and Sonichigo authored Aug 19, 2024
1 parent eea73cc commit d85ac46
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 15,793 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/build_and_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,8 @@ jobs:
with:
node-version: 18.0.0

- name: Install Yarn
run: npm install -g yarn

- name: Install Dependencies
run: yarn install
run: npm install

- name: Build Documentation
run: yarn build
run: npm run build
8 changes: 8 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ jobs:
with:
fetch-depth: 0

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '18.0.0'

- name: Install Dependencies
run: npm install

- name: Check commits messages
uses: wagoid/commitlint-github-action@v5
env:
Expand Down
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,13 @@ The Keploy documentation site uses [Docusaurus 2](https://v2.docusaurus.io/), wh
You can make changes locally without previewing them in the browser.
However, if you want to build the site and preview changes in the browser, you need to have [Docusaurus 2 dependencies](https://v2.docusaurus.io/docs/installation/#requirements) installed.

Initialize Docusaurus 2 in the repo by running [`yarn`](https://classic.yarnpkg.com/en/docs/cli/) once in the root directory of the repo.
Initialize Docusaurus 2 in the repo by running [`npm`](https://docs.npmjs.com/cli/v7/commands/npm-install) once in the root directory of the repo.

Now you can build and view the site locally:

```bash
yarn start
npm install
npm start
```

The command starts a local development server and opens a browser window.
Expand All @@ -95,17 +96,17 @@ cd docs
3. Install all the dependencies

```sh
yarn install
npm install

## Start the development server.

yarn start
npm start
```

4. To reformat:

```sh
yarn prettier --write '**/*.{js,md}'
npm prettier --write '**/*.{js,md}'
```

5. Check the build status:
Expand Down
38 changes: 37 additions & 1 deletion versioned_docs/version-2.0.0/keploy-explained/docs-dev-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,30 @@ The Keploy documentation site uses [Docusaurus 2](https://v2.docusaurus.io/), wh
You can make changes locally without previewing them in the browser.
However, if you want to build the site and preview changes in the browser, you need to have [Docusaurus 2 dependencies](https://v2.docusaurus.io/docs/installation/#requirements) installed.

Initialize Docusaurus 2 in the repo by running [`yarn`](https://classic.yarnpkg.com/en/docs/cli/) once in the root directory of the repo.
Initialize Docusaurus 2 in the repo by running [`yarn`](https://classic.yarnpkg.com/en/docs/cli/) or [`npm`](https://docs.npmjs.com/cli/v10) once in the root directory of the repo.

Now you can build and view the site locally:


```shell
npm start
```

or

```shell
yarn start
```


The command starts a local development server and opens a browser window.

## Prettier

**Note: The website has been migrated to use `npm` for building, testing, and deploying.**

Steps 1 to 3 are the same for both `yarn` and `npm`

1. Fork the repository

2. Clone the repository with the following command. Replace the {'<'}GITHUB_USERNAME{'>'} with your username
Expand All @@ -55,6 +67,29 @@ git clone https://github.com/<GITHUB_USERNAME>/docs.git
cd docs
```

### Using `npm`

4. Install all the dependencies

```shell
npm install
```

5. Start the development server.

```shell
npm start
```

6. To reformat:

```shell
npm prettier --write '**/*.{js,md}'
```


### Using `yarn` (Legacy)

4. Install all the dependencies

```shell
Expand All @@ -73,6 +108,7 @@ yarn start
yarn prettier --write '**/*.{js,md}'
```


When we merge your PR, a new build automatically occurs and your changes publish to [https://docs.keploy.io](https://docs.keploy.io).

## How to Contribute Code?
Expand Down
Loading

0 comments on commit d85ac46

Please sign in to comment.