Skip to content

Latest commit

 

History

History
80 lines (49 loc) · 3.01 KB

README.md

File metadata and controls

80 lines (49 loc) · 3.01 KB

www

a "zero-config" static site builder mostly for me. write html to build sites out of html with minimal tooling and mostly just html. a companion to www-os.

it can build your site. it has a dev server that rebuilds as you make changes (though you still have to reload). it has templating (if you want it). it has build-time data (if you want it). it can change the directory it builds your site to!

install

install deno, if you haven't already.

install the tool (this is a long one):

$ deno install --allow-env --allow-run --allow-read --allow-write --allow-net https://deno.land/x/[email protected]/www.ts

deno

you can install deno many ways. personally, i use asdf to manage language/runtime installs, and you can too using these instructions.

you also need to add deno's bin directory to your path. for most installs, that will be ~/.deno/bin. if you use asdf, it's going to be $(asdf where deno)/.deno/bin.

future

deno can build "standalone binaries". they bundle most of deno along with it and are kind of big. but at some point soon, i'll figure out a nice way to package that up to make it easier to install if you don't otherwise care about deno.

use

to run the dev server:

$ www --up .

to build your site

$ www .

to build your site for production:

$ www --prod .

to see help:

$ www --help

structure

organize your directory however you want. the structure of your site will mirror your directory structure. if you just want to look at examples, check out the test site or my website.

your directory structure and any files you create will be copied into your built site as they are. if you want want to write plain html, you can write plain html!

there are a few special file types that you can use if you want to use fancier static-site features like templating, shared layouts, html fragments, &c. within those, there are also some special build-time html features you can use, but i'll have to document them later.

is this for me?

maybe! i like it a lot. if you really just want to write html and want to repeat yourself a little less, this might be for you too. but it'also not very well documented, probably pretty buggy, and missing features.

todos

  • docs for newer features (frag, slot, query, &c)
  • init command
  • package a binary
  • ???
  • you tell me
  • or better yet, implement it

thanks

thanks to the parks staff and their website dumpling.love. influenced by other similar tools like sergey. inspired by the power of html.energy.