rtsao / hokusai

:ocean: Modern static site generator
MIT License
64 stars 2 forks source link

Hokusai Questions and concerns #19

Open kennetpostigo opened 7 years ago

kennetpostigo commented 7 years ago

Hello,

I myself haven't used hokusai however I am looking to use a static site generator to move my reason guide over to. I went from gitbook -> custom react build. I am now looking for a static site generator that supports some of the following features:

I've tried a few libraries and full blown static site generators and often the problem I find I have is that they contain everything under the sun that should be hidden from user and quickly grow to be complicated containing files and code in the generated folder that I don't think I use but don't want to remove because it breaks the build. Create-React-App does a good job at hiding implementation details from people wanting to build with react. I really wish a static site generator would do the same thing especially when having a large and complicated build step.

I'm still searching for a good static react/preact/inferno/etc site generator to build with and would love to beta test releases. Are some of the features I outlined above something that hokusai would be implementing? Is there any documentation I can read to take hokusai out for a spin?

rtsao commented 7 years ago

Yeah, I think my goals for hokusai align pretty well with your goals. It's specifically for static sites and blogs, with extreme performance. It should work fairly well for a documentation site, but I there's probably some work needed in terms of configuring remark with the syntax highlighting plugins and having a way to include the necessary syntax css.

Markdown -> Preact/Inferno/React/React-like

Yeah, I have this already. There's a couple issues I need to work out still but works really well so far!

Code highlighting (preferably prismjs)

I want build-time syntax highlighting, so there's no need to ship prism (or alternatives) to the client. I think if there needs to be dynamic syntax highlighting this should be a component that the user requires.

Offline support

Yeah, I plan to make sites built with hokusai work offline out of the box. Not done yet though.

Easy interop with custom components in markdown

This is definitely a goal. There's already a way to replace html elements from markdown with custom components and a way to import and render custom components in markdown. I'm not sure what I have is ideal, but it works pretty well for my use cases.

Fast Page Loads

Yeah, this is pretty much my primary goal for hokusai.

Single Page transitions

Yep, Hokusai includes a really lightweight router for Inferno.

I haven't written documentation yet as I'm in the middle of a large refactor of hokusai that

  1. Cleans up and simplifies the codebase. I've learned much more about webpack internals so I want to clean everything up.
  2. Creates a "feed" abstraction. So you can statically query the feed to easily create an index or table of contents (for example a blog). And a RSS feed will automatically be generated too. Right now this achieved in an ugly way via a custom webpack loader.

So not any docs right now but the interface will be basically the same as used in https://github.com/rtsao/www except for the feed concept I mentioned above and https://github.com/rtsao/hokusai/issues/5

kennetpostigo commented 7 years ago

@rtsao Awesome! Look forward to using this!