From 6e85a3a8954909295c8bbe91c048f421e6d8010e Mon Sep 17 00:00:00 2001 From: Mika Braginsky Date: Fri, 10 May 2024 16:26:50 -0400 Subject: [PATCH] Update README.md --- README.md | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 8b2fdd1..82f2ea6 100644 --- a/README.md +++ b/README.md @@ -1,24 +1,24 @@ # datapage +A datapage is a website for your data, showing users interactive visualizations, documentation, and the data itself. And whatever other content you want! + +This takes the form of a [quarto](https://quarto.org/) extension that provides a custom quarto project type and format. + ## Getting started -To make a datapage for your dataset, first [put your dataset in Redivis](https://docs.redivis.com/guides/create-and-manage-datasets/create-and-populate-a-dataset). +To make a datapage for your dataset, first [put your dataset in Redivis](https://redivis.com/workspace/datasets) ([see here for more information on Redivis datasets](https://docs.redivis.com/guides/create-and-manage-datasets/create-and-populate-a-dataset)). +0_redivis_dataset -You'll also need create a [Redivis API token](https://apidocs.redivis.com/rest-api/authorization). +You'll also need to go into your Redivis account settings and [create a Redivis API token](https://redivis.com/workspace/settings/tokens) ([see here for more information](https://apidocs.redivis.com/rest-api/authorization)). +1_redivis_token -Then make a GitHub repo for your datapage from this template repo. You can click on the "Use this template" button up top to create your repository (and make sure you check "Include all branches" on the next screen). Alternatively, you can run (replacing `my-project-name` accordingly): -``` -gh repo create my-project-name --template datapages/datapage --include-all-branches --public --clone -``` +Then make a GitHub repo for your datapage from this template repo. You can click on the "Use this template" button up top to create your repository (and make sure you check "Include all branches" on the next screen). +1_template_repo +2_create_repo -To link up your repo with Redivis, you need to provide your Redivis API token. For local development, create a file at the root of the repo called `.Renviron` with the contents (replacing `12345` accordingly): -``` -REDIVIS_API_TOKEN=12345 -``` -For deployment on GitHub actions, add the token as a repository secret. You can go into your repository's Settings > Secrets and variables > Actions and click on "New repository secret". Alternatively, you can run: -``` -gh secret set -f .Renviron -``` +To link up your repo with Redivis, you need to provide add your Redivis API token as a repository secret. You can go into your repository's Settings > Secrets and variables > Actions and click on "New repository secret" and give it the name `REDIVIS_API_TOKEN`. +4_add_secret +5_new_secret Now you can customize your datapage! In the `_quarto.yml` file, set your project title and your Redivis table information: ``` @@ -30,4 +30,11 @@ redivis: In `index.qmd`, edit the title, subtitle, and description for your homepage. In `about.qmd`, edit the images, links, and citation. The other pages update automatically. +## Local developement + +For local development, create a file at the root of the repo called `.Renviron` with the contents (replacing `12345` accordingly): +``` +REDIVIS_API_TOKEN=12345 +``` + For local development, run `quarto preview` to see the site output. Once you push to GitHub, a GitHub action automatically renders the site and deploys it to GitHub pages.