Skip to content
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

refactor(website): Use article in og:type tag in blog articles. #1084

Closed
wants to merge 3 commits into from

Conversation

k1ng440
Copy link
Contributor

@k1ng440 k1ng440 commented Sep 16, 2023

See #1080 for the intention of this pull request.

@k1ng440 k1ng440 changed the title refactor(website): Website will use article in og:type tag in blog articles. refactor(website): Use article in og:type tag in blog articles. Sep 16, 2023
website/public/blog/bug-journey/index.ejs.html Outdated Show resolved Hide resolved
website/public/blog/blog-head.ejs.html Outdated Show resolved Hide resolved
website/public/blog/cpp-vs-rust-build-times/index.ejs.html Outdated Show resolved Hide resolved
website/public/blog/syntax-errors-2021/index.ejs.html Outdated Show resolved Hide resolved
@k1ng440 k1ng440 marked this pull request as draft September 19, 2023 01:31
@k1ng440 k1ng440 marked this pull request as ready for review September 19, 2023 03:34
@k1ng440 k1ng440 requested a review from strager September 19, 2023 03:34
website/public/common-head.ejs.html Outdated Show resolved Hide resolved
website/public/common-head.ejs.html Outdated Show resolved Hide resolved
Comment on lines +4 to +7
%> <% if (typeof meta.blogDate !== 'undefined') { %>
<meta property="og:type" content="article" />
<meta property="article:section" content="Technology" />
<meta property="article:published_time" content="<%= meta.blogDate %>" />
Copy link
Collaborator

Choose a reason for hiding this comment

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

We know this is a blog article because the file is called blog-head.ejs.html. Shouldn't we only put the if around article:published_time?

Suggested change
%> <% if (typeof meta.blogDate !== 'undefined') { %>
<meta property="og:type" content="article" />
<meta property="article:section" content="Technology" />
<meta property="article:published_time" content="<%= meta.blogDate %>" />
%>
<meta property="og:type" content="article" />
<meta property="article:section" content="Technology" />
<% if (typeof meta.blogDate !== 'undefined') { %>
<meta property="article:published_time" content="<%= meta.blogDate %>" />

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This file is also included in /blog.

@strager
Copy link
Collaborator

strager commented Sep 22, 2023

Landed as commit b2bc1a3.

@strager strager closed this Sep 22, 2023
@strager strager linked an issue Sep 23, 2023 that may be closed by this pull request
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.

Blog article OGP tags
2 participants