FrontEnd Master algorithms!

Overview

next-course-starter


A NextJS starter to get you started creating educational materials using Markdown

Get Started

  1. Set up Node.js v14+
  2. Clone this repo
  3. Run npm install
  4. Run npm run dev to start the dev server
  5. Open http://localhost:3000 in a browser

Configure Your Course

There are several things to configure before getting started.

course.json

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.

  • author.name – Your name
  • author.company – The company you work at or whatever you want as your subtitle. Optional.
  • title – The title of your course
  • subtitle – The subtitle of your course. Optional.
  • frontendMastersLink – A link to the published video on FrontendMasters.com. Optional.
  • social.linkedin - Your LinkedIn public user name, just the name, not the full link. Optional
  • social.twitter – Your Twitter user name. Optional.
  • social.github – Your GitHub user name. Optional.
  • description – The description you want to show up in search engine results.
  • keywords – The SEO keywords for this course. An array of strings
  • 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.

styles/variables.css

Here is where you can theme your site. You can retheme the whole site with just these.

public/images

Here is where you should stick all your images. Inside of your markdown, refer to images in this folder as ./images/<image file name>.

Note this site doesn't use next/image because that requires the server component.

public/images/author.jpg

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.

public/images/social-share-cover.jpg

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

public/images/course-icon.png

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

Lessons

All your markdown lesson files will go in lessons/. They must be organized an named this way:

The folders must be named 01-section-one-name, 02-section-two-name, 03-section-three, etc.

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.

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 (so section one becomes Section One.) If you need to override these, use the frontmatter (explained below.)

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.

Each of these lessons can have a frontmatter for the following properties

  • 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.
  • description – If you want to give individual lessons descriptions for SEO and for Frontend Masters, you can write a brief description here.

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.

meta.json

Each section (e.g. inside of 03-section-three folder) folder can have a meta.json file, and is totally optional.

  • title – an override for the title of the section. Frequently useful for capitalization e.g. JS Tools instead of Js Tools.
  • 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. If you want fa-hammer, use "hammer" as the value for icon.

highlight.js Theme

The code blocks use Highlight.js. 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.

GitHub Pages / GitHub Actions

By default this repo works with GitHub Pages. Just make sure you set the productionBaseUrl in the course.json to the name of the repo.

It also includes a GitHub Action to automatically deploy to your gh-pages branch. Just make sure that your repo has GitHub Pages enabled and the branch is set to gh-pages. If you're not deploying to GitHub Pages go ahead and delete the .github directory.

By default the GitHub Action looks for a main branch, so be sure you're using that instead of master.

Example Sites

CSV

Not implemented yet, but coming soon.

If you run npm run csv, a CSV will be generated with all the various lessons' frontmatter outputted to public/lessons.csv. You can change the path by changing the OUTPUT_CSV_PATH environment variable.

Another CSV will be output to public/links.csv where it pull all the links out of each lesson and put them into a CSV. This path can be modified by setting the LINKS_CSV_PATH environment variable.

npm commands

  • 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.)
  • 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.
  • npm run export - Builds your site statically, use this if you're going to deploy to GitHub Pages, S3, or somewhere else with no server. This will run next build and then next export (no need to run build yourself first.)
  • npm run start - Start an already-built server.

License

The code is this repo is licensed under the Apache 2.0 license.

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.

You might also like...

Decompose algorithms in commutator notation.

Commutator Decompose algorithms in commutator notation. Let be any group. If , then the commutator of and is the element . The expression denotes the

Dec 15, 2022

Data structures & algorithms implementations and coding problem solutions. Written in Typescript and tested with Jest. Coding problems are pulled from LeetCode and Daily Coding Problem.

technical-interview-prep Data structures & algorithms implementations and coding problem solutions. Written in Typescript and tested with Jest. Coding

Aug 5, 2022

A Typescript companion to the book A Common-Sense Guide to Data Structures and Algorithms by Jay Wengrow

A Typescript companion to the book A Common-Sense Guide to Data Structures and Algorithms by Jay Wengrow

This repository aims to be a companion to the book A Common-Sense Guide to Data Structures and Algorithms by Jay Wengrow. I rewrote most of the data s

Dec 3, 2022

Sorting visualizer to introduce students to different sorting algorithms, how they work, and how to apply them

