Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Website Repository README #89

Merged
merged 1 commit into from
Sep 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 28 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,46 @@
# Website
# OpenDataCam Website

This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.
This repository hosts the code for the OpenDataCam Website: [https://opendata.cam](https://opendata.cam).

### Installation
## Contributing

```
$ yarn
```
Just like OpenDataCam, the website is open source, so anyone can contribute.
The simplest way to contribute to the OpenDataCam website is to edit pages directly via GitHub.
Just open the page/file that you want to update and follow the [instruction on how to edit files in GitHub](https://docs.github.com/en/repositories/working-with-files/managing-files/editing-files).

### Local Development
When you are done editing, create a new pull-request, so the OpenDataCam communitiy can review your edits.
Once the pull request get's merged, your changes will be visible on the website in a few minutes.

```
$ yarn start
```
## Local Development

For more complex changes to the website it may be useful to set up a local development environment to test the changes before they go live.
Doing so is quite easy, as this website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
### Installation

Requirements: NodeJS & npm

### Build
Install dependencies via npm

```
$ yarn build
$ npm i
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.

### Deployment
### Serving Locally

Using SSH:
This command starts a local development server on HTTP port 3000 and opens up a browser window.
Most changes are reflected live without having to restart the server.

```
$ USE_SSH=true yarn deploy
$ npm run dev
```

Not using SSH:
### Contributing your changes

```
$ GIT_USER=<Your GitHub username> yarn deploy
```
Just like with editing GitHub directly, to make your changes go live, open a Pull Reques against the `main` branch of the [opendatacam-website](https://github.com/opendatacam/opendatacam-website) repository.

## License

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
The OpenDataCam Website is licensed under [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/).
The source code in this repository is licensed under [MIT](https://mit-license.org/).
All third party components incorporated into the OpenDataCam Website are licensed under the original license provided by the owner of the applicable component.
2 changes: 1 addition & 1 deletion docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ const config = {
],
},
],
copyright: `Copyright © 2017 - ${new Date().getFullYear()} OpenDataCam`,
copyright: `OpenDataCam Website © 2017 - ${new Date().getFullYear()} is licensed under <a href="https://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA 4.0<a>`,
},
prism: {
theme: lightCodeTheme,
Expand Down
Loading