-
Notifications
You must be signed in to change notification settings - Fork 47
feat: new custompages upload
command
#1265
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
Conversation
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.
a couple small nits below but overall this looks great! quick question since the answer is not immediately jumping out to me — if a user passes an HTML file into this, do we set the type: 'html'
?
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.
+1'ing kanad's feedback but this lgtm
@kanadgupta I tested this out with an HTML file with just a title in the metadata and no we're not 😬 It uploaded as ![]() |
@emilyskuo hmm yeah there are a few places we could do this... i wouldn't necessarily consider this a "frontmatter fix" per se since this shouldn't be an attribute that users specify in their frontmatter — what if we did it around here instead: Lines 100 to 122 in ad93a7a
in those if-statements, we're patching the category/parent page data in the payload prior to hitting the API, so maybe that's also a good spot to do this as well? i believe this let me know if you think of a better spot or if you run into any issues with this approach! |
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.
just a handful of requested changes that should be quick to address, but on the whole this looks phenomenal. great work ❤️🔥
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.
hell yeah brother 🤘🏽 this was a surprisingly gnarly change, awesome work!
# [10.4.0-next.1](v10.3.0...v10.4.0-next.1) (2025-06-25) ### Features * new `custompages upload` command ([#1265](#1265)) ([dc4ceb4](dc4ceb4)) [skip ci]
🎉 This PR is included in version 10.4.0-next.1 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
🧰 Changes
Adding a new
custompages upload
command for folks to upload MD or HTML custom pages. Largely copied from docs/reference upload with some minor tweaks (adding HTML as a valid input).🧬 QA & Testing
See
__tests__/commands/custompages/upload.test.ts
. Also did some manual testing locally with some of the custom page test fixtures