pinecone
A very niche-use node tool for converting redwood TUTORIAL (pt1) from .com site format to "learn" site format
Install
yarn install
Use
cd ..
node pinecone <input-path> [output-dir]
Go one dir ABOVE pinecone so you can run it pretending it's a binary
For the input file, download the latest TUTORIAL.md to your local from here.
A second optional arg allows you to specifcy the output dir for the converted file and sections (defaults to ./TUORIAL_SECTIONS
). Inside will be a fulll copy of the converted file 00_FULL.md
, as well as a breakdown by section:
TUTORIAL_SECTIONS
โโโ 00_FULL.md
โโโ administration.md
โโโ a-second-page-and-a-link.md
โโโ authentication.md
โโโ cells.md
โโโ deployment.md
โโโ everyones-favorite-thing-to-build-forms.md
โโโ getting-dynamic.md
โโโ installation-and-starting-development.md
โโโ layouts.md
โโโ our-first-page.md
โโโ prerequisites.md
โโโ redwood-file-structure.md
โโโ routing-params.md
โโโ saving-data.md
โโโ side-quest-how-redwood-works-with-data.md
โโโ welcome-to-redwood.md
โโโ wrapping-up.md
Processing rules
This is what changes in the output file
- close all
<img>
tags - convert video container and iframe classes
- convert tutorial internal links to relative paths (https://redwoodjs.com/tutorial/getting-dynamic#creating-a-post-editor -> ./getting-dynamic#creating-a-post-editor )
- convert dotcom relative paths
(/docs/..)
to absolute paths - convert code line highlight syntax (add space between lang and {})
- split into sections
- add frontmatter