Skip to content

Commit 85f8de4

Browse files
committed
readme
1 parent 15a6d42 commit 85f8de4

File tree

2 files changed

+15
-135
lines changed

2 files changed

+15
-135
lines changed

README.md

+14-134
Original file line numberDiff line numberDiff line change
@@ -1,145 +1,25 @@
1-
<h1 align="center">Course Website Starter Template</h1> <br>
1+
<p align="center"><a href="fem"><img alt="react logo" title="React" src="./public/images/course-icon.png" /></a></p>
22

3-
<p align="center">
4-
A starter template build in Next.js for creating educational materials using Markdown.
5-
</p>
3+
[![Frontend Masters](https://static.frontendmasters.com/assets/brand/logos/full.png)][fem]
64

7-
## Get Started
5+
[Please click here][course] to head to the course website.
86

9-
1. Set up Node.js v20+
10-
1. Clone this repo
11-
1. Run `npm install`
12-
1. Run `npm run dev` to start the dev server
13-
1. Open http://localhost:3000/<your production base path as defined in course.json> in a browser
7+
# Issues and Pull Requests
148

15-
_Instructions for deploying the course website to GitHub Pages are below_
9+
Please file issues and open pull requests here! Thank you! For issues with project files, either file issues on _this_ repo _or_ open a pull request on the projects repos. This repo itself is the course website.
1610

17-
## Configure Your Course
11+
# Project Files
1812

19-
There are several things to configure before getting started.
13+
[Please go here][project] for the project files.
2014

21-
### course.json
15+
# License
2216

23-
This json file allows you to configure the details of the site. Update the info here and it'll update it everywhere throughout the course website.
17+
The content of this workshop is licensed under CC-BY-NC-4.0. Feel free to share freely but do not resell my content.
2418

25-
- _author.name_ – Your name
26-
- _author.company_ – The company you work at or whatever you want as your subtitle. Optional.
27-
- _title_ – The title of your course
28-
- _subtitle_ – The subtitle of your course. Optional.
29-
- _frontendMastersLink_ – A link to the published video on FrontendMasters.com. Optional.
30-
- _social.linkedin_ - Your LinkedIn public user name, just the name, not the full link. Optional
31-
- _social.twitter_ – Your Twitter user name. Optional.
32-
- _social.github_ – Your GitHub user name. Optional.
33-
- _description_ – The description you want to show up in search engine results.
34-
- _keywords_ – The SEO keywords for this course. An array of strings
35-
- _productionBaseUrl_ – Typically useful for GitHub Pages. This adds a base path to your project. For GitHub Pages, this will be the name of your repo. For example, this site's base URL is `/next-course-starter` because the production URL for this site is `btholt.github.io/next-course-starer`. Do note this will also make your dev server's base URL this as well so you can catch problems before they go to production. **IF THIS IS SET, YOUR / PATH WILL 404**
36-
- _csvPath_ – A CSV with the meta data for your lessons will be created at this path when you build or export the project. If you delete this config option it will not generate a CSV.
19+
The code, including the code of the site itself and the code in the exercises, are licensed under Apache 2.0.
3720

38-
### styles/variables.css
21+
[fem]: https://frontendmasters.com/workshops/complete-react-v9/
22+
[course]: https://react-v9.holt.courses
23+
[project]: https://github.com/btholt/citr-v9-project/
3924

40-
Here is where you can theme your site. You can retheme the whole site with just these.
41-
42-
### public/images
43-
44-
Here is where you should stick all your images. Inside of your markdown, refer to images in this folder as `./images/<image file name>`.
45-
46-
Note this site doesn't use `next/image` because that requires the server component.
47-
48-
### public/images/author.jpg
49-
50-
Your image. If you call it this, you won't have to change any code. If you need to change it, it's in `pages/index.js`.
51-
52-
### public/images/social-share-cover.jpg
53-
54-
The image that will be used if someone shares your website to Twitter/Facebook/etc. If you call it this, you won't have to change any code. If you do need to change it, it's in `pages/index.js`
55-
56-
### public/images/course-icon.png
57-
58-
The image at the top of the course. If you call it this, you won't have to change any code. If you do need to change it, it's in `pages/index.js`
59-
60-
## Favicon
61-
62-
Just replace the favicon\* files and the apple-touch-icon.png in the public/images directory. If you have a PNG, [favicon.io](https://favicon.io) will generate these files for you. If you don't want favicons, just remove the references to them in `pages/_app.js`.
63-
64-
## Lessons
65-
66-
All your markdown lesson files will go in `lessons/`. They **must** be organized an named this way:
67-
68-
The folders must be named `01-section-one-name`, `02-section-two-name`, `03-section-three`, etc.
69-
70-
The lessons are then grouped inside of these, the lessons are ordered by letters, `A-lesson-one.md`, `B-lesson-two.md`, `C-lesson-three.md`, etc. This numbering scheme matches how Frontend Masters organizes their content.
71-
72-
The titles of your lessons and sections are generated from the folder and lesson names (and can be overridden.) The first, organizing part of the name is stripped (the `01-` part of `01-section-one` and the `A-` part of `A-lesson-one`), the hyphens are turned into spaces (`section-one` becomes `section one`) and then those are run through [title-case](https://github.com/blakeembrey/change-case#titlecase) (so `section one` becomes `Section One`.) If you need to override these, use the frontmatter (explained below.)
73-
74-
The folder and lesson names are also used for the slugs. `02-section-two/C-lesson-three.md` becomes `yoursite.com/lessons/section-two/lesson-three`.
75-
76-
Each of these lessons can have a [frontmatter](https://github.com/jonschlinkert/gray-matter#readme) for the following properties
77-
78-
- _title_ – If you want the title to be different from the file name, you can specify here what that title should be. Frequently this useful for things where the capitalization would be off e.g. TailwindCSS instead of Tailwindcss. Optional.
79-
- _description_ – If you want to give individual lessons descriptions for SEO and for Frontend Masters, you can write a brief description here.
80-
- _keywords_ - If you want to give individual lessons keywords for SEO purposes, write a comma separated list
81-
82-
🤖: now the course starter can auto-generate the description and keywords for you using ChatGPT. See below how to.
83-
84-
Be aware because of how the numbers and letters are stripped out, it is possible to have ambigious paths. `01-welcome/A-intro.md` and `03-welcome/D-intro.md` would resolve to the same thing and only the first one would be visitable.
85-
86-
## meta.json
87-
88-
Each **section** (e.g. inside of `03-section-three` folder) folder can have a meta.json file, and is totally optional.
89-
90-
- _title_ – an override for the title of the section. Frequently useful for capitalization e.g. `JS Tools` instead of `Js Tools`.
91-
- _icon_ – so you can set the icon used in the home page and the header. These icons are pulled from [the free Font Awesome v5 icons](https://fontawesome.com/v5.15/icons). If you want [fa-hammer](https://fontawesome.com/v5.15/icons/hammer), use "hammer" as the value for icon.
92-
93-
## highlight.js Theme
94-
95-
The code blocks use [Highlight.js](https://highlightjs.org/static/demo/). By default it will use `a11y-light` as the theme for the code blocks. Change the CSS import in `pages/_app.js` to the theme you want to use.
96-
97-
## GitHub Pages / GitHub Actions
98-
99-
By default this repo works with GitHub Pages (classic). Just make sure you set the `productionBaseUrl` in the course.json to the name of the repo.
100-
101-
It also includes a GitHub Action to automatically deploy to your `gh-pages` branch. Just make sure that your repo has GitHub Pages (classic) enabled and the branch is set to `gh-pages`. If you're not deploying to GitHub Pages go ahead and delete the `.github` directory.
102-
103-
By default the GitHub Action looks for a `main` branch, so be sure you're using that instead of `master`.
104-
105-
If you want a custom domain, make sure you uncomment the `fqdn` field in [.github/workflows/next.yaml](https://github.com/btholt/next-course-starter/blob/main/.github/workflows/next.yaml) file and put your custom domain. If you don't do that and only set it up with the GitHub web GUI, every deploy will break the custom domain.
106-
107-
### GitHub Pages Instructions
108-
109-
These instructions assume you've followed the setup instructions above and have a cloned version of this repo locally.
110-
111-
1. Create a new (public) remote repository in your GitHub Account (e.g. fem-javascript-fundamentals).
112-
1. Grant `Read and write permissions` for Workflows under Actions > General > Workflow Permissions.
113-
1. Update the `productionBaseUrl` in the `course.json` file to match the name of the repository.
114-
1. Push to the new repository. You should see the `Deploy NextJS Course Site` workflow run under the Actions tab.
115-
1. Configure GitHub Pages: Settings > Pages > Deploy from a Branch. Select the `gh-pages` branch.
116-
1. Once the `pages-build-deployment` action completes, you should see your site at `https://USERNAME.github.io/REPO_NAME`.
117-
118-
_Future pushes to the main branch will automatically trigger a new deployment._
119-
120-
## Example Sites
121-
122-
- [This repo itself](https://btholt.github.io/next-course-starter/)
123-
- [Complete Intro to React v6](https://btholt.github.io/next-react-v6/)
124-
- [Complete Intro to React v7](https://btholt.github.io/complete-intro-to-react-v7/)
125-
- [Complete Intro to Web Dev v3](https://btholt.github.io/complete-intro-to-web-dev-v3/)
126-
127-
## npm commands
128-
129-
- `npm run dev` - Next's dev command. Start a local dev server. Note if you have a productionBasePath set in your course.json, your dev server will respect that (so you don't mess up your paths in production.)
130-
- `npm run build` - Build your site for production. This will still include the Next.js server run time. Use this if you're using something like Vercel to host your site.
131-
- `npm run start` - Start an already-built server.
132-
- `npm run csv` – Will generate the CSV of the metadata from your course. Note you may have to run build first, depending on your csvPath.
133-
- `npm run seo` – Using ChatGPT, every file that does not have a description, ChatGPT will generate a description and keywords and write them to the file. Requires you to set a valid `OPENAI_API_KEY` (which means having a paid OpenAI account) using a [.env](https://github.com/motdotla/dotenv) or just by setting it in the environment. If a description already exists, this will skip it.
134-
135-
## Analytics
136-
137-
By default this doesn't generate any analytics. If you are creating a Frontend Masters course and would like a weekly report of analytics, contact me (Brian Holt) and I'll give you a snippet to drop on your page (though fair warning, I will also have access to your data, if that bothers you.)
138-
139-
Otherwise I'm pretty pleased with [Simple Analytics](referral.simpleanalytics.com/brian) (this is a referral link, free month for me and free month for you); I've been using them for my courses personally.
140-
141-
## License
142-
143-
The **code** is this repo is licensed under the Apache 2.0 license.
144-
145-
I include the CC-BY-NC-4.0 license for the content; this is what I recommend you license your **content** under: anyone can use and share the content but they cannot sell it; only you can.
25+
[React icons created by Pixel perfect - Flaticon](https://www.flaticon.com/free-icons/react)

styles/variables.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
--text-header: var(--primary);
77
--text-main-headers: var(--highlight);
88
--text-links: #007bff;
9-
--text-footer: #333;
9+
--text-footer: var(--highlight);
1010

1111
--bg-main: white;
1212
--bg-dots: var(--highlight);

0 commit comments

Comments
 (0)