Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

[Feature request] add getScopePageTitle function for frontmatters' option #90

Open
GNQG opened this issue Dec 26, 2020 · 0 comments
Open

Comments

@GNQG
Copy link
Contributor

GNQG commented Dec 26, 2020

Feature request

What problem does this feature solve?

The title of a scope page for some frontmatter's key (ex. /tag/sometag/) is able to be set like getPaginationPageTitle. Currently it is automatically set to "${key} ${entryTitle}" here.

What does the proposed API look like?

Almost same as getPaginationPageTitle. Add getScopePageTitle: (key: string) => string to frontmatter option.

If like bellow, the title will be set to "tag=foo | ${project_title}" with default theme:

{
  // ...,
  frontmatters: [
    {
      // ...,
      scopeLayout: 'SomeScopeLayout',
      getScopePageTitle(key) {
        return `tag=${key}`;
      }
    },
    // ...,
  ]
}

How should this be implemented in your opinion?

Are you willing to work on this yourself?

Yes I have already implemented this locally.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant