Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation as static site #311

Closed
imevro opened this issue Jul 23, 2015 · 25 comments
Closed

Documentation as static site #311

imevro opened this issue Jul 23, 2015 · 25 comments

Comments

@imevro
Copy link
Contributor

imevro commented Jul 23, 2015

I saw new docs and it looks fantastic clean.
But I think GitHub isn't good place for it, because doesn't have navigation between documents.

I propose static site at GitHub Pages, but I understand how hard is maintain 2 versions. We can use static site generator from markdown like metalsmith or jekyll.

@gaearon
Copy link
Contributor

gaearon commented Jul 23, 2015

I don't mind as long as somebody else can take the task, and we agree on the appearance (I'll need to vet the look and feel). My only requirement is this has to be a JS site generator, no Ruby please. :-) We want npm install and npm run build-site to just work.

@imevro
Copy link
Contributor Author

imevro commented Jul 23, 2015

I agree, npm scripts is small solution. I'll try tomorrow basic setup. If anyone has ideas about generator, it'll be great.
Also, what you think about JSDoc? Will you generate API Reference from it?

@gaearon
Copy link
Contributor

gaearon commented Jul 23, 2015

I'd like to try, although I'm not convinced it's going to be better than just doing it manually.

@imevro
Copy link
Contributor Author

imevro commented Jul 23, 2015

Hm, what you think about gulp for build by metalsmith and publish to GitHub pages? I know about webpack but I didn't found module for deploy to ghpages. I think npm docs-generate (which calls gulp docs:generate) and npm docs-publish (for gulp docs:publish) is good commands.

https://www.npmjs.com/package/gulp-gh-pages

@imevro imevro closed this as completed Jul 23, 2015
@imevro
Copy link
Contributor Author

imevro commented Jul 23, 2015

Oh, I'm sorry, misclick.

@imevro imevro reopened this Jul 23, 2015
@gaearon
Copy link
Contributor

gaearon commented Jul 23, 2015

Webpack is just JS bundler, so it's not needed here.

I'd avoid Gulp to be honest. Can't we just write a JS script to push to gh-pages?
Does metalsmith require Gulp? It seems like it has a simple Node API, which is just what I wanted.

@imevro
Copy link
Contributor Author

imevro commented Jul 23, 2015

Metalsmith doesn't require gulp, right. But I don't found package for deploy to GitHub pages. I don't think you want go to dist folder everytime, then checkout to gh-pages, then push. Routine is boring.

But I'll try extract code from gulp-gh-pages and publish as node package. It will be better.

@acdlite
Copy link
Collaborator

acdlite commented Jul 23, 2015

For the Flummox site I hacked together a system where Markdown docs were converted to JSON files and hosted by GH pages, then loaded by an isomorphic Flummox/React app. Then we used wget to pre-render all the pages, so it created the illusion of a fully-isomorphic site with pushHistory() support (no hash urls). The implementation is a bit rough— I threw it together one night with the intention of eventually improving it / turning into a module, but never got around to it. But conceptually it's pretty simple.

Perhaps we could do something similar for Redux?

https://github.com/acdlite/flummox/tree/master/docs

On Thu, Jul 23, 2015 at 2:50 PM, Dan Abramov notifications@github.com
wrote:

Webpack is just JS bundler, so it's not needed here.
I'd avoid Gulp to be honest. Can't we just write a JS script to push to gh-pages?

Does metalsmith require Gulp? It seems like it has a simple Node API, which is just what I wanted.

Reply to this email directly or view it on GitHub:
#311 (comment)

@gaearon
Copy link
Contributor

gaearon commented Jul 23, 2015

@acdlite

I like this approach but I want to avoid messing with styles. I also want to do that after we have some official React Router integration.

That said maybe it's time to start hacking on that :-P

@KyleAMathews
Copy link

Happy to help you all set up a site with Gatsby :)

I created a dummy docs site as a demo—http://gatsbyjs.github.io/gatsby-starter-documentation/

@gaearon
Copy link
Contributor

gaearon commented Jul 23, 2015

Gatsby looks pretty much what I wanted.
Can we have code highlighting there without much effort?

@KyleAMathews
Copy link

All Markdown is run through highlight.js by default (though that's very easy to swap out with another syntax highlighter.

@gaearon
Copy link
Contributor

gaearon commented Jul 23, 2015

Can you try generating something from rewrite-docs branch? I have some stubs in docs folder there, as well as the new README.

@KyleAMathews
Copy link

Be happy too. Probably will have time this weekend.

@gaearon
Copy link
Contributor

gaearon commented Jul 24, 2015

Excited to have you onboard!

cc @faassen who was frustrated that we don't have one documentation tool to rule them all. Maybe finally we can converge on something.

@emmenko
Copy link
Contributor

emmenko commented Jul 24, 2015

...and we need a logo of course! ;)

@KyleAMathews
Copy link

Woah. Just had an idea. What do you think about the idea of "composable" websites? Gatsby is already doing this to some extent as it has fallbacks for most critical files you need but you can override them easily but we could extend that concept further to something like Object.assign(Gatsby, website_base, actual_website).

So in practice how this would work is there'd be a base documentation site hosted on github. When you want a new docs site you'd just set the github url for the base site and then start adding markdown files. Anything else you'd want to modify could be set in the site config file.

@gaearon
Copy link
Contributor

gaearon commented Jul 24, 2015

That would be rad. :-)

@knowbody
Copy link
Contributor

@KyleAMathews great idea!

@xgrommx
Copy link
Contributor

xgrommx commented Jul 25, 2015

https://github.com/GitbookIO/gitbook? As example my book about RxJS

@gaearon
Copy link
Contributor

gaearon commented Jul 26, 2015

I'd say Gitbook looks very similar to what I want.

@xgrommx
Copy link
Contributor

xgrommx commented Jul 26, 2015

@gaearon Additionally you can use some custom theme.

@damassi
Copy link

damassi commented Jul 27, 2015

I would avoid Metalsmith because it can get pretty buggy and slow, particularly when compared to the React.js flow we're all now familiar with. And @KyleAMathews - Damn! We're almost done rebuilding our Marketing site and I just saw your work on this. Looks awesome.

gaearon added a commit that referenced this issue Jul 27, 2015
Gitbook for static documentation website (#311)
@gaearon
Copy link
Contributor

gaearon commented Jul 27, 2015

We'll use Gitbook as implemented in #331. It answers all my needs.

@gaearon gaearon closed this as completed Jul 27, 2015
@KyleAMathews
Copy link

@damassi Thanks! Cut my teeth as a programmer on CMS stuff so fun to integrate those + react.js + ssg ideas together.

@gaearon +1 to Gitbook. My open source time is very limited right now and Gitbook looks great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants