Skip to content

Commit

Permalink
Merge pull request #96 from The-Strategy-Unit/88_93
Browse files Browse the repository at this point in the history
Adds info on adding new page, contributing via forking, and fixes dark mode
  • Loading branch information
yiwen-h authored Jan 19, 2024
2 parents 9e517fc + e073cb4 commit 6a2cf4c
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 17 deletions.
41 changes: 24 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,38 @@ This repo features:

## Contributing to this repo

* Request access from a member of [the Data Science team](https://the-strategy-unit.github.io/data_science/about.html), they need to add you as a contributor
* Create an issue for the thing you want to add on GitHub
* Clone the repository (in RStudio, File > New Project > Checkout a project from a version controlled repository). Paste in the URL of this repository
* Check out the main branch and check it's up to date in the RStudio Terminal (type `git checkout main && git pull` in terminal)
* Check out a new branch (`git checkout -b issue-number` in terminal)
1. Request access from a member of [the Data Science team](https://the-strategy-unit.github.io/data_science/about.html), they need to add you as a contributor. Alternatively, you can [fork the repository](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo) to your own GitHub account.
2. Create an issue for the thing you want to add on GitHub
3. Clone the repository (in RStudio, File > New Project > Checkout a project from a version controlled repository). Paste in the URL of this repository, or the forked repository if you have forked it.
4. Check out the main branch and check it's up to date in the RStudio Terminal (type `git checkout main && git pull` in terminal)
5. Check out a new branch (`git checkout -b issue-number` in terminal)

Please note this project uses renv. On Windows, I needed to install the R toolchain [RTools](https://cran.r-project.org/bin/windows/Rtools/) to compile some of the packages
Please note this project uses {renv}. On Windows, I needed to install the R toolchain [RTools](https://cran.r-project.org/bin/windows/Rtools/) to compile some of the packages. If you have {renv} installed, run `renv::install()` in your Console to install all the packages required by this project to render the Quarto webpage.

### How to create a new presentation

* Make the presentation with quarto, and put it in `presentations/` in a `YYYY-MM-DD_Talk-title` folder. Your presentation should conform to the SU branding.
* Add a link to the presentation folder in the bulleted list in the `index.qmd` file in presentations:
* `* presentations/YYYY-MM-DD_Talk-title`
1. Make the presentation with quarto, and put it in `presentations/` in a `YYYY-MM-DD_Talk-title` folder. Your presentation should conform to the SU branding.
2. Add a link to the presentation folder in the bulleted list in the `index.qmd` file in presentations:
\n `* presentations/YYYY-MM-DD_Talk-title`


### How to create a new blogpost

* Navigate to the `blogs/posts` folder
* Copy a previous blogpost file and use that as your template
* If you want to see how it looks before pushing to GitHub, click Render in RStudio. The HTML version of your new post should open in your browser.
1. Navigate to the `blogs/posts` folder
2. Copy a previous blogpost file and use that as your template
3. If you want to see how it looks before pushing to GitHub, click Render in RStudio. The HTML version of your new post should open in your browser.


### Pushing your blog post/presentation to GitHub
### How to create/edit pages on the website

* Save your file, then add and commit it (`git add file.qmd` and `git commit -m "Add blog post/presentation about x"`)
* Push your content to your branch in GitHub (`git push origin branchname`).
* Then, on GitHub, make a pull request to main. Put any member of the Data Science team down as a reviewer. Link your pull request with your issue by typing `Closes #issuenumber` in the comment field of your pull request.
* When approved and merged to main, the Quarto page will automatically be rendered thanks to the GitHub action that has been set up.
1. Find the `.qmd` file that you wish to edit. For example, if you want to add to the Style Guide page, edit the `style/style_guide.qmd` file.
2. If creating a new page, copy an existing `.qmd` file and use that as a template.
3. If you want to see how it looks before pushing to GitHub, click Render in RStudio. The HTML version of your new post should open in your browser.


### Pushing your blog post/presentation/page to GitHub

1. Save your file, then add and commit it (`git add file.qmd` and `git commit -m "Add blog post/presentation about x"`)
2. Push your content to your branch in GitHub (`git push origin branchname`).
3. Then, on GitHub, make a pull request to main. Put any member of the Data Science team down as a reviewer. Link your pull request with your issue by typing `Closes #issuenumber` in the comment field of your pull request.
4. When approved and merged to main, the Quarto page will automatically be rendered thanks to the GitHub action that has been set up.
2 changes: 2 additions & 0 deletions theme-dark.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@ $navbar-bg: #2c2825;
$navbar-fg: #f9bf07;

$body-bg: #2c2825;
$code-block-bg: #000000;
$body-fg: #f5f4f3;
$body-color: #f5f4f3;
$link-color: #5881c1;

0 comments on commit 6a2cf4c

Please sign in to comment.