Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/metonym/nouveau
Old school Static Site Generator using Svelte and PostHTML
https://github.com/metonym/nouveau
posthtml static-site-generator svelte
Last synced: 11 days ago
JSON representation
Old school Static Site Generator using Svelte and PostHTML
- Host: GitHub
- URL: https://github.com/metonym/nouveau
- Owner: metonym
- License: mit
- Created: 2019-04-28T01:19:27.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-03-04T15:41:05.000Z (over 1 year ago)
- Last Synced: 2024-10-14T08:43:41.813Z (25 days ago)
- Topics: posthtml, static-site-generator, svelte
- Language: HTML
- Homepage:
- Size: 556 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 27
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# nouveau
[![NPM][npm]][npm-url]
[![Build][build]][build-badge]> Old school Static Site Generator using Svelte and PostHTML.
`nouveau` enhances your static web pages with JavaScript by using Svelte. No JavaScript is generated if the Svelte markup is purely static (i.e. presentational).
See the example project:
- **[example/src](example/src)**: Source files
- **[example/public](example/public)**: Generated files with compiled Svelte code## Quick start
Get started with a basic template:
```bash
npx degit metonym/nouveau#template my-app
cd my-app
yarn install
```## Install
```bash
yarn add -D nouveau
```### 1) Folder structure
Create folders and `index.html` files in the `src` folder:
```bash
mkdir src
touch src/index.html
```Your folder structure should look similar to this:
```bash
├── src
│ ├── index.html
│ └── [folder]/index.html
├── package.json
└── .gitignore
```### 2) Content
Add the following to your `src/index.html`:
```html
let count = 0;
Increment the count: {count}
```
### 3) Scripts
Add the following scripts to your `package.json`:
```json
// package.json
{
"scripts": {
"start": "nouveau --dev",
"build": "nouveau"
}
}
```Run the following command in development:
```bash
yarn start
```For production, use:
```bash
yarn build
```## Customization
Customize the `entry` and `outDir` fields in your `package.json`:
```diff
"nouveau": {
"entry": "src",
- "outDir": "public"
+ "outDir": "dist"
}
```## License
[MIT](LICENSE)
[npm]: https://img.shields.io/npm/v/nouveau.svg?color=blue
[npm-url]: https://npmjs.com/package/nouveau
[build]: https://travis-ci.com/metonym/nouveau.svg?branch=master
[build-badge]: https://travis-ci.com/metonym/nouveau