Overview
The create-static-site tool allows users to create static websites with no build configuration. It uses either Jekyll or Hugo as the static site generator and provides a hassle-free development experience.
Features
- One Dependency: The tool uses webpack, Babel, ESLint, PostCSS, and other projects, but provides a cohesive curated experience on top of them.
- No Configuration Required: Users don’t need to configure anything as the tool handles reasonably good configuration of both development and production builds.
- No Lock-In: Users can “eject” to a custom setup at any time, moving all configuration and build dependencies directly into their project.
Installation
To install the create-static-site tool, follow these steps:
- Make sure you have Node >= 6 installed on your local development machine. If not, install it using nvm or nvm-windows.
- Run the following command to create a new app:Replace
npx create-static-site [template][template]with either “hugo” or “jekyll”. This will create a directory called “my-site” inside the current folder and generate the initial project structure. - Inside the newly created project, you can run the following commands:
npm startoryarn start: Runs the app in development mode. Open http://localhost:3000 to view it in the browser. The page will automatically reload if you make changes to the code.- For Jekyll users, run
bundle installfirst before running the above command. npm buildoryarn build: Builds the site for production to the dist folder.
Summary
The create-static-site tool allows users to easily create static websites without the need for build configuration. It supports both Jekyll and Hugo as static site generators and provides a curated experience on top of various build dependencies. Users can start developing their site quickly without the need for extensive setup. Additionally, the tool allows for customization by “ejecting” and maintaining the configuration directly within the project. Overall, it provides a fast and performant solution for building static sites with modern web technologies.