Skip to content

Commit 5c944eb

Browse files
authored
chore: update env var section (#16)
* starts update to env var section * --amend * add video and and link to walkthrough
1 parent 6eecf05 commit 5c944eb

File tree

1 file changed

+22
-15
lines changed

1 file changed

+22
-15
lines changed

README.md

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ A customizable blog starter using:
99
- Built-in [MDX](https://mdxjs.com/) v1 support
1010
- Includes modern design with dark & light themes
1111

12+
[Click here to watch the template walkthrough!](https://www.youtube.com/watch?v=U2eTCO_xiHc)
13+
1214
![Preview of blog theme. Author named Jay Doe and blog's name is "Next.js Blog Theme" with one blog post](nextjs-blog-theme-preview.png)
1315

1416
[Take a gander at the demo.](https://bejamas-nextjs-blog.netlify.app)
@@ -46,21 +48,27 @@ Through the [setup wizard](https://nextjs-wizard.netlify.app/), you can create y
4648
The config is based on environment variables to make it easy to integrate with any Jamstack platform, like Netlify.
4749

4850
Here are the variables you can edit:
51+
| Variable | Description | Options
52+
| --- | --- | --- |
53+
| `BLOG_NAME` | the name of your blog, displayed below the avatar ||
54+
| `BLOG_TITLE` | the main header (`h1`) on the home page ||
55+
| `BLOG_FOOTER_TEXT`| the text in the footer ||
56+
| `BLOG_THEME` | the theme to pass to Tailwind | default |
57+
| `BLOG_FONT_HEADINGS` | the font-family for all HTML headings, from `h1` to `h6`| sans-serif (default), serif, monospace|
58+
| `BLOG_FONT_PARAGRAPHS` | the font-family for all other HTML elements | sans-serif (default), serif, monospace|
59+
60+
All of the env variables can be configured through the [Wizard](https://nextjs-wizard.netlify.app/) or through setting the project's environment variables. You can do this in your Netlify dashaboard (Site settings/Build & deploy/Environment/Environment variables).
61+
62+
4963

50-
- `BLOG_NAME` - that's the name of your blog and will be displayed below the avatar.
51-
- `BLOG_TITLE` - the main header (`h1`) on the home page, this can be a slogan.
52-
- `BLOG_FOOTER_TEXT` - the text in the footer, usually copyright info.
53-
- `BLOG_THEME`
54-
- `BLOG_FONT_HEADINGS` - the font-family for all HTML headings, from `h1` to `h6`. The value can be one of those:
55-
- `sans-serif` (selected by default)
56-
- `serif`
57-
- `monospace`
58-
- `BLOG_FONT_PARAGRAPHS` - the font-family for all other HTML elements. The value can be one of those:
59-
- `sans-serif` (selected by default)
60-
- `serif`
61-
- `monospace`
62-
63-
All of the env variables can be configured through the [Wizard](https://nextjs-wizard.netlify.app/).
64+
https://user-images.githubusercontent.com/3611928/153997545-6dcdeef0-e570-49e7-93d6-ce0d393d16c9.mp4
65+
66+
[alt: video walkthrough of editing env vars]
67+
68+
If setting an environment variable isn't your cup of tea, the defaults can be changed in [`utils/global-data.js`](/utils/global-data.js). You can also remove the variables and hard code blog information where these variables are used in the code base.
69+
70+
- `BLOG_THEME, BLOG_FONT_HEADINGS, & BLOG_FONT_PARAGRAPHS` are used in [`tailwind-preset.js`](tailwind-preset.js)
71+
- `BLOG_NAME, BLOG_TITLE, BLOG_FOOTER_TEXT` are used in [`pages/index.js`](pages/index.js) & [`pages/posts/[slug].js`](pages/posts/[slug].js) through the `globalData` object.
6472

6573
## Adding new posts
6674

@@ -71,4 +79,3 @@ Since the posts are written in `MDX` format you can pass props and components. T
7179
https://user-images.githubusercontent.com/3611928/152727802-102ec296-41c8-446d-93ed-922d11187073.mp4
7280

7381
[alt: video walkthrough of adding a new blog post]
74-

0 commit comments

Comments
 (0)