Skip to content

Commit 2201629

Browse files
committed
Automated sitemap + page descriptions + stat counter + seo optmizations
1 parent d45c04a commit 2201629

File tree

17 files changed

+130
-106
lines changed

17 files changed

+130
-106
lines changed

eleventy.config.js

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,11 @@ const syntaxHighlight = require("@11ty/eleventy-plugin-syntaxhighlight");
33
const pluginTOC = require('eleventy-plugin-toc');
44
const markdownIt = require('markdown-it');
55
const markdownItAnchor = require('markdown-it-anchor');
6-
const sitemap = require("@quasibit/eleventy-plugin-sitemap");
76

87
module.exports = function(eleventyConfig) {
98

109
eleventyConfig.addPlugin(syntaxHighlight);
1110

12-
// Add the sitemap plugin with image grabbing enabled
13-
eleventyConfig.addPlugin(sitemap, {
14-
sitemap: {
15-
hostname: "https://aryan-gupta.is-a.dev",
16-
},
17-
images: {
18-
grab: true,
19-
featuredImage: "image"
20-
}
21-
});
22-
2311
eleventyConfig.setLibrary(
2412
'md',
2513
markdownIt({
@@ -45,6 +33,14 @@ module.exports = function(eleventyConfig) {
4533
flat: false
4634
});
4735

36+
eleventyConfig.addFilter("regexFindAll", (content, regexString) => {
37+
if (!content) {
38+
return [];
39+
}
40+
const regex = new RegExp(regexString, "g");
41+
return Array.from(content.matchAll(regex));
42+
});
43+
4844
eleventyConfig.addCollection("research", function(collectionApi) {
4945
return collectionApi.getFilteredByTag("research");
5046
});

package-lock.json

Lines changed: 28 additions & 82 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"devDependencies": {
33
"@11ty/eleventy": "^3.0.0",
44
"@11ty/eleventy-plugin-syntaxhighlight": "^5.0.1",
5-
"@quasibit/eleventy-plugin-sitemap": "^2.2.0",
5+
"cross-env": "^7.0.3",
66
"eleventy-plugin-toc": "^1.1.5",
77
"luxon": "^3.6.1",
88
"markdown-it": "^14.1.0",

robots.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
User-agent: *
2-
Allow: /
2+
Allow: /
3+
4+
Sitemap: https://aryan-gupta.is-a.dev/sitemap.xml

src/_includes/layouts/base.njk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22
<html lang="en">
33
<head>
44
<meta name="viewport" content="width=device-width, initial-scale=1.0">
5+
<meta name="description" content="{{ description }}">
56
<link rel="preconnect" href="https://fonts.googleapis.com">
67
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
78
<link href="https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,700;1,400&family=Poppins:wght@400;600;700&display=swap" rel="stylesheet">
89
<title>{{ title | default("Aryan Gupta - Portfolio") }}</title>
10+
<link rel="canonical" href="https://aryan-gupta.is-a.dev{{ page.url }}">
911
<link rel="stylesheet" href="/css/okaidia.css">
1012
<link rel="stylesheet" href="/css/base.css">
1113
<link rel="stylesheet" href="/css/layout.css">
@@ -15,6 +17,8 @@
1517
<link rel="stylesheet" href="/css/research.css">
1618
<link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32.png">
1719
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css" ... />
20+
<script data-goatcounter="https://aryan-gupta.goatcounter.com/count"
21+
async src="//gc.zgo.at/count.js"></script>
1822
</head>
1923
<body>
2024
<div id="tsparticles"></div>

src/_includes/layouts/post.njk

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,21 @@ layout: 'layouts/base.njk'
2424

2525
<p style="margin-top: 40px; text-align: center;">
2626
<a href="/blog/">&larr; Back to Blog List</a> {# Link back to blog index #}
27-
</p>
27+
</p>
28+
29+
<script type="application/ld+json">
30+
{
31+
"@context": "https://schema.org",
32+
"@type": "BlogPosting",
33+
"headline": "{{ title }}",
34+
"description": "{{ description }}",
35+
{% if image -%}
36+
"image": "https://aryan-gupta.is-a.dev{{ image | url }}",
37+
{%- endif %}
38+
"datePublished": "{{ page.date.toISOString() }}",
39+
"author": {
40+
"@type": "Person",
41+
"name": "Aryan Gupta"
42+
}
43+
}
44+
</script>

src/blog/3d-graph-plugin.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ tags:
55
- post
66
layout: layouts/post.njk
77
excerpt: "A deep dive into the Obsidian 3D Graph plugin. Discover its core features and take a behind-the-scenes look at the technical challenges and solutions involved in its development, from solving complex CSS color issues to building a real-time settings UI."
8+
descri[tion: "A deep dive into the Obsidian 3D Graph plugin. Discover its key features, how it was built, and how it can help you find new connections in your notes."
89
permalink: "/blog/{{ page.date.getFullYear() }}/{{ page.fileSlug }}/"
910
sitemap:
1011
priority: 0.5

src/blog/compact-gui-deep-dive.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ tags:
55
- post
66
layout: layouts/post.njk
77
excerpt: "A look into Compact-GUI, an open-source application that utilizes Windows' CompactOS feature to help reduce the disk space occupied by games and programs. This post covers its functionality, my experience, and how to use it."
8+
description: "Learn how Compact-GUI uses Windows' built-in features to shrink game and application files, saving you disk space with minimal performance impact."
89
permalink: "/blog/{{ page.date.getFullYear() }}/{{ page.fileSlug }}/"
910
sitemap:
1011
priority: 0.5

src/blog/first-post.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ tags:
55
- post
66
layout: layouts/post.njk # Tell it to use the post layout
77
excerpt: "Ever wondered what goes into building a website from scratch? In my first blog post, I share the journey behind creating this VCE resource hub – from the initial idea and tech choices to the challenges faced and lessons learned along the way. Take a peek behind the scenes!"
8+
description: "A behind-the-scenes look at the tech choices, challenges, and lessons learned while creating my personal portfolio and VCE resource hub from scratch."
89
permalink: "/blog/{{ page.date.getFullYear() }}/{{ page.fileSlug }}/"
910
sitemap:
1011
priority: 0.5

src/blog/notebooklm.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ tags:
55
- post
66
layout: layouts/post.njk
77
excerpt: "Discover how Google's NotebookLM can transform your VCE study routine. This deep dive covers key features like the Study Guide and Mind Map creator, and walks through building a Chemistry revision notebook from scratch. Stop drowning in notes and start understanding them."
8+
description: "Discover how Google's NotebookLM can transform your VCE study routine by turning your notes into an interactive study guide, mind map, and audio summary."
89
permalink: "/blog/{{ page.date.getFullYear() }}/{{ page.fileSlug }}/"
910
sitemap:
1011
priority: 0.5

0 commit comments

Comments
 (0)