Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete query strings #963

Merged
merged 2 commits into from
Oct 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions layout/_partials/head/head.swig
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
<meta name="generator" content="Hexo {{ hexo_version }}">

{%- if theme.favicon.apple_touch_icon %}
<link rel="apple-touch-icon" sizes="180x180" href="{{ url_for(theme.favicon.apple_touch_icon) }}?v={{ next_version }}">
<link rel="apple-touch-icon" sizes="180x180" href="{{ url_for(theme.favicon.apple_touch_icon) }}">
{%- endif %}
{%- if theme.favicon.medium %}
<link rel="icon" type="image/png" sizes="32x32" href="{{ url_for(theme.favicon.medium) }}?v={{ next_version }}">
<link rel="icon" type="image/png" sizes="32x32" href="{{ url_for(theme.favicon.medium) }}">
{%- endif %}
{%- if theme.favicon.small %}
<link rel="icon" type="image/png" sizes="16x16" href="{{ url_for(theme.favicon.small) }}?v={{ next_version }}">
<link rel="icon" type="image/png" sizes="16x16" href="{{ url_for(theme.favicon.small) }}">
{%- endif %}
{%- if theme.favicon.safari_pinned_tab %}
<link rel="mask-icon" href="{{ url_for(theme.favicon.safari_pinned_tab) }}?v={{ next_version }}" color="{{ theme.android_chrome_color }}">
<link rel="mask-icon" href="{{ url_for(theme.favicon.safari_pinned_tab) }}" color="{{ theme.android_chrome_color }}">
{%- endif %}
{%- if theme.favicon.android_manifest %}
<link rel="manifest" href="{{ url_for(theme.favicon.android_manifest) }}">
Expand Down Expand Up @@ -51,11 +51,11 @@
<meta property="fb:app_id" content="{{ theme.facebook_sdk.app_id }}">
{%- endif %}

<link rel="stylesheet" href="{{ url_for(theme.css) }}/main.css?v={{ next_version }}">
<link rel="stylesheet" href="{{ url_for(theme.css) }}/main.css">

{{ next_font() }}

{%- set font_awesome_uri = theme.vendors.fontawesome or next_vendors('font-awesome/css/font-awesome.min.css?v=4.7.0') %}
{%- set font_awesome_uri = theme.vendors.fontawesome or next_vendors('font-awesome/css/font-awesome.min.css') %}
<link rel="stylesheet" href="{{ font_awesome_uri }}">

{%- if theme.fancybox %}
Expand All @@ -64,8 +64,8 @@
{%- endif %}

{%- if theme.pace.enable %}
{%- set pace_css_uri = theme.vendors.pace_css or next_vendors('pace/pace-theme-' + theme.pace.theme + '.min.css?v=1.0.2') %}
{%- set pace_js_uri = theme.vendors.pace or next_vendors('pace/pace.min.js?v=1.0.2') %}
{%- set pace_css_uri = theme.vendors.pace_css or next_vendors('pace/pace-theme-' + theme.pace.theme + '.min.css') %}
{%- set pace_js_uri = theme.vendors.pace or next_vendors('pace/pace.min.js') %}
<link rel="stylesheet" href="{{ pace_css_uri }}">
<script src="{{ pace_js_uri }}"></script>
{%- endif %}
Expand Down
8 changes: 4 additions & 4 deletions layout/_scripts/vendors.swig
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{%- set js_vendors = {} %}
{%- set js_vendors = js_vendors | attr('anime', 'anime.min.js?v=3.1.0') %}
{%- set js_vendors = js_vendors | attr('anime', 'anime.min.js') %}

{%- if theme.pjax %}
{%- set js_vendors = js_vendors | attr('pjax', 'pjax/pjax.min.js?v=0.2.8') %}
{%- set js_vendors = js_vendors | attr('pjax', 'pjax/pjax.min.js') %}
{%- endif %}

{%- if theme.fancybox %}
Expand All @@ -23,8 +23,8 @@
{%- endif %}

{%- if theme.motion.enable %}
{%- set js_vendors = js_vendors | attr('velocity', 'velocity/velocity.min.js?v=1.2.1') %}
{%- set js_vendors = js_vendors | attr('velocity_ui', 'velocity/velocity.ui.min.js?v=1.2.1') %}
{%- set js_vendors = js_vendors | attr('velocity', 'velocity/velocity.min.js') %}
{%- set js_vendors = js_vendors | attr('velocity_ui', 'velocity/velocity.ui.min.js') %}
{%- endif %}

{%- if theme.canvas_nest.enable %}
Expand Down
3 changes: 1 addition & 2 deletions scripts/helpers/engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ hexo.extend.helper.register('next_inject', function(point) {

hexo.extend.helper.register('next_js', function(...urls) {
const { js } = hexo.theme.config;
const { version } = require(path.normalize('../../package.json'));
return urls.map(url => this.js(`${js}/${url}?v=${version}`)).join('');
return urls.map(url => this.js(`${js}/${url}`)).join('');
});

hexo.extend.helper.register('next_vendors', function(url) {
Expand Down