-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
refactor(model): add Code model for include_code tag #5633
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
base: master
Are you sure you want to change the base?
Conversation
How to testgit clone -b fix/code https://github.com/D-Sketon/hexo.git
cd hexo
npm install
npm test |
I'm not sure the files in code_dir need to be written to the public folder |
Pull Request Test Coverage Report for Build 14840515565Details
💛 - Coveralls |
const Code = new warehouse.Schema<CodeSchema>({ | ||
_id: { type: String, required: true }, | ||
path: { type: String, required: true }, | ||
slug: { type: String, required: true }, |
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.
Because the same value is already set in path
, I don't think slug
is necessary. Though the difference may be slight, reducing the elements in Schema<CodeSchema>
should have a positive effect on performance.
However, if we remove the slug
, it could potentially be a breaking change since there may be users referencing it in custom scripts or etc..., so it might require an announcement.
What does it do?
try to fix #5479 and #5486
ref #5479 (comment)
Since the current model doesn't satisfy
include_code
, I experimentally added the Code ModelScreenshots
Pull request tasks