sorting-visualizer Sorting visualizer to introduce students to different sorting algorithms, how they work, and how to apply them Iteration 1 Demo: ht

Nov 14, 2022

Path-finding & Sorting algorithms Visualizer

Update - Changelog 📋 09.05.2022 AlgoVision is now fully mobile-responsive for all its features ! On mobile, the 'Mouse Chase' option in Dynamic Mode

Dec 18, 2022

For some realizations of the title and thinking of the book Introduction to Algorithms, if there is something wrong, please correct me.

Introduction-to-Algorithms Introduce Origin of this library Some implementations of the topics in Introduction to Algorithms and some reflections on t

Jun 9, 2022

Ace your next Javascript coding interview by mastering data structures and algorithms.

The Coding Interview: Algorithms + Data Structures Ace your next Javascript coding interview by mastering data structures and algorithms. Problem 1: S

Sep 19, 2022

Notes, challenge resolutions, and applications of the Grokking Algorithms book content with unit tests

Notes, challenge resolutions, and applications of the Grokking Algorithms book content with unit tests

Grokking Algorithms Statements Branches Functions Lines Notes, challenge resolutions, and applications of the Grokking Algorithms book content Index F

Aug 14, 2022

Science! Testing various image matching algorithms' performance on the Pinecone vector DB

Image Matching Algorithms For Use With KNN Search As part of the development of alt-text.org, it's necessary to perform large-scale fuzzy matching of

Sep 3, 2022
Owner
ThePrimeagen
ThePrimeagen
A plugin for Master Styles to group up styles and add selectors.

master-styles-group A plugin for Master Styles to group up styles and add selectors. THIS PROJECT IS IN BETA This project may contain bugs and have no

SerKo 5 Sep 27, 2022
Master your input data like a pro!

⭐ Master your input data like a pro! ⭐ ✔️ Node.js & browser ✔️ Only 1kb! ✔️ Fully typed ✔️ No dependencies Simple helper library which allows you to e

Horatiu Vlad 8 May 13, 2022
"Pizza Party!" - A Jovo V4 master template supporting a lot of features

"Pizza Party!" - Yet another Jovo V4 master template supporting a lot of features There are a lot of Jovo examples around but I did not find any proje

Frank Börncke 8 Aug 2, 2022
Compile Master CSS ahead of time with zero-configuration integration with build tools

CSS Compiler Compile Master CSS ahead of time with zero-configuration integration with build tools On this page Usage webpack.config.js vite.config.js

Master 5 Oct 31, 2022
O objetivo dessa aplicação era criar um frontend feito totalmente em Javascript, sem nenhum arquivo HTML ou CSS pré-criado. Além disso, esse projeto também é o frontend da minha API 100% NodeJS.

Projeto HTML 100% Javascript Front-end feito "sem HTML" Conteúdos ➜ Sobre o projeto ➜ O que aprendi ➜ Como usar ?? Sobre o projeto Voltar ao topo O ob

João Victor Negreiros 19 Aug 3, 2021
📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings

?? Algorithms and data structures implemented in JavaScript with explanations and links to further readings

Oleksii Trekhleb 157.8k Dec 29, 2022
:fireworks:Interactive Online Platform that Visualizes Algorithms from Code

Algorithm Visualizer Algorithm Visualizer is an interactive online platform that visualizes algorithms from code. Learning an algorithm gets much easi

Algorithm Visualizer 42k Jan 4, 2023
🥞Data Structures and Algorithms explained and implemented in JavaScript + eBook

Data Structures and Algorithms in JavaScript This is the coding implementations of the DSA.js book and the repo for the NPM package. In this repositor

Adrian Mejia 7k Jan 4, 2023
Bringing an all Open-Source Platform to study Data Structures and Algorithms ⚡

NeoAlgo-Docs Bringing an all Open-Source Platform to study Data Structures and Algorithms ⚡ ?? Installation You will need to have NodeJS and Yarn inst

Tesseract Coding 24 Jun 2, 2022
Venni backend - The backend of the Venni client apps implementing the credit card payments, matching algorithms, bank transfers, trip rating system, and more.

Cloud Functions Description This repository contains the cloud functions used in the Firebase backend of the Venni apps. Local Development Setup For t

Abrantes 1 Jan 3, 2022