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

Update [[...slug]].mdx #380

Merged
merged 1 commit into from
May 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions website/pages/en/substreams/[[...slug]].mdx
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,6 @@ export async function getStaticProps({ params: { slug = ['README'] } }) {
.replaceAll(/{%.*?%}/g, '')
// close img tags only if he doesn't point to .gitbook
.replaceAll(/<img(.*?)>/g, (...m) => (m[1].includes('src=".gitbook') ? '' : `<img${m[1]}/>`))
// fixes http://localhost:3000/en/substreams/reference-and-specs/authentication/
.replaceAll('<pre class="language-bash" data-overflow="wrap"><code class="lang-bash">', '```bash\n')
// fixes http://localhost:3000/en/substreams/developers-guide/modules/inputs/
.replaceAll('<pre class="language-yaml" data-title="manifest excerpt"><code class="lang-yaml">', '```yaml\n')
.replaceAll('</code></pre>', '```')
const mdx = await buildDynamicMDX(data, {
mdxOptions: {
// change-log contains `{variable}` text that is thrown an error by MDX2 parser since he treat it as variable injection, to fix it we parse chang-log with the markdown parser
Expand Down