Draft
Conversation
✅ [V2]
To edit notification comments on pull requests, go to your Netlify site configuration. |
⚡️ Lighthouse report for the deploy preview of this PR
|
|
Size Change: +4.94 kB (+0.29%) Total Size: 1.72 MB
ℹ️ View Unchanged
|
Contributor
Author
|
Been trying to process markdown showcase page however I don't understand the logic looking at plugin page, return {
type: 'mdx',
permalink,
source: aliasedSourcePath,
title: frontMatter.title ?? contentTitle,
description: frontMatter.description ?? excerpt,
frontMatter,
unlisted,
};and await Promise.all(
content.map(async (metadata) => {
const {permalink, source} = metadata;
const routeMetadata = createPageRouteMetadata(metadata);
if (metadata.type === 'mdx') {
await createData( // ozaki: why dont we store this value in a const and then pass it to addRoute modules.content ?
// Note that this created data path must be in sync with
// metadataPath provided to mdx-loader.
`${docuHash(metadata.source)}.json`,
JSON.stringify(metadata, null, 2),
);
addRoute({
path: permalink,
component: options.mdxPageComponent, // ozaki: how does the content is rendered in the component ?
exact: true,
metadata: routeMetadata,
modules: {
content: source, // ozaki: how does the content is a aliasedPath ?
},
});
} else {
// process things that are not mdx
}
}),
);
``` |
Contributor
Author
|
Trying to implement image insertion, let's say we have this file structure : I wonder how to resolve the image path when rendering to the component, I've made it work with the assets folder but I think its better to let preview images aside .yml files |
slorber
requested changes
Mar 28, 2024
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
slorber
requested changes
May 13, 2024
Comment on lines
+44
to
+52
| const Tags = useShowcaseTags(); | ||
| const TagList = Object.keys(Tags) as TagType[]; | ||
|
|
||
| const tagObjects = tags.map((tag) => ({tag, ...Tags[tag]})); | ||
|
|
||
| // Keep same order for all tags | ||
| const tagObjectsSorted = sortBy(tagObjects, (tagObject) => | ||
| TagList.indexOf(tagObject.tag), | ||
| ); |
Collaborator
There was a problem hiding this comment.
The plugin should probably short the site tags on the nodejs side, this way the theme receives already-sorted tags and we don't need to run any extra runtime logic
2 tasks
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pre-flight checklist
Motivation
Test Plan
Test links
Deploy preview & tests
showcaseAll
Related issues/PRs
#6882