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

fixes based on SEO tech analysis #625

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ public
yarn-debug.log*
yarn-error.log
yarn-error.log*
.vscode
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ yarn start

Visit [`localhost:8000`](http://localhost:8000) to test it.

If you need to query something use ['http://localhost:8000/\_\_\_graphql'](http://localhost:8000/___graphql)

## Writing a Blog Post

- Create a new folder inside the `content/blog/`
Expand Down
2 changes: 1 addition & 1 deletion content/blog/introducing-excalidraw-plus/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Introducing Excalidraw+
date: 2021-05-03
author: Excalidraw Team
link: https://twitter.com/excalidraw
link: https://github.com/orgs/excalidraw/people
Copy link
Member

Choose a reason for hiding this comment

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

is this the best promo link? Twitter gives us exposure and is more useful to people than a github team link.

Copy link
Collaborator Author

@maielo maielo May 16, 2023

Choose a reason for hiding this comment

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

true, but we it needs to be unified. All other blog posts author points to github. Either i will change all to twitter or all to github.

Right now from SEO perspective we don't look trustful coz for same author we have different links

image: excalidraw-plus.png
---

Expand Down
61 changes: 59 additions & 2 deletions gatsby-config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
const dayjs = require("dayjs");

const siteUrl = process.env.URL || "https://blog.excalidraw.com";

module.exports = {
siteMetadata: {
title: "Excalidraw Blog",
description:
"Get up to speed on the latest news and dive deep into inner workings of Excalidraw",
image: "/og-image-3.png",
siteUrl: "https://blog.excalidraw.com",
siteUrl,
social: {
twitter: "excalidraw",
github: "excalidraw",
Expand Down Expand Up @@ -73,7 +77,60 @@ module.exports = {
},
"gatsby-plugin-dark-mode",
"gatsby-transformer-sharp",
"gatsby-plugin-sitemap",
{
resolve: "gatsby-plugin-sitemap",
options: {
query: `
{
site {
siteMetadata {
siteUrl
}
}
allSitePage {
nodes {
path
}
}
allMarkdownRemark {
nodes {
fields {
slug
}
frontmatter {
date(formatString: "YYYY-MM-DD")
}
}
}
}
`,
resolveSiteUrl: () => siteUrl,
serialize: ({ site, allMarkdownRemark }) => {
// nodes looks like array but its acutally an object
const pages = allMarkdownRemark.nodes.reduce((acc, node) => {
acc.push({
url: `${site.siteMetadata.siteUrl}${node.fields.slug}`,
changefreq: `yearly`,
Copy link
Member

Choose a reason for hiding this comment

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

doesn't this make updates after publish useless?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

thought blog posts are not updating they just are there. Could be monthly but with amount of updates we do to them google will flag it "never" anyway

priority: 0.4,
lastmod: node.frontmatter.date,
});

return acc;
}, []);

return [
...pages,
// manually add root
{
url: `${site.siteMetadata.siteUrl}`,
changefreq: `weekly`,
priority: 1,
lastmod: dayjs(new Date()).format("YYYY-MM-DD"),
},
];
},
},
},
"gatsby-plugin-sharp",
{
resolve: "gatsby-plugin-google-analytics",
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"author": "Christopher Chedeau <[email protected]>",
"dependencies": {
"@weknow/gatsby-remark-twitter": "0.2.3",
"dayjs": "1.11.7",
"gatsby": "2.32.12",
"gatsby-embedder-excalidraw": "1.1.4",
"gatsby-image": "3.11.0",
Expand Down
1 change: 1 addition & 0 deletions static/robots.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
User-agent: *
Disallow:
Sitemap: https://blog.excalidraw.com/sitemap.xml
23 changes: 9 additions & 14 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3433,20 +3433,10 @@ caniuse-api@^3.0.0:
lodash.memoize "^4.1.2"
lodash.uniq "^4.5.0"

caniuse-lite@^1.0.0:
version "1.0.30000987"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000987.tgz#bc6b47217afd8226a2b1964635c6bff62cdf5738"
integrity sha512-O3VrjtRMTxoU5Cn5/QSmXeIR1gkVps4j9jqfIm4FLaQ5JzqBlVjMUG1xWnoYFv8N+H3Lp++aa05TekyIbjHL7g==

caniuse-lite@^1.0.30001109:
version "1.0.30001151"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001151.tgz#1ddfde5e6fff02aad7940b4edb7d3ac76b0cb00b"
integrity sha512-Zh3sHqskX6mHNrqUerh+fkf0N72cMxrmflzje/JyVImfpknscMnkeJrlFGJcqTmaa0iszdYptGpWMJCRQDkBVw==

caniuse-lite@^1.0.30001157:
version "1.0.30001161"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001161.tgz#64f7ffe79ee780b8c92843ff34feb36cea4651e0"
integrity sha512-JharrCDxOqPLBULF9/SPa6yMcBRTjZARJ6sc3cuKrPfyIk64JN6kuMINWqA99Xc8uElMFcROliwtz0n9pYej+g==
caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001157:
version "1.0.30001482"
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001482.tgz"
integrity sha512-F1ZInsg53cegyjroxLNW9DmrEQ1SuGRTO1QlpA0o2/6OpQ0gFeDRoq1yFmnr8Sakn9qwwt9DmbxHB6w167OSuQ==

caw@^2.0.0, caw@^2.0.1:
version "2.0.1"
Expand Down Expand Up @@ -4416,6 +4406,11 @@ date-now@^0.1.4:
resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b"
integrity sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=

[email protected]:
version "1.11.7"
resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.7.tgz#4b296922642f70999544d1144a2c25730fce63e2"
integrity sha512-+Yw9U6YO5TQohxLcIkrXBeY73WP3ejHWVvx8XCk3gxvQDCTEmS48ZrSZCKciI7Bhl/uCMyxYtE9UqRILmFphkQ==

debug@2, [email protected], debug@^2.2.0, debug@^2.3.3, debug@^2.6.0, debug@^2.6.6, debug@^2.6.9:
version "2.6.9"
resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
Expand Down