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

Latest commit

 

History

History
45 lines (31 loc) · 1.42 KB

README.md

File metadata and controls

45 lines (31 loc) · 1.42 KB

GatsbyJS plugins for Foremark

foremark-gatsby-layout

Provides a component simulating the user interface of Foremark's viewer application.

Requires gatsby-plugin-less with strictMath and strictUnits options:

// in gatsby-config.js
plugins: [
  {
    resolve: `gatsby-plugin-less`,
    options: {
      strictMath: true,
      strictUnits: true,
    },
  },
]

Tips

  • TOC navigation without JavaScript: This component is mostly usable even without client-side JavaScript enabled. However, in this case, sitemap (global TOC) entries cannot be expanded by clicking the expand button. Usually, visitors can just click the TOC entry's link, which automatically reveals its children. However, if the entry does not have any pages attached, this won't work because the link is unclickable, thus making it impossible to navigate child pages. Therefore, it's recommended to attach a page to every sitemap entry.

foremark-gatsby-transformer

TODO

Requires gatsby-plugin-sharp.

foremark-config-loader

This package implements a webpack loader for importing Foremark viewer configuration files.

TODO

  • Make a starter project
  • Find a better way to convert between Preact and React
  • Per-page viewer config
  • Custom media handlers
  • Reduce the usage of Foremark's private API such as expandSitemap and mergeObjects