webmasterish / vuepress-plugin-autometa

Auto meta tags plugin for VuePress 1.x
MIT License
40 stars 6 forks source link

add option to resolve simple permalinks #8

Open tjventurini opened 4 years ago

tjventurini commented 4 years ago

Description

Provides logic to handle permalinks.

Checklist

Would be awesome if you find to pull this in soon :+1:

Love the package :heart:

webmasterish commented 4 years ago

Thank you @tjventurini for contributing and for the kind words

Your solution requires that every page needs to have a permalink property manually set in frontmatter, and that does not cover "auto" generating the URLs using the $page.path.

tjventurini commented 4 years ago

True!

I also saw another approach where the user can overwrite the function in PLUGIN by exposing it through the plugin configuration. After I learned that I instantly regretted how I did it in this pull request - still new to vuepress and all that :sweat_smile:

Maybe I'll find time to do another pull request with that approach this week, but I doubt it. It would be awesome if you could add this feature for flexibility, so everyone can overwrite the functions as he needs it :grin:

tjventurini commented 4 years ago

Another way would be to add the option of executing a closure on the image_sources~. Much like with the regular expressions that one can set up.

webmasterish commented 4 years ago

Same here, been too busy lately, so not sure when I can find some time to look into making PLUGIN.get_canonical_url configurable through the plugin options.