|
1 | 1 | # Cardano Development Updates
|
2 | 2 |
|
3 |
| -This repository will host updates from the |
4 |
| -[cardano](https://github.com/input-output-hk/cardano-node) development teams. |
5 |
| -The generated website containing the updates can be found |
6 |
| -[here](https://input-output-hk.github.io/cardano-updates/). |
| 3 | +This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator. |
7 | 4 |
|
8 |
| -## Setup |
| 5 | +### Installation |
9 | 6 |
|
10 |
| -You need to install [git-lfs extension](https://git-lfs.github.com/). If you |
11 |
| -want to add a large file to the repository please consider using `git-lfs`. |
| 7 | +``` |
| 8 | +$ yarn |
| 9 | +``` |
12 | 10 |
|
13 |
| -## Add an update |
| 11 | +### Local Development |
14 | 12 |
|
15 |
| -To add an update create a file under `posts` directory which name is: |
16 |
| -`yyyy-mm-dd-TEAM.markdown`. Commit and push. The site will be built and |
17 |
| -deployed by a [github-action](https://github.com/input-output-hk/cardano-updates/actions). |
| 13 | +``` |
| 14 | +$ yarn start |
| 15 | +``` |
18 | 16 |
|
19 |
| -The format of the posts is up to each team, |
20 |
| -except that everyone should start each post with a `# High level summary` section. |
21 |
| -This section will be used by technical writers to share information with the general public. |
22 |
| -The better suited this section is for the technical writers, |
23 |
| -the less chance there is for misinformation. It should ideally be one short paragraph. |
| 17 | +This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server. |
24 | 18 |
|
25 |
| -Avoid using links which are not publicly accessible. |
| 19 | +### Build |
26 | 20 |
|
27 |
| -## Serve the website locally |
| 21 | +``` |
| 22 | +$ yarn build |
| 23 | +``` |
28 | 24 |
|
29 |
| -If you wish to preview changes before publishing them, you can serve the site |
30 |
| -locally with: |
| 25 | +This command generates static content into the `build` directory and can be served using any static contents hosting service. |
31 | 26 |
|
32 |
| -```bash |
33 |
| -cabal run site -- watch |
34 |
| -``` |
| 27 | +### Deployment |
35 | 28 |
|
36 |
| -The site can then be previewed in a browser at http://127.0.0.1:8000. |
| 29 | +Using SSH: |
37 | 30 |
|
38 |
| -## Workflow |
| 31 | +``` |
| 32 | +$ USE_SSH=true yarn deploy |
| 33 | +``` |
39 | 34 |
|
40 |
| -Each team is welcome to use whatever workflow that they prefer. |
41 |
| -The options include: |
| 35 | +Not using SSH: |
42 | 36 |
|
43 |
| -* Pushing directly to the `main` branch. |
44 |
| -* Using pull requests as a way to involve the whole team before publishing. |
45 |
| -* Using pull requests to incrementally add to the report each day, |
46 |
| - and then merging at the end of a two week period. |
| 37 | +``` |
| 38 | +$ GIT_USER=<Your GitHub username> yarn deploy |
| 39 | +``` |
47 | 40 |
|
48 |
| -Regardless of the workflow chosen, it is important that we strive to keep the git history clean. |
49 |
| -This means never force pushing on main, and usually having one commit per new post. |
| 41 | +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. |
0 commit comments