forestryio / create-static-site

Create static websites with no build configuration.
MIT License
136 stars 10 forks source link

Where should templates live? #1

Open ncphillips opened 6 years ago

ncphillips commented 6 years ago

The site templates for Jekyll and Hugo are being deployed to nominate and downloaded into the users NPM modules. They should definitely be moved out of static-scripts, but they might continue live in this repository. I think it would be preferable git urls could be passed in as a template, and the template only be fetched on Init. This would allow for third party templates to be easily createable

ncphillips commented 6 years ago

Our current thought is that different templates will be created as separate static-scripts.

There are currently 3 scripts in mind:

  1. static-scripts
  2. static-scripts-hugo
  3. static-scripts-jekyll
chrisdmacrae commented 6 years ago

Goals

I think the goal of this project should be:


Overview

In CRA, the packages are all interdependent, not standalone versions. To create your own version of CRA (i.e, change the template or build scripts) you need to fork the monorepo and pass a flag when using CRA.

I feel like this repository should work like that. All of the packages are related to core functionality of our best-practices, and templates are provided either:

C-S-S Variants

If developers want to define a completely different zero-config build pipeline, they fork the project, make changes, and then publish as a new NPM package/Git repo.

This can then be used in C-S-S via --scripts-version THIRD_PARTY_SCRIPT_NAME

Templates

Core templates

Core templates are stored in aliases to valid http endpoints. (See [external templates)[#external-templates])

If third-party developers want to create new templates they can:

External templates

chrisdmacrae commented 6 years ago

Another thought -- should we rename templates to generators?

For all intents and purposes, all templates should be a "generator". Even if it's a project using react, react-router and renderToString() to generate the HTML, or just mustache templates, that's an SSG.