提交 a7d90607 编写于 作者: C codecalm

sitemap fix

上级 8cb51f80
......@@ -17,6 +17,7 @@ homepage: https://tabler.io
github-url: https://github.com/tabler/tabler
changelog-url: https://github.com/tabler/tabler/releases
sponsor-url: https://github.com/sponsors/codecalm
preview-url: https://preview.tabler.io
mapbox_key: pk.eyJ1IjoiY29kZWNhbG0iLCJhIjoiSzRiOVJvQSJ9.BUVkTT6IYs83xSUs4H7bjQ
......
<meta name="twitter:image:src" content="https://preview.tabler.io/static/og.png">
<meta name="twitter:image:src" content="{% if jekyll.environment == 'preview' %}{{ site.preview-url }}{% endif %}/static/og.png">
<meta name="twitter:site" content="@tabler_ui">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Tabler: Premium and Open Source dashboard template with responsive and high quality UI.">
<meta name="twitter:description" content="Tabler comes with tons of well-designed components and features. Start your adventure with Tabler and make your dashboard great again. For free!">
<meta property="og:image" content="https://preview.tabler.io/static/og.png">
<meta property="og:image" content="{% if jekyll.environment == 'preview' %}{{ site.preview-url }}{% endif %}/static/og.png">
<meta property="og:image:width" content="1280">
<meta property="og:image:height" content="640">
<meta property="og:site_name" content="Tabler">
<meta property="og:type" content="object">
<meta property="og:title" content="Tabler: Premium and Open Source dashboard template with responsive and high quality UI.">
<meta property="og:url" content="https://preview.tabler.io/static/og.png">
<meta property="og:url" content="{% if jekyll.environment == 'preview' %}{{ site.preview-url }}{% endif %}/static/og.png">
<meta property="og:description" content="Tabler comes with tons of well-designed components and features. Start your adventure with Tabler and make your dashboard great again. For free!">
......@@ -58,7 +58,7 @@ og-component: true
<div class="col">{% include ui/button.html icon="clipboard" text="Copy code" color="white" block=true class="mt-4" %}</div>
<div class="col">
<form action="https://codepen.io/pen/define" method="post" target="_blank">
<input type="hidden" name="data" value='{"title":"{{ page.title | escape }}","css_external":"https://preview.tabler.io/dist/css/tabler.css","html":"{{ demo-html | tidy: 'html' | replace_regex: "\n", "\\n" | replace_regex: "\t", "\\t" | replace_regex: '"', '\"' | replace_regex: "'", "\'" }}","css":"{{ demo-css | replace_regex: "\n", "\\n" | replace_regex: "\t", "\\t" | replace_regex: '"', '\"' }}", "editors":"100"}'>
<input type="hidden" name="data" value='{"title":"{{ page.title | escape }}","css_external":"{{ site.preview-url }}/dist/css/tabler.css","html":"{{ demo-html | tidy: 'html' | replace_regex: "\n", "\\n" | replace_regex: "\t", "\\t" | replace_regex: '"', '\"' | replace_regex: "'", "\'" }}","css":"{{ demo-css | replace_regex: "\n", "\\n" | replace_regex: "\t", "\\t" | replace_regex: '"', '\"' }}", "editors":"100"}'>
{% include ui/button.html icon="codesandbox" text="Edit in CodePen" color="primary" block=true class="mt-4" element="button" type="submit" %}
</form>
</div>
......
......@@ -8,7 +8,7 @@ layout: none
{% assign docs = collection.docs | where_exp:'doc','doc.sitemap != false' %}
{% for doc in docs %}
<url>
<loc>{{ doc.url | replace:'/index.html','/' | absolute_url | xml_escape }}</loc>
<loc>{% if jekyll.environment == 'preview' %}{{ site.preview-url }}{% endif %}{{ doc.url | replace: '/index.html', '/' | absolute_url | xml_escape }}</loc>
{% if doc.last_modified_at or doc.date %}
<lastmod>{{ doc.last_modified_at | default: doc.date | date_to_xmlschema }}</lastmod>
{% endif %}
......@@ -19,7 +19,7 @@ layout: none
{% assign pages = site.html_pages | where_exp:'doc','doc.sitemap != false' | where_exp:'doc','doc.url != "/404.html"' %}
{% for page in pages %}
<url>
<loc>{{ page.url | replace:'/index.html','/' | absolute_url | xml_escape }}</loc>
<loc>{% if jekyll.environment == 'preview' %}{{ site.preview-url }}{% endif %}{{ page.url | replace: '/index.html', '/' | absolute_url | xml_escape }}</loc>
{% if page.last_modified_at %}
<lastmod>{{ page.last_modified_at | date_to_xmlschema }}</lastmod>
{% endif %}
......@@ -29,7 +29,7 @@ layout: none
{% assign static_files = page.static_files | where_exp:'page','page.sitemap != false' | where_exp:'page','page.name != "404.html"' %}
{% for file in static_files %}
<url>
<loc>{{ file.path | replace:'/index.html','/' | absolute_url | xml_escape }}</loc>
<loc>{% if jekyll.environment == 'preview' %}{{ site.preview-url }}{% endif %}{{ file.path | replace:'/index.html','/' | absolute_url | xml_escape }}</loc>
<lastmod>{{ file.modified_time | date_to_xmlschema }}</lastmod>
</url>
{% endfor %}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册