Skip to content
This repository has been archived by the owner on Mar 5, 2021. It is now read-only.

Convert to Superpowers Web project hosted on GitHub Pages #1

Open
elisee opened this issue Jan 12, 2016 · 3 comments
Open

Convert to Superpowers Web project hosted on GitHub Pages #1

elisee opened this issue Jan 12, 2016 · 3 comments

Comments

@elisee
Copy link
Contributor

elisee commented Jan 12, 2016

The current documentation is a Node.js app. The goal here is to turn it into a fully static website. We'll move the current documentation from Bitbucket to GitHub and turn it into a Superpowers Web project.

  • Add Markdown filter support to Superpowers Web
  • Expose an object to Jade at build time that contains all the assets in the project, so that we can build the sidebar
  • Load the sidebar as an iframe to avoid having many copies of it
  • When switching pages through the sidebar, to avoid making the sidebar jump, update URL with window.history.pushState, load new page with XHR and... insert its main content into main?

Each page should do something like:

extends layout/index.en.jade

block content
  :markdown
    h1 Title

and layout/index.en.jade should be like:

doctype html
body
  head
    title ...
    link(rel="stylesheet" href="...")
  body
    iframe(src="menu.en.html")
    main
      block content
@elisee
Copy link
Contributor Author

elisee commented Jan 13, 2016

Ok so I gave all of this a try and the result is very complex, just because I wanted it all to be static and have nice clean URLs.

Let's give it another shot:

  • Add Markdown editor that generates HTML snippets
  • Add a tableOfContent plugin (as part of the Markdown plugin?) with a resource that can be enabled in the settings to generate a toc.json inside the assets folder. It will look for Markdown pages in the specified path and grab their # Title
  • Write an index.html that uses the query string ?en/getting-started/about-superpowers to dynamically load the requested page, and builds the menu dynamically by loading toc.json

It's no longer a perfectly static Website since it requires JS, but I guess that's OK. Maybe when superpowers/superpowers-core#35 is implemented, we can do all that stuff at build time and get back a truly static website.

@jpryne
Copy link

jpryne commented Mar 8, 2016

This sounds like a great idea. The documentation is helpful, yet is confusing in spots. I'd love to be able to scribble questions in the margins of a staging-site version, or enter comments in the code suggesting copy-edits.

@elisee
Copy link
Contributor Author

elisee commented Apr 11, 2016

GitBook might be a better solution: https://www.gitbook.com/ (free for open source projects!)

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

No branches or pull requests

2 participants