1. Install degit
npm i -g degit
(This will copy the files to your current folder)
degit MarshallCB/howww/basic-ssr
Tip:
npm i
is short fornpm install
npm i
npm run dev
routo
will build all files from /source
into /public
(except for files that start with a .
or _
, these are intentionally ignored). Files with two extensions (e.g. index.html.js
, global.css.js
) will drop the .js
during the build process (--> index.html
, global.css
). This allows you to write complex logic to build static files that can be interpretted by the browser!
serve
will create a development web server to display the files in /public
to your web browser at localhost:5000
. Every time you edit a file in /source
, just hit refresh on the browser to see your new changes.
µcontent
is the HTML and CSS renderer. It does some nifty stuff to transform everything inside the backticks ( ` ) into proper, optimized HTML/CSS. In JavaScript, these are called template literals, and their power comes from their ability to interpolate variable values within ${}
. Check out this example:
let x = "coffee"
let y = `My favorite thing is ${x}`
console.log(y) // --> "My favorite thing is coffee"
- Edit the
package.json
to describe your project - Create your own pages by writing HTML (use
/source/index.html.js
as a starting point) - Create custom CSS styles in
/source/styles/global.css.js
- Generate a custom favicon. Replace the files in
/source/favicon
and the favicon code in/source/_document.js
- Deploy to a hosting service like Vercel or Netlify for free!
- Check out my other templates for more in-depth sites!