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

fix images/iframes for remote substreams docs #373

Merged
merged 4 commits into from
May 8, 2023

Conversation

dimaMachina
Copy link
Contributor

@dimaMachina dimaMachina commented May 5, 2023

No description provided.

@dimaMachina dimaMachina requested a review from a team as a code owner May 5, 2023 19:39
@dimaMachina dimaMachina changed the title move substreams docs to own sidebar section fix images/iframes for remote substreams docs May 5, 2023
Comment on lines +40 to +41
// fixes http://localhost:3000/en/substreams/reference-and-specs/authentication/
.replaceAll('<pre class="language-bash" data-overflow="wrap"><code class="lang-bash">', '```bash\n')
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines +42 to +44
// 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>', '```')
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines +26 to +35
// 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%'}}/>`
)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this fix

image


image

@github-actions
Copy link

github-actions bot commented May 5, 2023

📦 Next.js Bundle Analysis for @graphprotocol/docs

This analysis was generated by the Next.js Bundle Analysis action. 🤖

⚠️ Global Bundle Size Increased

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>
Copy link
Contributor Author

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',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this?

Copy link
Contributor Author

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
@dimaMachina dimaMachina merged commit 799c515 into substream-sidebar May 8, 2023
@dimaMachina dimaMachina deleted the substream-sidebar2 branch May 8, 2023 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants