-
Notifications
You must be signed in to change notification settings - Fork 141
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
fix images/iframes for remote substreams docs #373
Conversation
// fixes http://localhost:3000/en/substreams/reference-and-specs/authentication/ | ||
.replaceAll('<pre class="language-bash" data-overflow="wrap"><code class="lang-bash">', '```bash\n') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need remove <pre />
and <code />
from here https://github.com/streamingfast/substreams/blob/develop/docs/reference-and-specs/authentication.md?plain=1#L40-L45
// 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>', '```') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need remove <pre />
and <code />
from here https://github.com/streamingfast/substreams/blob/develop/docs/developers-guide/modules/inputs.md?plain=1#L26-L30
// replace {% embed ... %} with <iframe /> | ||
.replaceAll( | ||
/{%\s+embed\s+url="(.*?)"\s+%}/g, | ||
(...m) => | ||
`<iframe src="${m[1].replace( | ||
// we need enhance YouTube links, otherwise they will be not loaded in iframe | ||
'youtube.com/watch?v=', | ||
'youtube.com/embed/' | ||
)}" style={{aspectRatio: 16/9, width: '100%'}}/>` | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📦 Next.js Bundle Analysis for @graphprotocol/docsThis analysis was generated by the Next.js Bundle Analysis action. 🤖
|
Page | Size (compressed) |
---|---|
global |
596.58 KB (🟡 +35 B) |
Details
The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.
Any third party scripts you have added directly to your app using the <script>
tag are not accounted for in this analysis
If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!
@@ -186,7 +186,7 @@ export const MDXLayoutNav = ({ mobile = false }: { mobile?: boolean }) => { | |||
} | |||
if ('children' in pageItem && pageItem.children) { | |||
if (pageItem.type === 'children') { | |||
return <>{pageItem.children.map(renderSidebar)}</> | |||
return <Fragment key={pageItem.name}>{pageItem.children.map(renderSidebar)}</Fragment> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this fix react warning about missing key
const mdx = await buildDynamicMDX(data, { | ||
mdxOptions: { | ||
format: 'md', | ||
format: paths.endsWith('/change-log') ? 'md' : 'mdx', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
due to this line https://github.com/streamingfast/substreams/blob/f7bfe8fc45f860a935c2346bcd43b7b35bd76430/docs/release-notes/change-log.md?plain=1#L139 mdx2 treat {Type}
as injection of variable, I guess we should use md parser everywhere for gitbooksdocs
* fix edit on github for substream docs * prettier
No description provided.