Moved `source` page generation function to a new function module. Added option to function to create plain text download with a sanitized filename and made it accessible from a new page: `download`.
Added the `download` item to the BrewItem so it appears on each brew on the User page.
Added `sanitize-filename` dependency to `package.json`.
Fix for page numbers, footers, and footnotes being on the wrong side of the page after a cover page has been inserted - as per Reddit post: https://redd.it/kncoe7
1) Rendering is fast enough on the client we don't need to provide SSR for the brew contents.
2) This leaves our server open to REDOS attacks if users create ridiculously long single lines of text. The Markdown parser slows down with exponential time which becomes noticeable at 10,000+ characters in one line, and at 200,000+ characters will stall the server and eventually crash.
3) This now shows a nice loading circle for the half-second that a page takes to render. If a user tries to load a huge line of text the loading circle will be there instead of a blank white page.
* Remove the metadata button on home page
1) Hopefully make it more clear that the Homepage is meant as a sandbox to test out the site, not a real brew that will be saved.
2) Also, avoid errors resulting from trying to modify the metadata of a brew that doesn't really exist yet.
* Lint
For some reason, Mongoose will reuse the old ID generated if you call nanoid directly. If you wrap it in a function, it will call it new each time a new document is created.
Also updated patreon link :)
- Updates Vitreum to v6.0.1 + some custom fixes.
- Stylesheets must be imported with `require('./sheet.less');` but can also can now share stylesheets between jsx components.
- Should eliminate a lot of security concerns with older nested dependencies.
- Changed a lot of files to make this work
- Also removes dependency on PicoRouter in favor of React-Router