7 | Page Not Found
8 | Oops! A monster seems to have eaten this page. Or maybe you fell down the wrong wormhole?!
9 | Go back
10 |
11 | );
12 | }
13 |
--------------------------------------------------------------------------------
/src/templates/blog-post.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { graphql } from 'gatsby';
3 | import { Home } from '@material-ui/icons';
4 | import Link from '@material-ui/core/Link';
5 | import Layout from '../components/layout';
6 |
7 | // highlight-start
8 | export default function BlogPost({ data }) {
9 | const post = data.markdownRemark;
10 | let html = post.html.replace(/.md/gi, '');
11 | if (post.fields?.slug.includes('README')) {
12 | html = html.replace(
13 | './LICENSE',
14 | `${process.env.GATSBY_GITHUB_REPO_URL}/blob/master/LICENSE`
15 | );
16 | }
17 | // highlight-end
18 | return (
19 |