Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recipe: Markdown (with MDX) #1

Closed
wants to merge 1 commit into from
Closed

Conversation

bensmithett
Copy link
Owner

By default in San Blas, a page is just a React component. If you're writing long form content though you probably want to use Markdown.

This recipe shows how to render pages from MDX-flavoured Markdown source files by adding mdx-loader to our Webpack config.

As a bonus, we'll...

  • Define some metadata (title, description & date) for each page
    • You might have used Front Matter for this. MDX lets us do it in plain JavaScript instead
  • Add slug IDs to all headings with rehype-slug

@bensmithett bensmithett added the 👩‍🍳 recipe A pull request showing how to extend San Blas' default behaviour label Aug 31, 2019
@bensmithett bensmithett force-pushed the recipes/markdown branch 8 times, most recently from b57c9ef to 4da43df Compare September 2, 2019 22:36
@bensmithett
Copy link
Owner Author

MDX is included by default now #5

@bensmithett bensmithett deleted the recipes/markdown branch February 22, 2020 00:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👩‍🍳 recipe A pull request showing how to extend San Blas' default behaviour
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant