Skip to content

Commit

Permalink
Move source/js/src to source/js (#751)
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenjoezhang committed Mar 31, 2019
1 parent f352f10 commit d06ecfe
Show file tree
Hide file tree
Showing 23 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion docs/ALGOLIA-SEARCH.md
Expand Up @@ -83,5 +83,5 @@ NexT provides Algolia search plugin for index your hexo website content. To use
1. The latest version of the [Hexo-Algolia](https://github.com/oncletom/hexo-algolia) plugin removes the content indexing feature, given Algolia's free account limitation.

1. The [Hexo-Algoliasearch](https://github.com/LouisBarranqueiro/hexo-algoliasearch) plugin provides content indexing functionality, but requires the replacement of keywords in the NEXT theme. The same problem exists with `Record Too Big` for Algolia's free account.
- Replace all `applicationID` in `source/js/src/algolia-search.js` with `appId`
- Replace all `applicationID` in `source/js/algolia-search.js` with `appId`
- Replace all `applicationID` in `layout/_partials/head/head.swig` with `appId`
2 changes: 1 addition & 1 deletion docs/zh-CN/ALGOLIA-SEARCH.md
Expand Up @@ -80,5 +80,5 @@ NexT 内部提供 Algolia 的搜索功能,要使用此功能请确保所使用

1. 考虑到 Algolia 免费账户的限制,目前 [Hexo-Algolia](https://github.com/oncletom/hexo-algolia) 插件最新版本去掉了正文索引功能。
1. [Hexo-Algoliasearch](https://github.com/LouisBarranqueiro/hexo-algoliasearch) 插件提供了正文索引功能,不过需要替换 NEXT 主题中的关键字。对于免费账户,`Record Too Big` 的问题同样存在。
- 替换 `source/js/src/algolia-search.js` 中所有的 `applicationID``appId`
- 替换 `source/js/algolia-search.js` 中所有的 `applicationID``appId`
- 替换 `layout/_partials/head/head.swig` 中所有的 `applicationID``appId`
12 changes: 6 additions & 6 deletions gulpfile.coffee
Expand Up @@ -8,12 +8,12 @@ yaml = require('js-yaml')

gulp.task 'lint', ->
return gulp.src([
'./source/js/src/utils.js',
'./source/js/src/motion.js',
'./source/js/src/algolia-search.js',
'./source/js/src/bootstrap.js',
'./source/js/src/post-details.js',
'./source/js/src/schemes/pisces.js'
'./source/js/utils.js',
'./source/js/motion.js',
'./source/js/algolia-search.js',
'./source/js/bootstrap.js',
'./source/js/post-details.js',
'./source/js/schemes/pisces.js'
]).pipe jshint()
.pipe jshint.reporter(stylish)

Expand Down
4 changes: 2 additions & 2 deletions layout/_scripts/commons.swig
@@ -1,7 +1,7 @@
{%
set js_commons = [
'src/utils.js',
'src/motion.js'
'utils.js',
'motion.js'
]
%}

Expand Down
2 changes: 1 addition & 1 deletion layout/_scripts/exturl.swig
@@ -1,3 +1,3 @@
{% if theme.exturl %}
<script src="{{ url_for(theme.js) }}/src/exturl.js?v={{ version }}"></script>
<script src="{{ url_for(theme.js) }}/exturl.js?v={{ version }}"></script>
{% endif %}
2 changes: 1 addition & 1 deletion layout/_scripts/next-boot.swig
@@ -1,6 +1,6 @@
{%
set boot_scripts = [
'src/next-boot.js'
'next-boot.js'
]
%}

Expand Down
4 changes: 2 additions & 2 deletions layout/_scripts/pages/post-details.swig
@@ -1,2 +1,2 @@
<script src="{{ url_for(theme.js) }}/src/scrollspy.js?v={{ version }}"></script>
<script src="{{ url_for(theme.js) }}/src/post-details.js?v={{ version }}"></script>
<script src="{{ url_for(theme.js) }}/scrollspy.js?v={{ version }}"></script>
<script src="{{ url_for(theme.js) }}/post-details.js?v={{ version }}"></script>
2 changes: 1 addition & 1 deletion layout/_scripts/schemes/muse.swig
@@ -1,6 +1,6 @@
{%
set scripts = [
'src/schemes/muse.js'
'schemes/muse.js'
]
%}

Expand Down
4 changes: 2 additions & 2 deletions layout/_scripts/schemes/pisces.swig
@@ -1,7 +1,7 @@
{%
set scripts = [
'src/affix.js',
'src/schemes/pisces.js'
'affix.js',
'schemes/pisces.js'
]
%}

Expand Down
4 changes: 2 additions & 2 deletions layout/_scripts/scroll-cookie.swig
@@ -1,4 +1,4 @@
{% if theme.save_scroll %}
<script src="{{ url_for(theme.js) }}/src/js.cookie.js?v={{ version }}"></script>
<script src="{{ url_for(theme.js) }}/src/scroll-cookie.js?v={{ version }}"></script>
<script src="{{ url_for(theme.js) }}/js.cookie.js?v={{ version }}"></script>
<script src="{{ url_for(theme.js) }}/scroll-cookie.js?v={{ version }}"></script>
{% endif %}
2 changes: 1 addition & 1 deletion layout/_third-party/search/algolia-search.swig
Expand Up @@ -14,5 +14,5 @@
<script src="{{ algolia_instant_js }}"></script>
{# E: Include Algolia instantsearch.js library #}

<script src="{{ url_for(theme.js) }}/src/algolia-search.js?v={{ version }}"></script>
<script src="{{ url_for(theme.js) }}/algolia-search.js?v={{ version }}"></script>
{% endif %}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit d06ecfe

Please sign in to comment.