react-static-plugin-source-filesystem

7.6.2 • Public • Published

react-static-plugin-source-filesystem

A React-Static plugin that adds support for recursively importing routes from a directory

This means that any files in your projects pages/ directory will be turned into static routes.

Example:

  • src/pages/index.js - would produce a route with the path of / and the template set to src/pages/index.js
  • src/pages/about/us.js - would produce a route with the page of /about/us and the template set to src/pages/about/us.js

Installation

In an existing react-static site run:

$ yarn add react-static-plugin-source-filesystem

Then add the plugin to your static.config.js with a valid location directory in the options:

...
import path from 'path'
...
export default {
  plugins: [
    [
      'react-static-plugin-source-filesystem',
      {
        location: path.resolve('./src/pages'),
      },
    ],
  ],
}

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
7.0.0-beta.50next
7.6.272latest

Version History

VersionDownloads (Last 7 Days)Published
7.6.272
7.6.10
7.5.326
7.5.116
7.5.01
7.4.210
7.4.10
7.4.02
7.3.01
7.2.327
7.2.22
7.2.00
7.1.02
7.0.100
7.0.80
7.0.01
7.0.0-beta.50
7.0.0-beta.00

Package Sidebar

Install

npm i react-static-plugin-source-filesystem

Weekly Downloads

160

Version

7.6.2

License

MIT

Unpacked Size

15.7 kB

Total Files

6

Last publish

Collaborators

  • tannerlinsley
  • sleeplessbyte