Skip to content

Commit

Permalink
Merge pull request deepset-ai#161 from deepset-ai/update-readme
Browse files Browse the repository at this point in the history
Improve the setup section of the README with a few notes
  • Loading branch information
ZanSara committed Sep 20, 2021
2 parents 2da9986 + b06c931 commit 4b2d259
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
## Development

### Environment Variables

Get a [personal access token from GitHub](https://github.com/settings/tokens/new). The `public_repo` scope is sufficient.
### Getting Started

Create a `.env.local` file and add your token as an env variable:
First, install Next.js (if needed):

```bash
GITHUB_PERSONAL_ACCESS_TOKEN="youraccesstoken"
npm install next react react-dom
# or
yarn install next
```

### Getting Started

First, run the development server:
Then, run the development server:

```bash
npm run dev
Expand All @@ -30,6 +28,16 @@ yarn dev:watch

Open [http:https://localhost:3000](http:https://localhost:3000) with your browser to see the result.

#### Environment Variables

If you have permission issues when starting up, get a [personal access token from GitHub](https://github.com/settings/tokens/new). The `public_repo` scope is sufficient.

Create a `.env.local` file and add your token as an env variable:

```bash
GITHUB_PERSONAL_ACCESS_TOKEN="youraccesstoken"
```

### Required Reading

This project makes heavy use of Next.js's [getStaticProps](https://nextjs.org/docs/basic-features/data-fetching#getstaticprops-static-generation) and [getStaticPaths](https://nextjs.org/docs/basic-features/data-fetching#getstaticpaths-static-generation) functions, to fetch markdown files at build time (locally from the `docs` directory as well as from GitHub using the GitHub API) and generate html pages for each of these files. Before working on the project, it's vital that you understand how these functions work and how they apply to this project. [This example](https://github.com/vercel/next.js/tree/canary/examples/blog-starter-typescript) and [this example](https://github.com/vercel/next.js/tree/canary/examples/with-mdx-remote) may be used as simple demonstrations of these functions to solidify your understanding.
Expand Down

0 comments on commit 4b2d259

Please sign in to comment.