Skip to content

Commit 35b9707

Browse files
Improve README and simplify .env.example (#159)
1 parent a934585 commit 35b9707

File tree

4 files changed

+38
-27
lines changed

4 files changed

+38
-27
lines changed

.env.example

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
1-
FLY_APP_NAME="remixdotrun"
2-
3-
# Get from https://app.convertkit.com/account_settings/advanced_settings
4-
CONVERTKIT_KEY="..."
5-
61
# A token to increase the rate limiting from 60/hr to 1000/hr
7-
GITHUB_TOKEN="..."
2+
GITHUB_TOKEN=""
83

94
# GitHub repo to pull docs from
105
SOURCE_REPO="remix-run/remix"
@@ -15,6 +10,9 @@ RELEASE_PACKAGE="remix"
1510
# For development, reading the docs from a local repo
1611
LOCAL_REPO_RELATIVE_PATH="../remix"
1712

13+
# Only needed locally if testing newsletter signup -- get from https://app.convertkit.com/account_settings/advanced_settings
14+
CONVERTKIT_KEY="..."
15+
1816
# Not used locally, but make sure this is set in GitHub for production
1917
FASTLY_API_TOKEN="..."
20-
FASTLY_SERVICE_ID="..."
18+
FASTLY_SERVICE_ID="..."

README.md

Lines changed: 30 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,30 @@
11
# Remix Website
22

3-
## Installation
3+
## Setup
44

55
First setup your `.env` file, use `.env.example` to know what to set.
66

7+
```sh
8+
cp .env.example .env
9+
```
10+
11+
Install dependencies
12+
713
```sh
814
npm i
915
```
1016

17+
## Local Development
18+
1119
Now you should be good to go:
1220

1321
```sh
1422
npm run dev
1523
```
1624

17-
To preview local changes to the `docs` folder in the Remix repo, select "local" from the version dropdown menu on the site.
25+
To preview local changes to the `docs` folder in the Remix repo, select "local" from the version dropdown menu on the site. Make sure you have the [remix repo](https://github.com/remix-run/remix) cloned locally and `LOCAL_REPO_RELATIVE_PATH` is pointed to the correct filepath.
1826

19-
There are a couple LRUCache's for talking to GitHub and processing markdown that expire after 5 minutes. If you want them to expire immediately for local development, set the `NO_CACHE` environment variable.
27+
We leverage a number of LRUCache's to server-side cache various resources, such as processed markdown from GitHub, that expire at various times (usually after 5 minutes). If you want them to expire immediately for local development, set the `NO_CACHE` environment variable.
2028

2129
```sh
2230
NO_CACHE=1 npm run dev
@@ -55,15 +63,7 @@ When you're happy with it, merge your branch into `main` and push.
5563

5664
## Content
5765

58-
Content is synced to the SQLite distributed system from the `main` branch. You do not need to deploy a tag in order to add or update content.
59-
60-
```sh
61-
git push origin main
62-
# watch the app instances pull the new content
63-
fly logs -a remixdotrun
64-
```
65-
66-
**Authoring Blog Articles:**
66+
### Authoring Blog Articles
6767

6868
- Put a markdown file in `data/posts/{your-post-slug}.md`
6969
- Follow the conventions found in other blog articles for author/meta
@@ -76,14 +76,27 @@ fly logs -a remixdotrun
7676

7777
When linking to other posts use `[name](article-slug)`, you don't need to do `[name](/blog/article-slug)`
7878

79-
**Changing page content:**
79+
### Adding to Showcase
80+
81+
[The Showcase](https://remix.run/showcase) page is a collection of sites built on Remix that are particularly impressive. If you think there is something missing from this list, feel free to open a PR for the team to review.
82+
83+
- Record quick demo of the website (~6s)
84+
- Grab or screenshot the first frame of the video
85+
- Add both resources to public/showcase-assets
86+
- Run `cd public/showcase-assets && ./convert.sh` to convert images and videos to compressed formats
87+
- Warning: this script was created hastily with ChatGPT and little concern for others running it. Feel free to offer improvements to the script and/or documentation
88+
- Remove/don't commit the original video and image
89+
- Add new showcase example data to [showcase.yaml](./data/showcase.yaml)
90+
91+
### Adding to Resources
92+
93+
[The Resources](https://remix.run/resources) page is a collection of templates and libraries that make building sites with Remix even easier. For now this data is driven by a yaml file, but eventually we anticipate replacing it with a database.
8094

81-
- Edit markdown files in `content/{pages,other}/{file}.md`
82-
- Push to `main`
95+
If you would like to contribute a new resource to these pages, simply add it to [resources.yaml](./data/resources.yaml)
8396

8497
## CSS Notes
8598

86-
You'll want the tailwind VSCode plugin fer sure, the hints are amazing.
99+
You'll want the [tailwind VSCode plugin](https://marketplace.visualstudio.com/items?itemName=bradlc.vscode-tailwindcss) fer sure, the hints are amazing.
87100

88101
The color scheme has various shades but we also have a special "brand" rule for each of our brand colors so we don't have to know the specific number of that color like this: `<div className="text-pink-brand" />`.
89102

@@ -95,6 +108,6 @@ We want to use Tailwind's default classes as much as possible to avoid a large C
95108

96109
## Algolia Search
97110

98-
We use [DocSearch](https://docsearch.algolia.com/) by Algolia for our documetnations search. The site is automatically scraped and an index generated weekly by the [Algolia Crawler](https://crawler.algolia.com/).
111+
We use [DocSearch](https://docsearch.algolia.com/) by Algolia for our documentation's search. The site is automatically scraped and indexed weekly by the [Algolia Crawler](https://crawler.algolia.com/).
99112

100113
If the doc search results ever seem outdated or incorrect be sure to check that the crawler isn't blocked. If it is, it might just need to be canceled and restarted to kick things off again. There is also an editor in the Crawler admin that lets you adjust the crawler's script if needed.

app/env.server.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ const requiredInDevelopment: z.RefinementEffect<
2323
};
2424

2525
const envSchema = z.object({
26-
FLY_APP_NAME: z.string(),
27-
2826
// Get from https://app.convertkit.com/account_settings/advanced_settings
2927
CONVERTKIT_KEY: z.string().optional().superRefine(requiredInProduction),
3028

app/lib/github.server.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import { Octokit } from "octokit";
22
import { env } from "~/env.server";
33

4-
export const octokit = new Octokit({ auth: env.GITHUB_TOKEN });
4+
export const octokit = new Octokit(
5+
env.GITHUB_TOKEN ? { auth: env.GITHUB_TOKEN } : undefined,
6+
);

0 commit comments

Comments
 (0)