View the live site at downtime.dev.
Clone the repo with your preferred process and cd
into it:
git clone git@github.com:gravitational/downtime.git
cd downtime
Install dependencies with:
yarn
Run the development server with:
yarn dev
Open http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying pages/index.js
. The page auto-updates as you edit the file.
API routes can be accessed on http://localhost:3000/api/hello. This endpoint can be edited in pages/api/hello.js
.
The pages/api
directory is mapped to /api/*
. Files in this directory are treated as API routes instead of React pages.
Create a request in Asana for website changes.
- Image Sourcing: Images should be open source or sourced from istockphoto.com.
- Image size: Image size should be 1200px (horizontal) by 800px (vertical) and less than 1MB. The image name should be appended with
@2x
for optimal sizing by the browser.
-
Visit the "DowntimeData" space on Contentful.
-
To add a joke select the "Content" tab from the top navigation bar, verify that content type is "joke", and select "Add Joke" on right hand side.
-
Add joke data in each field:
- headline (required): This is the joke.
- slug (automatically generated): This is automatically generated based on the headline in a url friendly format. Please do not edit this field.
- Note: Any changes to the headline BEFORE it is published will automically be reflected in the slug. After the joke is published, the slug will remain the same because it represents a live url.
- pubDate (required): Date that joke will be published. Select date and UPDATE TIMEZONE TO UTC-5:00 (the default UTC-4:00 will display dates slightly off). Time can remain at 00:00.
- Note: The date applied to pubDate should be the same date selected for publishing the post.
- image (required): follow prompts to "add existing media" or "add new media". Make sure that the image is set to "published" so it can be sent by Contentful.
- Image size:
- Dimensions: image should be as close to 1200px width by 800px height as possible, but cannot be larger than these dimensions.
- File size: no larger than 1MB
- Image size:
- Schedule joke for publishing.
Option 1 - Schedule Future Publishing Date: The joke may be scheduled for a future publishing date that matches the "pubDate" field. In this case, select the dropdown to the right of the green "Publish" button and select "Set Schedule." Schedule the joke to be published on the "pubDate", at 9am GMT-05:00 (US EST).
Option 2 - Publish Immediately: If a joke should be published immediately select the green "Publish" button on the right hand side of the screen.
That's it for adding a joke - the integration with Vercel will immediately begin re-building the site with the new joke at publishing time.
-
Checkout
main
and pull the latest version -
Create your own branch ex.
delia/new-image
-
View and edit your changes locally
-
Make changes
-
See your changes by running the site on
http://localhost:3000/
withyarn dev
-
Create a pull request detailing changes
-
After a pull request is approved, "squash and merge" into
main
-
Include a description of your changes
-
Include a reference to tickets you are closing (if applicable)
-
Assign reviewer(s)
-
The reviewers must approve changes
-
Once approved you may merge your branch into
main
-
Please note, changes in
main
are automatically deployed. Do not merge items intomain
that are not production ready.