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

feat: add microdatas #64

Merged
merged 5 commits into from
Feb 12, 2020
Merged

Conversation

Kocal
Copy link
Contributor

@Kocal Kocal commented Feb 4, 2020

Summary

This PR adds some microdatas on post and posts list. Microdatas are useful for search engines/web crawlers and can improve your position on search engines or the user experience.

Here are some screenshots on the Google's Structured data Testing tool:

Homepage (before):
Capture d’écran de 2020-02-04 21-08-12

Homepage (after):
Capture d’écran de 2020-02-04 21-07-06

Post (before):
Capture d’écran de 2020-02-04 21-39-49

Post (after):
Capture d’écran de 2020-02-04 21-35-31

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:

No UI changes.

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 79.0.3945.130
  • 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:

Nope.

@billyyyyy3320
Copy link
Member

Nice! I'll review it ASAP.

Copy link
Member

@billyyyyy3320 billyyyyy3320 left a comment

Choose a reason for hiding this comment

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

I'm not familiar with microdatas, but I've just read several articles and schema.org's docs these days. Here's some questions:

Why not adding publisher property to author, too?

Is dateModified really required since we're currently only displaying published date?

@Kocal
Copy link
Contributor Author

Kocal commented Feb 11, 2020

Why not adding publisher property to author, too?

I wasn't really sure of how to use the microdata properly, but sure we can add it.

Is dateModified really required since we're currently only displaying published date?

You're right, it's not displayed but I thought it can be intersting to still have the info somewhere.
Maybe we should display it?

@billyyyyy3320
Copy link
Member

IMO, we can provide an option whether to display last modified date, but it'll be another PR or issue, so leave dateModified to it.

@Kocal
Copy link
Contributor Author

Kocal commented Feb 11, 2020

I've added "publisher" micro-data:
Capture d’écran de 2020-02-11 20-52-00

@billyyyyy3320
Copy link
Member

Cool, could you remove dateModified for now, and I'll merge it.

@Kocal
Copy link
Contributor Author

Kocal commented Feb 12, 2020

Done

Copy link
Member

@billyyyyy3320 billyyyyy3320 left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks a lot.

@billyyyyy3320 billyyyyy3320 merged commit 2bdb39b into vuepress:master Feb 12, 2020
@Kocal Kocal deleted the feat/micro-datas branch February 12, 2020 08:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants