vuepress-plugin-autometa icon indicating copy to clipboard operation
vuepress-plugin-autometa copied to clipboard

add option to resolve simple permalinks

Open tjventurini opened this issue 5 years ago • 4 comments

Description

Provides logic to handle permalinks.

Checklist

  • [ ? ] All tests are passing
  • [ ? ] My code follows the code style and structure of this project

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

Love the package :heart:

tjventurini avatar Apr 25 '20 01:04 tjventurini

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.

webmasterish avatar Apr 26 '20 21:04 webmasterish

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 avatar Apr 27 '20 09:04 tjventurini

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.

tjventurini avatar Apr 27 '20 09:04 tjventurini

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.

webmasterish avatar Apr 30 '20 18:04 webmasterish