1
0
mirror of https://github.com/tabler/tabler.git synced 2026-07-16 02:21:44 +04:00

Merge branch 'main' of https://github.com/tabler/tabler into dev

This commit is contained in:
codecalm
2026-07-14 22:45:19 +02:00
5 changed files with 47 additions and 3 deletions
+2 -1
View File
@@ -39,6 +39,7 @@ dist/
packages-zip/
.env
sri.json
preview-astro
# TypeScript
*.tsbuildinfo
@@ -46,4 +47,4 @@ sri.json
# Test coverage
coverage/
__screenshots__/
__screenshots__/
+14
View File
@@ -0,0 +1,14 @@
---
layout: null
permalink: robots.txt
eleventyExcludeFromCollections: true
---
Sitemap: {% if environment != 'development' %}{{ site.docsUrl }}{% endif %}/sitemap.xml
{% if environment == 'development' %}
User-agent: *
Disallow: /
{% else %}
User-agent: *
Disallow:
{% endif %}
+19
View File
@@ -0,0 +1,19 @@
---
layout: null
permalink: sitemap.xml
eleventyExcludeFromCollections: true
---
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
{% for entry in collections.sitemap %}
{% assign path = entry.url | replace: 'index.html', '' %}
{% if path == '/' %}
{% assign path = '' %}
{% endif %}
<url>
<loc>{% if environment != 'development' %}{{ site.docsUrl }}{% endif %}{{ path | xml_escape }}</loc>
<lastmod>{{ entry.last_modified_at | default: 'now' | date_to_xmlschema }}</lastmod>
</url>
{% endfor %}
</urlset>
+11
View File
@@ -27,6 +27,17 @@ export default function (eleventyConfig) {
});
});
eleventyConfig.addCollection('sitemap', collection => {
return [...collection.getFilteredByGlob('./content/**/*.md')].sort((a, b) => {
const isHome = (page) => page.url === '/' || page.url === '/index.html';
if (isHome(a)) return -1;
if (isHome(b)) return 1;
return (a.url || '').localeCompare(b.url || '');
});
});
eleventyConfig.setInputDirectory("content");
eleventyConfig.amendLibrary('md', () => { });
+1 -2
View File
@@ -5,8 +5,6 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{% if environment == 'production' %}
{% assign pageSection = "" %}
{% if page.url contains "/ui/" %}
{% assign pageSection = "UI" %}
@@ -34,6 +32,7 @@
{% endif %}
<title>{{ metaTitle }} | {{ siteName }}</title>
{% if environment == 'production' %}
{% if metaDescription %}<meta name="description" content="{{ metaDescription }}">{% endif %}
<link rel="canonical" href="{{ page.url | absolute_url }}">