Skip to content

feat: add _meta.json json schema in rspress/meta-json-schema.json #2079

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

Merged
merged 2 commits into from
May 8, 2025

Conversation

SoonIter
Copy link
Member

@SoonIter SoonIter commented Apr 18, 2025

Summary

  1. rename top level _meta.json => nav.json

  2. add _meta.json json schema type hint

Related Issue

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copy link

netlify bot commented Apr 18, 2025

Deploy Preview for rspress-v2 ready!

Name Link
🔨 Latest commit 8042de2
🔍 Latest deploy log https://app.netlify.com/sites/rspress-v2/deploys/681c7eda99efea000899f783
😎 Deploy Preview https://deploy-preview-2079--rspress-v2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Apr 18, 2025

Deploy Preview for rspress ready!

Name Link
🔨 Latest commit 8042de2
🔍 Latest deploy log https://app.netlify.com/sites/rspress/deploys/681c7edad529f100082a3b12
😎 Deploy Preview https://deploy-preview-2079--rspress.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 82 (🟢 up 14 from production)
Accessibility: 97 (no change from production)
Best Practices: 92 (🟢 up 9 from production)
SEO: 100 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@SoonIter SoonIter force-pushed the syt/add-_metajson-type-schema-hint branch 2 times, most recently from aa137ff to 262bb07 Compare April 24, 2025 03:32
@SoonIter SoonIter force-pushed the syt/add-_metajson-type-schema-hint branch 2 times, most recently from a6bf273 to ef14c8d Compare May 8, 2025 04:22
@CoffeeChaton
Copy link

In this pr, the doc doesn't seem to mention meta-json-schema.json.
Therefore, I was wondering if there are any plans to make meta-json-schema.json publicly available?

I'm hoping to reduce how often I need to leave the IDE, and allow me to use it as follows for in-editor validation and autocompletion:

// .vscode/settings.json
{
  "json.schemas": [
    {
      "fileMatch": ["**/_meta.json"],
      "url": "./node_modules/rspress/xxxPath/meta-json-schema.json"
      // or "meta-json-schema-base.json"
    }
  ],
}

@SoonIter
Copy link
Member Author

SoonIter commented May 8, 2025

In this pr, the doc doesn't seem to mention meta-json-schema.json. Therefore, I was wondering if there are any plans to make meta-json-schema.json publicly available?

Yeah, of course, it is one of the public features in v2.0,

v2.0 is in prerelease version, and document is not fully covered now

@CoffeeChaton
Copy link

Thank you.

@SoonIter SoonIter changed the title feat!: add _meta.json json schema type hint feat!: add _meta.json json schema type hint and rename top level "_meta.json" -> "_nav.json" May 8, 2025
@SoonIter SoonIter changed the title feat!: add _meta.json json schema type hint and rename top level "_meta.json" -> "_nav.json" feat!: add "_meta.json" json schema and rename top level "_meta.json" -> "_nav.json" May 8, 2025
@SoonIter SoonIter requested a review from Timeless0911 May 8, 2025 07:34
@Timeless0911
Copy link
Contributor

We need to carefully consider whether should we add a new _nav.json.

@JounQin
Copy link
Collaborator

JounQin commented May 8, 2025

I personally love splitting _nav.json with the old _meta.json, because in our case, there is only one sidebar, the root _meta.json is used for sidebar but we'd expect it as navbar instead.

@SoonIter SoonIter force-pushed the syt/add-_metajson-type-schema-hint branch from 25a8701 to 24f439f Compare May 8, 2025 08:20
@SoonIter SoonIter changed the title feat!: add "_meta.json" json schema and rename top level "_meta.json" -> "_nav.json" feat!: add "_meta.json" json schema 'rspress/meta-json-schema.json' May 8, 2025
@SoonIter
Copy link
Member Author

SoonIter commented May 8, 2025

I personally love splitting _nav.json with the old _meta.json, because in our case, there is only one sidebar, the root _meta.json is used for sidebar but we'd expect it as navbar instead.

yeah, splitting _nav.json with the old _meta.json brings that this case can be handled easier than before,

but there have already been too many breaking changes here... so I decided to give up this change

@JounQin
Copy link
Collaborator

JounQin commented May 8, 2025

but there have already been too many breaking changes here... so I decided to give up this change

That's unfortunate. But what if when there is no _nav.json, we fallback to read _meta.json instead? Would that be considered as breaking change?

@SoonIter SoonIter changed the title feat!: add "_meta.json" json schema 'rspress/meta-json-schema.json' feat: add "_meta.json" json schema 'rspress/meta-json-schema.json' May 8, 2025
@SoonIter SoonIter force-pushed the syt/add-_metajson-type-schema-hint branch from de4502a to 3087900 Compare May 8, 2025 09:05
@SoonIter SoonIter changed the title feat: add "_meta.json" json schema 'rspress/meta-json-schema.json' feat: add "_meta.json" json schema in rspress/meta-json-schema.json May 8, 2025
Timeless0911
Timeless0911 previously approved these changes May 8, 2025
@SoonIter SoonIter force-pushed the syt/add-_metajson-type-schema-hint branch from 3087900 to 8042de2 Compare May 8, 2025 09:52
@Timeless0911 Timeless0911 enabled auto-merge (squash) May 8, 2025 09:52
@Timeless0911 Timeless0911 disabled auto-merge May 8, 2025 09:52
@Timeless0911 Timeless0911 changed the title feat: add "_meta.json" json schema in rspress/meta-json-schema.json feat: add _meta.json json schema in rspress/meta-json-schema.json May 8, 2025
@Timeless0911 Timeless0911 enabled auto-merge (squash) May 8, 2025 09:53
@Timeless0911 Timeless0911 merged commit b72ba63 into main May 8, 2025
12 checks passed
@Timeless0911 Timeless0911 deleted the syt/add-_metajson-type-schema-hint branch May 8, 2025 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants