GithubHelp home page GithubHelp logo

nikueater / siteelm Goto Github PK

View Code? Open in Web Editor NEW
16.0 4.0 2.0 984 KB

static site generator for Elm

Home Page: https://www.npmjs.com/package/siteelm

License: Apache License 2.0

JavaScript 0.08% TypeScript 44.07% CSS 5.77% Elm 49.67% Makefile 0.42%
static-site-generator elm

siteelm's Introduction

siteelm

demo: https://siteelm.netlify.com/ (source)

about

It's just another static site generator for Elm, but has some features.

  • you can write YAML in preamble sections
  • in a preamble, you can load external YAML files
  • it's easy to mix dynamic Elm components
  • simple rules to use

concept

to make a template, what you need to do is writing preamble models, their decoder, and two functions return Html Never (for HEAD and BODY)

siteelm

usage

install

% npm install -g elm
% npm install -g siteelm

or if you'd like to do everything locally,

% npm install -D elm siteelm

in this case, type "% npx siteelm ใ€œ" instead of "% siteelm ใ€œ"

initialize project

% mkdir mysite
% cd mysite
% siteelm init

Then you'll see a scaffold in the directory.

developing

% cd mysite
% siteelm server -d

Then access "http://localhost:3000/"
The server supports file watching and auto reloading. If you don't need the server, use siteelm watch instead.

building

% cd mysite
% siteelm make -o

siteelm's People

Contributors

dependabot[bot] avatar hmsk avatar nikueater avatar y047aka avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

hmsk itscryptic

siteelm's Issues

supporting auto indexing

overview

supporting the auto indexing, which is useful for making blogs or news sites.

idea

Like the "external" property in preambles, we provides the "preamblesIn" property which generate a list of contents in a directory.

---
module: Layout.Index
contents: 
    preamblesIn: ./articles
---

template selector

overview

providing several templates for initializing

idea

Add more templates in "res/scaffold" so that a user can choose one of them with "siteelm init."

% siteelm init
> choose a template(default: 0)
> [0] blog
> [1] minimum
> [2] demo

efficient contents watching

overview

Right now, siteelm's file watcher re-compiles all the files in the content directory when one of them is modified.
I'd like to make it more efficient so that siteelm just compiles only files modified.

idea

When a file is modified, siteelm searches files which load it in their preambles and compiles only them.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.