mirror of
https://github.com/tabler/tabler.git
synced 2025-12-21 17:34:25 +04:00
Add different favicon to development environment (#2395)
This commit is contained in:
5
.changeset/late-owls-press.md
Normal file
5
.changeset/late-owls-press.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"@tabler/core": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Add different favicon to development environment
|
||||||
BIN
docs/public/favicon-dev.ico
Normal file
BIN
docs/public/favicon-dev.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
@@ -22,6 +22,7 @@ export default function (eleventyConfig) {
|
|||||||
eleventyConfig.addPassthroughCopy({
|
eleventyConfig.addPassthroughCopy({
|
||||||
"node_modules/@tabler/core/dist": "dist",
|
"node_modules/@tabler/core/dist": "dist",
|
||||||
"pages/favicon.ico": "favicon.ico",
|
"pages/favicon.ico": "favicon.ico",
|
||||||
|
"pages/favicon-dev.ico": "favicon-dev.ico",
|
||||||
"static": "static",
|
"static": "static",
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
BIN
preview/pages/favicon-dev.ico
Normal file
BIN
preview/pages/favicon-dev.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
@@ -22,14 +22,17 @@
|
|||||||
<meta name="HandheldFriendly" content="True"/>
|
<meta name="HandheldFriendly" content="True"/>
|
||||||
<meta name="MobileOptimized" content="320"/>
|
<meta name="MobileOptimized" content="320"/>
|
||||||
|
|
||||||
<link rel="icon" href="{{ page | relative }}/favicon.ico" type="image/x-icon"/>
|
<link rel="icon" href="{{ page | relative }}/favicon.ico" type="image/x-icon" />
|
||||||
<link rel="shortcut icon" href="{{ page | relative }}/favicon.ico" type="image/x-icon"/>
|
<link rel="shortcut icon" href="{{ page | relative }}/favicon.ico" type="image/x-icon"/>
|
||||||
|
|
||||||
<meta name="description" content="{{ description | default: site.description | escape }}"/>
|
<meta name="description" content="{{ description | default: site.description | escape }}"/>
|
||||||
|
|
||||||
{% include "layout/og.html" %}
|
{% include "layout/og.html" %}
|
||||||
|
{% elsif environment == 'development' %}
|
||||||
|
<link rel="icon" href="{{ page | relative }}/favicon-dev.ico" type="image/x-icon" />
|
||||||
|
<link rel="shortcut icon" href="{{ page | relative }}/favicon-dev.ico" type="image/x-icon" />
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
{% include "layout/css.html" %}
|
{% include "layout/css.html" %}
|
||||||
{% include "layout/js-libs.html" head %}
|
{% include "layout/js-libs.html" head %}
|
||||||
|
|
||||||
|
|||||||
@@ -5,30 +5,32 @@
|
|||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
|
||||||
|
{% if environment == 'preview' %}
|
||||||
|
|
||||||
{% assign pageSection = "" %}
|
{% assign pageSection = "" %}
|
||||||
{% if page.url contains "/ui/" %}
|
{% if page.url contains "/ui/" %}
|
||||||
{% assign pageSection = "UI" %}
|
{% assign pageSection = "UI" %}
|
||||||
{% elsif page.url contains "/icons/" %}
|
{% elsif page.url contains "/icons/" %}
|
||||||
{% assign pageSection = "Icons" %}
|
{% assign pageSection = "Icons" %}
|
||||||
{% elsif page.url contains "/illustrations/" %}
|
{% elsif page.url contains "/illustrations/" %}
|
||||||
{% assign pageSection = "Illustrations" %}
|
{% assign pageSection = "Illustrations" %}
|
||||||
{% elsif page.url contains "/emails/" %}
|
{% elsif page.url contains "/emails/" %}
|
||||||
{% assign pageSection = "Emails" %}
|
{% assign pageSection = "Emails" %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% assign metaTitle = title %}
|
{% assign metaTitle = title %}
|
||||||
{% if seoTitle %}
|
{% if seoTitle %}
|
||||||
{% assign metaTitle = seoTitle %}
|
{% assign metaTitle = seoTitle %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% assign metaDescription = description %}
|
{% assign metaDescription = description %}
|
||||||
{% if seoDescription %}
|
{% if seoDescription %}
|
||||||
{% assign metaDescription = seoDescription %}
|
{% assign metaDescription = seoDescription %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% assign siteName = "Tabler Documentation" %}
|
{% assign siteName = "Tabler Documentation" %}
|
||||||
{% if pageSection != "" %}
|
{% if pageSection != "" %}
|
||||||
{% assign siteName = "Tabler " | append: pageSection | append: " Documentation" %}
|
{% assign siteName = "Tabler " | append: pageSection | append: " Documentation" %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<title>{{ metaTitle }} | {{ siteName }}</title>
|
<title>{{ metaTitle }} | {{ siteName }}</title>
|
||||||
@@ -48,6 +50,11 @@
|
|||||||
|
|
||||||
<script defer data-api="/stats/event" data-domain="docs.tabler.io" src="/stats/js/script.js"></script>
|
<script defer data-api="/stats/event" data-domain="docs.tabler.io" src="/stats/js/script.js"></script>
|
||||||
|
|
||||||
|
{% elsif environment == 'development' %}
|
||||||
|
<link rel="icon" href="{{ page | relative }}/favicon-dev.ico" type="image/x-icon" />
|
||||||
|
<link rel="shortcut icon" href="{{ page | relative }}/favicon-dev.ico" type="image/x-icon" />
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<link rel="stylesheet" href="/dist/css/tabler{% if environment != 'development' %}.min{% endif %}.css{% if environment != 'development' %}?{{ 'now' | date: '%s' }}{% endif %}" />
|
<link rel="stylesheet" href="/dist/css/tabler{% if environment != 'development' %}.min{% endif %}.css{% if environment != 'development' %}?{{ 'now' | date: '%s' }}{% endif %}" />
|
||||||
{% for plugin in site.cssPlugins %}
|
{% for plugin in site.cssPlugins %}
|
||||||
<link
|
<link
|
||||||
|
|||||||
Reference in New Issue
Block a user