mirror of
https://github.com/tabler/tabler.git
synced 2025-12-21 17:34:25 +04:00
preview-dev env
This commit is contained in:
@@ -358,7 +358,11 @@ gulp.task('build-jekyll', (cb) => {
|
||||
var env = Object.create(process.env)
|
||||
|
||||
if (argv.preview) {
|
||||
if (argv.dev) {
|
||||
env.JEKYLL_ENV = 'preview-dev'
|
||||
} else {
|
||||
env.JEKYLL_ENV = 'preview'
|
||||
}
|
||||
} else {
|
||||
env.JEKYLL_ENV = 'production'
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
"start-plugins": "gulp start --with-plugins",
|
||||
"build": "gulp build",
|
||||
"preview": "gulp build --preview",
|
||||
"preview-dev": "gulp build --preview --dev",
|
||||
"svg-optimize": "svgo -f svg/brand --pretty",
|
||||
"unused-files": "node build/unused-files.js",
|
||||
"release": "release-it",
|
||||
|
||||
@@ -9,16 +9,16 @@
|
||||
{% for lib in site.data.libs.css %}
|
||||
{% if libs contains lib[0] %}
|
||||
{% for file in lib[1] %}
|
||||
<link href="{% if file contains 'http://' or file contains 'https://' %}{{ file }}{% else %}{{ site.base }}/{% if jekyll.environment != 'development' %}dist/libs{% else %}node_modules{% endif %}/{% if jekyll.environment != 'development' %}{{ file | replace: '@', '' }}{% else %}{{ file }}{% endif %}{% if jekyll.environment == 'preview' %}?{{ site.time | date: '%s' }}{% endif %}{% endif %}" rel="stylesheet"/>
|
||||
<link href="{% if file contains 'http://' or file contains 'https://' %}{{ file }}{% else %}{{ site.base }}/{% if jekyll.environment != 'development' %}dist/libs{% else %}node_modules{% endif %}/{% if jekyll.environment != 'development' %}{{ file | replace: '@', '' }}{% else %}{{ file }}{% endif %}{% if jekyll.environment != 'development' %}?{{ site.time | date: '%s' }}{% endif %}{% endif %}" rel="stylesheet"/>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
<link href="{{ site.base }}/dist/css/tabler{% if page.rtl or site.rtl %}.rtl{% endif %}{% if jekyll.environment != 'development' %}.min{% endif %}.css{% if jekyll.environment == 'preview' %}?{{ site.time | date: '%s' }}{% endif %}" rel="stylesheet"/>
|
||||
<link href="{{ site.base }}/dist/css/tabler{% if page.rtl or site.rtl %}.rtl{% endif %}{% if jekyll.environment != 'development' %}.min{% endif %}.css{% if jekyll.environment != 'development' %}?{{ site.time | date: '%s' }}{% endif %}" rel="stylesheet"/>
|
||||
|
||||
{% for plugin in site.tabler-css-plugins %}
|
||||
<link href="{{ site.base }}/dist/css/{{ plugin }}{% if page.rtl or site.rtl %}.rtl{% endif %}{% if jekyll.environment != 'development' %}.min{% endif %}.css{% if jekyll.environment == 'preview' %}?{{ site.time | date: '%s' }}{% endif %}" rel="stylesheet"/>
|
||||
<link href="{{ site.base }}/dist/css/{{ plugin }}{% if page.rtl or site.rtl %}.rtl{% endif %}{% if jekyll.environment != 'development' %}.min{% endif %}.css{% if jekyll.environment != 'development' %}?{{ site.time | date: '%s' }}{% endif %}" rel="stylesheet"/>
|
||||
{% endfor %}
|
||||
|
||||
<link href="{{ site.base }}/dist/css/demo{% if page.rtl or site.rtl %}.rtl{% endif %}{% if jekyll.environment != 'development' %}.min{% endif %}.css{% if jekyll.environment == 'preview' %}?{{ site.time | date: '%s' }}{% endif %}" rel="stylesheet"/>
|
||||
<link href="{{ site.base }}/dist/css/demo{% if page.rtl or site.rtl %}.rtl{% endif %}{% if jekyll.environment != 'development' %}.min{% endif %}.css{% if jekyll.environment != 'development' %}?{{ site.time | date: '%s' }}{% endif %}" rel="stylesheet"/>
|
||||
@@ -22,7 +22,7 @@
|
||||
All rights reserved.
|
||||
</li>
|
||||
<li class="list-inline-item">
|
||||
{% if jekyll.environment != 'development' %}
|
||||
{% if jekyll.environment == 'preview' or jekyll.environment == 'production' %}
|
||||
<a href="{{ site.base }}/changelog.html" class="link-secondary" rel="noopener">
|
||||
v{{ site.data.package.version }}
|
||||
</a>
|
||||
|
||||
@@ -2,22 +2,22 @@
|
||||
{% assign libs = page.libs | default: layout.libs %}
|
||||
|
||||
{% assign google-maps-key = site.google-maps-dev-key %}
|
||||
{% if jekyll.environment == 'preview' %}
|
||||
{% if jekyll.environment != 'development' %}
|
||||
{% assign google-maps-key = site.google-maps-key %}
|
||||
{% endif %}
|
||||
|
||||
{% for lib in site.data.libs.js %}
|
||||
{% if libs contains lib[0] or site.data.libs.global-libs contains lib[0] %}
|
||||
{% for file in lib[1] %}
|
||||
<script src="{% if file contains 'http://' or file contains 'https://' %}{{ file | replace: 'GOOGLE_MAPS_KEY', google-maps-key }}{% else %}{{ site.base }}/{% if jekyll.environment != 'development' %}dist/libs{% else %}node_modules{% endif %}/{% if jekyll.environment != 'development' %}{{ file | replace: '@', '' }}{% else %}{{ file }}{% endif %}{% if jekyll.environment == 'preview' %}?{{ site.time | date: '%s' }}{% endif %}{% endif %}" defer></script>
|
||||
<script src="{% if file contains 'http://' or file contains 'https://' %}{{ file | replace: 'GOOGLE_MAPS_KEY', google-maps-key }}{% else %}{{ site.base }}/{% if jekyll.environment != 'development' %}dist/libs{% else %}node_modules{% endif %}/{% if jekyll.environment != 'development' %}{{ file | replace: '@', '' }}{% else %}{{ file }}{% endif %}{% if jekyll.environment != 'development' %}?{{ site.time | date: '%s' }}{% endif %}{% endif %}" defer></script>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
<!-- Tabler Core -->
|
||||
|
||||
<script src="{{ site.base }}/dist/js/tabler{% if jekyll.environment != 'development' %}.min{% endif %}.js{% if jekyll.environment == 'preview' %}?{{ site.time | date: '%s' }}{% endif %}" defer></script>
|
||||
<script src="{{ site.base }}/dist/js/demo{% if jekyll.environment != 'development' %}.min{% endif %}.js{% if jekyll.environment == 'preview' %}?{{ site.time | date: '%s' }}{% endif %}" defer></script>
|
||||
<script src="{{ site.base }}/dist/js/tabler{% if jekyll.environment != 'development' %}.min{% endif %}.js{% if jekyll.environment != 'development' %}?{{ site.time | date: '%s' }}{% endif %}" defer></script>
|
||||
<script src="{{ site.base }}/dist/js/demo{% if jekyll.environment != 'development' %}.min{% endif %}.js{% if jekyll.environment != 'development' %}?{{ site.time | date: '%s' }}{% endif %}" defer></script>
|
||||
|
||||
|
||||
{% removeemptylines %}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<meta name="twitter:image:src" content="{% if jekyll.environment == 'preview' %}{{ site.preview-url }}{% endif %}/static/og.png">
|
||||
<meta name="twitter:image:src" content="{% if jekyll.environment != 'development' %}{{ 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="{% if jekyll.environment == 'preview' %}{{ site.preview-url }}{% endif %}/static/og.png">
|
||||
<meta property="og:image" content="{% if jekyll.environment != 'development' %}{{ 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="{% if jekyll.environment == 'preview' %}{{ site.preview-url }}{% endif %}/static/og.png">
|
||||
<meta property="og:url" content="{% if jekyll.environment != 'development' %}{{ 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!">
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
<title>{% if title %}{{ title }} - {% endif %}{% if site.title %}{{ site.title }} - {% endif %}{{ site.description }}</title>
|
||||
|
||||
{% if jekyll.environment == 'preview' %}
|
||||
{% if jekyll.environment == 'preview' or jekyll.environment == 'preview-dev' %}
|
||||
{% include layout/analytics.html %}
|
||||
|
||||
<meta name="msapplication-TileColor" content="{{ site.data.colors.blue }}"/>
|
||||
@@ -41,18 +41,12 @@
|
||||
|
||||
{% assign layout-dark = page.layout-dark | default: site.layout-dark %}
|
||||
<body {% if layout.body-class or page.body-class %} class="{% if layout.body-class %} {{ layout.body-class }}{% endif %}{% if page.body-class %} {{ page.body-class }}{% endif %}"{% endif %}>
|
||||
<script src="{{ site.base }}/dist/js/demo-theme{% if jekyll.environment != 'development' %}.min{% endif %}.js{% if jekyll.environment == 'preview' %}?{{ site.time | date: '%s' }}{% endif %}"></script>
|
||||
<script src="{{ site.base }}/dist/js/demo-theme{% if jekyll.environment != 'development' %}.min{% endif %}.js{% if jekyll.environment != 'development' %}?{{ site.time | date: '%s' }}{% endif %}"></script>
|
||||
|
||||
{{ content }}
|
||||
|
||||
{% include layout/modals-capture.html %}
|
||||
|
||||
{% comment %}
|
||||
{% if jekyll.environment == 'preview' %}
|
||||
{% include layout/sentry.html %}
|
||||
{% endif %}
|
||||
{% endcomment %}
|
||||
|
||||
{% include layout/js.html %}
|
||||
|
||||
{% if site.debug and jekyll.environment == 'development' %}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
---
|
||||
layout: none
|
||||
---
|
||||
Sitemap: {% if jekyll.environment == 'preview' %}{{ site.preview-url }}{% endif %}{{ "sitemap.xml" | absolute_url }}
|
||||
Sitemap: {% if jekyll.environment != 'development' %}{{ site.preview-url }}{% endif %}{{ "sitemap.xml" | absolute_url }}
|
||||
|
||||
@@ -8,7 +8,7 @@ layout: none
|
||||
{% assign docs = collection.docs | where_exp:'doc','doc.sitemap != false' %}
|
||||
{% for doc in docs %}
|
||||
<url>
|
||||
<loc>{% if jekyll.environment == 'preview' %}{{ site.preview-url }}{% endif %}{{ doc.url | replace: '/index.html', '/' | absolute_url | xml_escape }}</loc>
|
||||
<loc>{% if jekyll.environment != 'development' %}{{ 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>{% if jekyll.environment == 'preview' %}{{ site.preview-url }}{% endif %}{{ page.url | replace: '/index.html', '/' | absolute_url | xml_escape }}</loc>
|
||||
<loc>{% if jekyll.environment != 'development' %}{{ site.preview-url }}{% endif %}{{ page.url | replace: '/index.html', '/' | absolute_url | xml_escape }}</loc>
|
||||
<lastmod>{{ page.last_modified_at | default: site.time | date_to_xmlschema }}</lastmod>
|
||||
</url>
|
||||
{% endfor %}
|
||||
@@ -27,7 +27,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>{% if jekyll.environment == 'preview' %}{{ site.preview-url }}{% endif %}{{ file.path | replace:'/index.html','/' | absolute_url | xml_escape }}</loc>
|
||||
<loc>{% if jekyll.environment != 'development' %}{{ site.preview-url }}{% endif %}{{ file.path | replace:'/index.html','/' | absolute_url | xml_escape }}</loc>
|
||||
<lastmod>{{ file.modified_time | date_to_xmlschema }}</lastmod>
|
||||
</url>
|
||||
{% endfor %}
|
||||
|
||||
Reference in New Issue
Block a user