Description
(This is a tech debt clean-up issue from the legacy Jekyll docs site.)
The docs/index.md
file currently contains a lot of HTML- complete with attributes and class names. This file should contain only (or at least predominantly) markdown syntax. We should remove as much of the HTML as possible and instead convert it to regular markdown.
There are 2 things to be aware of while cleaning up this markdown file:
- The layout of the home page uses horizontal scrolling for the top section. This is not achievable with regular markdown.
- The bottom sections each have a live code example that ties into the
home.js
template (see below).
The templates/home.js
template makes this situation a little more complex, since it currently uses some of the inline HTML elements from index.md
to mount examples (eg <div id="helloExample"></div>
). It might be acceptable to leave only these mount nodes in the file and remove all else.
It might also be nice to break index down into a couple of files, although this would also require:
- Moving
home.js
from templates to pages and creating a graphql query to load these files - Updating
gatsby-node.js
to ignore the files (so they aren't turned into standalone pages. (We have a similar check for the error decoder page.)
Making Home a page instead of a template would also provide a nice solution for the horizontal scrolling problem mentioned above.
Also, mountCodeExample
currently does some really hacky stuff. Making Home a page instead of a template could help us move some of that hackiness out and simplify things like showing a placeholder while pre-loading Babel (#2).
Please feel free to chat with @bvaughn if you decide to pick up this issue.