Skip to content

Permalink is not reflected #4

Open
@tmiame

Description

@tmiame

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

module.exports = ( plugin_options, context ) => ({
  extendPageData ( $page ) {
    const { frontmatter } = $page;
    ...

after

module.exports = ( plugin_options, context ) => ({
  ready () {
    const { pages } = context
  
    pages.forEach( page => {
      const { frontmatter } = page;
      ...

Expected Behavior

/about.md

---
title: Hello
permalink: about-page
---

# About

output

/about-page/index.html

<!DOCTYPE html>
<head>
  <meta name="twitter:url" content="https://example.com/about-page/">
  ...

Actual Behavior

/about.md

---
title: Hello
permalink: about-page
---

# About

output

/about-page/index.html

<!DOCTYPE html>
<head>
  <meta name="twitter:url" content="https://example.com/about.html">
  ...

Your Environment

  • vuepress-plugin-autometa version: 0.1.10
  • vuepress version: 1.0.0-alpha.40
  • node version: 10.7.0
  • npm version: 6.6.0
  • OS: MacOS 10.14.2

sorry, I'm using translation.
love this plugin. thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions