7.6.2 • Published 3 years ago

react-static-plugin-source-filesystem v7.6.2

Weekly downloads
5,339
License
MIT
Repository
github
Last release
3 years ago

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'),
      },
    ],
  ],
}
7.6.2

3 years ago

7.6.1

3 years ago

7.5.3

3 years ago

7.5.1

3 years ago

7.5.0

3 years ago

7.4.2

4 years ago

7.4.1

4 years ago

7.4.0

4 years ago

7.3.0

4 years ago

7.2.3

5 years ago

7.2.2

5 years ago

7.2.0

5 years ago

7.1.0

5 years ago

7.0.10

5 years ago

7.0.8

5 years ago

7.0.0

5 years ago

7.0.0-beta.5

5 years ago

7.0.0-beta.0

5 years ago