refactor: ♻️ use custom sitemap generation instead of package
This commit is contained in:
parent
f7e0e51bc6
commit
f8b97f7649
2 changed files with 12 additions and 8 deletions
|
@ -11,7 +11,6 @@ import eleventyPluginNavigation from '@11ty/eleventy-navigation';
|
||||||
import eleventyPluginOgImage from 'eleventy-plugin-og-image';
|
import eleventyPluginOgImage from 'eleventy-plugin-og-image';
|
||||||
import eleventyPluginReadingTime from '@myxotod/eleventy-plugin-readingtime';
|
import eleventyPluginReadingTime from '@myxotod/eleventy-plugin-readingtime';
|
||||||
import eleventyPluginRobotsTxt from 'eleventy-plugin-robotstxt';
|
import eleventyPluginRobotsTxt from 'eleventy-plugin-robotstxt';
|
||||||
import eleventyPluginSitemap from '@quasibit/eleventy-plugin-sitemap';
|
|
||||||
import eleventyPluginSyntaxHighlight from '@11ty/eleventy-plugin-syntaxhighlight';
|
import eleventyPluginSyntaxHighlight from '@11ty/eleventy-plugin-syntaxhighlight';
|
||||||
import markdownItAbbr from 'markdown-it-abbr';
|
import markdownItAbbr from 'markdown-it-abbr';
|
||||||
import markdownItCallouts from 'markdown-it-obsidian-callouts';
|
import markdownItCallouts from 'markdown-it-obsidian-callouts';
|
||||||
|
@ -59,11 +58,6 @@ export default async function (eleventyConfig) {
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
eleventyConfig.addPlugin(eleventyPluginSitemap, {
|
|
||||||
sitemap: {
|
|
||||||
hostname: 'https://blog.sebin-nyshkim.net'
|
|
||||||
}
|
|
||||||
});
|
|
||||||
eleventyConfig.addPlugin(eleventyImageTransformPlugin, {
|
eleventyConfig.addPlugin(eleventyImageTransformPlugin, {
|
||||||
extensions: 'html',
|
extensions: 'html',
|
||||||
formats: ['avif', 'webp', 'auto'],
|
formats: ['avif', 'webp', 'auto'],
|
||||||
|
|
|
@ -1,6 +1,16 @@
|
||||||
---
|
---
|
||||||
permalink: /sitemap.xml
|
permalink: /sitemap.xml
|
||||||
layout: null
|
|
||||||
eleventyExcludeFromCollections: true
|
eleventyExcludeFromCollections: true
|
||||||
---
|
---
|
||||||
{# {% sitemap collections.all %} #}
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||||
|
{% for page in collections.all %}
|
||||||
|
{% if not page.data.draft %}
|
||||||
|
<url>
|
||||||
|
<loc>{{ site.url }}{{ page.url | url }}</loc>
|
||||||
|
<lastmod>{{ page.date | isoDate }}</lastmod>
|
||||||
|
<changefreq>{{ page.data.changeFreq if page.data.changeFreq else "monthly" }}</changefreq>
|
||||||
|
</url>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
</urlset>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue