Skip to content

Add hint about how to use variables #2451

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 19, 2020
Merged

Conversation

timqian
Copy link
Contributor

@timqian timqian commented Jun 18, 2020

Summary

Failed to figure out in the docs about how to use the frontmatter variables. After trying {{$frontmatter}}, I guessed out it myself. It should save me an hour if the doc tells me how to invoke the variables

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Docs
  • Build-related changes
  • Other, please describe:

If changing the UI of default theme, please provide the before/after screenshot:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

If yes, please describe the impact and migration path for existing applications:

The PR fulfills these requirements:

  • When resolving a specific issue, it's referenced in the PR's title (e.g. fix #xxx[,#xxx], where "xxx" is the issue number)

You have tested in the following browsers: (Providing a detailed version will be better.)

  • Chrome
  • Firefox
  • Safari
  • Edge
  • IE

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature
  • Related documents have been updated
  • Related tests have been updated

To avoid wasting your time, it's best to open a feature request issue first and wait for approval before working on it.

Other information:

Copy link
Member

@bencodezen bencodezen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@timqian Do you find this example to be more helpful?

@timqian
Copy link
Contributor Author

timqian commented Jun 18, 2020

@bencodezen Cool, this looks even better

@bencodezen
Copy link
Member

@timqian Glad to hear it! I'll go ahead and merge this while updating the example again locally since the suggestion feature is a little buggy with code blocks.

@bencodezen bencodezen merged commit 60198e5 into vuejs:master Jun 19, 2020
larionov pushed a commit to larionov/vuepress that referenced this pull request Aug 19, 2020
* add hint for how to use variables

* docs: update example for how frontmatter is used as a variable

* Update packages/docs/docs/guide/frontmatter.md

Co-authored-by: Ben Hong <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants