kriasoft / kriasoft/react-firebase-starter

Generate routes from static *.md files

Open
#103 0 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement help wanted ready
Dominant language
JavaScript
Stars
4.5k
Forks
752
PR merge metrics
No merged PRs in 30d

Description

Sometimes you need to have a list of static pages written in Markdown. E.g. blog posts:

/posts/first-entry.md
/posts/second-entry.md

It would be nice to automatically generate routing information for these pages during build, as well as convert them into React components. For example, with Webpack 2.x syntax such automatically generated routes may look like this:

{
  path: '/blog/first-entry',
  load: function() {
    System.import('./posts/first-entry.md').then(function (data) {
      return <PostLayout><Content {...data} /></PostLayout>;
    });
  }
}

This was the core feature of the boilerplate, but was removed during a major refactoring. Would you like to bring it back? It requires adding more logic into the utils/routes-loader.js file.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with utils/routes-loader.js and inspect how the current build creates routing information. Compare its behavior with the Markdown examples in the issue; done means static .md pages produce generated routes and React components during the build.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
build-system, frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.