Skip to content

Commit

Permalink
json -> dump
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenjoezhang committed Oct 15, 2019
1 parent 317e855 commit b3e40f7
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion layout/_partials/head/head-unique.swig
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<script id="page-configurations">
// https://hexo.io/docs/variables.html
CONFIG.page = {
sidebar: {{ page.sidebar | json }},
sidebar: {{ page.sidebar | dump }},
isHome: {{ is_home() }},
isPost: {{ is_post() }},
isPage: {{ is_page() }},
Expand Down
16 changes: 8 additions & 8 deletions layout/_partials/head/head.swig
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@
scheme: '{{ theme.scheme }}',
version: '{{ version }}',
exturl: {{ theme.exturl }},
sidebar: {{ theme.sidebar | json }},
copycode: {{ theme.codeblock.copy_button | json }},
back2top: {{ theme.back2top | json }},
bookmark: {{ theme.bookmark | json }},
sidebar: {{ theme.sidebar | dump }},
copycode: {{ theme.codeblock.copy_button | dump }},
back2top: {{ theme.back2top | dump }},
bookmark: {{ theme.bookmark | dump }},
fancybox: {{ theme.fancybox }},
mediumzoom: {{ theme.mediumzoom }},
lazyload: {{ theme.lazyload }},
Expand All @@ -90,12 +90,12 @@
appID: '{{ config.algolia.applicationID }}',
apiKey: '{{ config.algolia.apiKey }}',
indexName: '{{ config.algolia.indexName }}',
hits: {{ theme.algolia_search.hits | json }},
labels: {{ theme.algolia_search.labels | json }}
hits: {{ theme.algolia_search.hits | dump }},
labels: {{ theme.algolia_search.labels | dump }}
},
localsearch: {{ theme.local_search | json }},
localsearch: {{ theme.local_search | dump }},
path: '{{ config.search.path }}',
motion: {{ theme.motion | json }},
motion: {{ theme.motion | dump }},
translation: {
copy_button: '{{ __("post.copy_button") }}',
copy_success: '{{ __("post.copy_success") }}',
Expand Down
2 changes: 1 addition & 1 deletion layout/_scripts/pages/schedule.swig
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
}

// Read config form theme config file
Object.assign(calendar, {{ theme.calendar | json }});
Object.assign(calendar, {{ theme.calendar | dump }});

var now = new Date();
var timeMax = new Date();
Expand Down
4 changes: 2 additions & 2 deletions layout/_third-party/comments/disqus.swig
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
{%- if page.comments %}
<script>
function disqus_config() {
this.page.url = {{ page.permalink | json }};
this.page.identifier = {{ page.path | json }};
this.page.url = {{ page.permalink | dump }};
this.page.identifier = {{ page.path | dump }};
this.page.title = '{{ page.title | addslashes }}';
{%- if __('disqus') !== 'disqus' %}
this.language = '{{ __('disqus') }}';
Expand Down
4 changes: 2 additions & 2 deletions layout/_third-party/comments/disqusjs.swig
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
api: '{{ theme.disqusjs.api }}' || 'https://disqus.com/api/',
apikey: '{{ theme.disqusjs.apikey }}',
shortname: '{{ theme.disqusjs.shortname }}',
url: {{ page.permalink | json }},
identifier: {{ page.path | json }},
url: {{ page.permalink | dump }},
identifier: {{ page.path | dump }},
title: '{{ page.title | addslashes }}',
});
}, window.DisqusJS);
Expand Down
2 changes: 1 addition & 1 deletion layout/_third-party/comments/valine.swig
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ NexT.utils.getScript('{{ valine_uri }}', () => {
notify: {{ theme.valine.notify }},
appId: '{{ theme.valine.appid }}',
appKey: '{{ theme.valine.appkey }}',
placeholder: {{ theme.valine.placeholder | json }},
placeholder: {{ theme.valine.placeholder | dump }},
avatar: '{{ theme.valine.avatar }}',
meta: guest,
pageSize: '{{ theme.valine.pageSize }}' || 10,
Expand Down

0 comments on commit b3e40f7

Please sign in to comment.