Skip to content

Commit

Permalink
refactor(website): Website will use article in og:type tag in blo…
Browse files Browse the repository at this point in the history
…g articles.
  • Loading branch information
k1ng440 committed Sep 19, 2023
1 parent af321e1 commit e3e4222
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 3 deletions.
10 changes: 9 additions & 1 deletion website/public/blog/blog-head.ejs.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
<%#
<!-- Copyright (C) 2020 Matthew "strager" Glazar -->
<!-- See end of file for extended copyright information. -->
%>
%> <% 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 %>" />
<% } %> <% if (typeof meta.blogModifiedDate !== 'undefined') { %>
<meta property="article:modified_time" content="<%= meta.blogModifiedDate %>" />
<% } %> <% if (typeof meta.blogAuthor !== 'undefined') { %>
<meta property="article:author" content="<%= meta.blogAuthor %>" />
<% } %>

<link
rel="alternate"
Expand Down
3 changes: 2 additions & 1 deletion website/public/blog/bug-journey/index.ejs.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"linkLabelHTML": "Sometimes it <em>is</em> a compiler bug",
"description": "My journey in finding and fixing a bug in a C++ toolchain",
"navTitle": "Compiler bug",
"blogAuthor": "Matthew \"strager\" Glazar",
"blogDate": "2022-05-25T21:04:02-07:00"
}--->

Expand Down Expand Up @@ -652,7 +653,7 @@ <h2>Fixing the bug</h2>
../../../bfd/../mkinstalldirs /ucrt64/share; \
else \
../../../bfd/mkinstalldirs /ucrt64/share; \
fi
fi
installing da.gmo as <mark>/ucrt64/share/locale/da/LC_MESSAGES/bfd.mo</mark>
installing es.gmo as <mark>/ucrt64/share/locale/es/LC_MESSAGES/bfd.mo</mark>
installing fi.gmo as <mark>/ucrt64/share/locale/fi/LC_MESSAGES/bfd.mo</mark>
Expand Down
1 change: 1 addition & 0 deletions website/public/blog/cpp-vs-rust-build-times/index.ejs.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"description": "A practical comparison of build and test speed between C++ and Rust.",
"navTitle": "C++ vs Rust",
"image": "/blog/cpp-vs-rust-build-times/cpp-vs-rust.jpg",
"blogAuthor": "Matthew \"strager\" Glazar",
"blogDate": "2023-01-05T21:32:37-08:00"
}--->

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"description": "How to install Homebrew, Neovim, and quick-lint-js on macOS to show JavaScript syntax errors while editing",
"navTitle": "Neovim for JS",
"image": "/blog/show-js-errors-neovim-macos/neovim-demo.png",
"blogAuthor": "Matthew \"strager\" Glazar",
"blogDate": "2022-02-16T21:48:38-08:00"
}--->

Expand Down
4 changes: 3 additions & 1 deletion website/public/blog/syntax-errors-2021/index.ejs.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
"title": "JavaScript syntax errors compared (2021)",
"description": "Comparison of errors produced by different JavaScript parsers",
"navTitle": "JS errors",
"blogDate": "2021-12-11T17:19:10-08:00"
"blogAuthor": "Matthew \"strager\" Glazar",
"blogDate": "2021-12-11T17:19:10-08:00",
"blogModified": "2023-08-01T16:48:07.000-07:00"
}--->

<!DOCTYPE html>
Expand Down
1 change: 1 addition & 0 deletions website/public/blog/version-1.0/index.ejs.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"linkLabelHTML": "Release: version 1.0",
"description": "Faster, easier, friendlier: how quick-lint-js will take over ESLint",
"navTitle": "Release 1.0",
"blogAuthor": "Matthew \"strager\" Glazar",
"blogDate": "2021-12-13T19:27:37-08:00"
}--->

Expand Down
1 change: 1 addition & 0 deletions website/public/blog/version-2.0/index.ejs.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"linkLabelHTML": "Release: version 2.0",
"description": "We are proud to announce version 2.0 of quick-lint-js!",
"navTitle": "Release 2.0",
"blogAuthor": "Matthew \"strager\" Glazar",
"blogDate": "2022-02-04T21:43:20-08:00"
}--->

Expand Down
4 changes: 4 additions & 0 deletions website/public/common-head.ejs.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@
content="<%= locals.image ?? meta.image ?? '/vscode-demo-small.gif' %>"
/>
<meta name="theme-color" content="#a76851" />
<% if (typeof locals.blogDate === 'undefined' && typeof meta.blogDate ===
'undefined') { %>
<meta property="og:type" content="website" />
<% } %> <%# NOTE: See blog.head.ejs.html for blog article related tags %>

<meta name="twitter:card" content="summary_large_image" />
<%#
<!--
Expand Down

0 comments on commit e3e4222

Please sign in to comment.