Open tmiame opened 5 years ago
Thank you @tmiame for the feedback!
Here's what I think:
autometa
plugin after it?ready
hook function would not be enough to get all $page
properties, in paticular $page._strippedContent
which is only available in extendPageData
- this is something that I had to deal with in vuepress-plugin-feed
$page.path
with $page.frontmatter.permalink
or $page.frontmatter.autometa.path
seems the best option in this case; requires updating the PLUGIN.get_canonical_url()
Only autometa is added. Permalink is built into the core. my config is here
// theme/index.js
const autometa_options = {
canonical_base: 'https://example.com'
}
module.exports = {
plugins: [
[ 'autometa', autometa_options ]
]
}
- using your temporary solution of using the
ready
hook function would not be enough to get all$page
properties, in paticular$page._strippedContent
which is only available inextendPageData
- this is something that I had to deal with invuepress-plugin-feed
It was very helpful. Thank you.
I agree. Because there are times when there are variables in the permalink'/:year/:month/:day/:slug'
, I think that it is better to use the getPermalink
method of shared-utils.
Thanks for clarifying it.
I'll take a look and see if it can be implemented and the best way to do so.
Description
Autometa has not catch the rewritten by another extended function.
This problem may be a problem to be solved by the Vuepress core in the future, such as setting the execution order of plugins.
What do you think about this problem?
Temporary solution
before
after
Expected Behavior
/about.md
output
/about-page/index.html
Actual Behavior
/about.md
output
/about-page/index.html
Your Environment
sorry, I'm using translation. love this plugin. thanks!