├── .eslintignore ├── .eslintrc ├── .github ├── FUNDING.yml ├── ISSUE_TEMPLATE.md └── workflows │ └── main.yml ├── .gitignore ├── .npmignore ├── .travis.demo.yml ├── .vscode ├── launch.json └── settings.json ├── CHANGELOG.md ├── FAQ.md ├── LICENSE ├── README.md ├── _config.yml ├── languages ├── default.yml ├── en.yml └── zh-Hans.yml ├── layout ├── 404.pug ├── archive.pug ├── category.pug ├── gallery.pug ├── includes │ ├── 404 │ │ ├── 404-nav.pug │ │ └── layout.pug │ ├── additional-js.pug │ ├── comments │ │ ├── disqus.pug │ │ ├── gitalk.pug │ │ ├── gitment.pug │ │ ├── index.pug │ │ ├── laibili.pug │ │ ├── valine.pug │ │ ├── vssue.pug │ │ └── waline.pug │ ├── config.pug │ ├── count │ │ └── busuanzi.pug │ ├── footer.pug │ ├── gallery │ │ ├── layout.pug │ │ └── script.pug │ ├── head.pug │ ├── header.pug │ ├── layout.pug │ ├── mixins │ │ ├── article-sort.pug │ │ └── slide.pug │ ├── nav.pug │ ├── pagination.pug │ ├── recent-posts.pug │ ├── search │ │ ├── algolia.pug │ │ ├── index.pug │ │ └── local-search.pug │ ├── share │ │ ├── add-this.pug │ │ ├── index.pug │ │ └── share-js.pug │ ├── sidebar.pug │ ├── slide │ │ ├── layout.pug │ │ └── script.pug │ └── third-party │ │ ├── canvas-ribbon.pug │ │ ├── katex.pug │ │ └── mathjax.pug ├── index.pug ├── page.pug ├── post.pug ├── slides.pug └── tag.pug ├── package.json ├── scripts ├── gallery-tag.js ├── hexo-plugins.txt └── replace-config.js ├── source ├── css │ ├── 404.styl │ ├── _global │ │ └── index.styl │ ├── _highlight │ │ ├── diff.styl │ │ ├── highlight.styl │ │ └── theme.styl │ ├── _layout │ │ ├── comments.styl │ │ ├── footer.styl │ │ ├── head.styl │ │ ├── page.styl │ │ ├── pagination.styl │ │ ├── post.styl │ │ └── sidebar.styl │ ├── _search │ │ ├── algolia.styl │ │ ├── index.styl │ │ └── local-search.styl │ ├── _third-party │ │ ├── jquery.fancybox.min.css │ │ └── normalize.min.css │ ├── index.styl │ └── var.styl ├── img │ ├── algolia.svg │ └── avatar.png ├── js │ ├── copy.js │ ├── fancybox.js │ ├── fireworks.js │ ├── head.js │ ├── hexo-theme-melody.js │ ├── katex.js │ ├── scroll.js │ ├── search │ │ ├── algolia.js │ │ └── local-search.js │ ├── sidebar.js │ ├── third-party │ │ ├── anime.min.js │ │ ├── canvas-ribbon.js │ │ ├── jquery.fancybox.min.js │ │ ├── jquery.min.js │ │ ├── reveal │ │ │ └── head.min.js │ │ ├── velocity.min.js │ │ └── velocity.ui.min.js │ ├── transition.js │ └── utils.js └── melody-favicon.ico └── stylus_format.json /.eslintignore: -------------------------------------------------------------------------------- 1 | source/js/third-party/* 2 | source/js/utils.js 3 | scripts/* -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "standard", 3 | "env": { 4 | "jquery": true 5 | }, 6 | "globals": { 7 | "anime": false, 8 | "debounce": false, 9 | "throttle": false, 10 | "isMobile": false, 11 | "instantsearch": false, 12 | "GLOBAL_CONFIG": false 13 | } 14 | } -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | custom: ["https://paypal.me/Molunerfinn"] -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 9 | 10 | ## I want to create a new issue 11 | 12 | 13 | 14 | - [] Yes, I have read [FAQ](https://github.com/Molunerfinn/hexo-theme-melody/blob/dev/FAQ.md). 15 | - [] Yes, I have read [Hexo Docs page](https://hexo.io/docs/), especially [Templates](https://hexo.io/docs/templates.html), [Variables](https://hexo.io/docs/variables.html), [Helpers](https://hexo.io/docs/helpers.html) and [Troubleshooting](https://hexo.io/docs/troubleshooting.html). 16 | - [] Yes, I have read [Hexo-theme-melody Documentation](https://molunerfinn.com/hexo-theme-melody-doc/). 17 | - [] And yes, I already searched for current [issues](https://github.com/Molunerfinn/hexo-theme-melody/issues?utf8=%E2%9C%93&q=is%3Aissue) and this did not help me. 18 | 19 | ## Melody Information 20 | 21 | 22 | **Melody Version:** 23 | 24 | 25 | **Platform:** 26 | 27 | 28 | **Browser:** 29 | 30 | ## Expected behavior 31 | 32 | ## Actual behavior 33 | 34 | 35 | 36 | 37 | ## Steps to reproduce the behavior 38 | 39 | ## Feature Request 40 | 41 | 42 | 43 | 44 | --- 45 | 46 | 50 | -------------------------------------------------------------------------------- /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: publish 2 | on: 3 | push: 4 | branches: 5 | - master 6 | jobs: 7 | build: 8 | runs-on: ubuntu-latest 9 | steps: 10 | - uses: actions/checkout@v1 11 | - uses: actions/setup-node@v1 12 | with: 13 | node-version: '12.x' 14 | registry-url: 'https://registry.npmjs.org' 15 | - run: npm publish 16 | env: 17 | NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | yarn.lock 3 | .DS_Store 4 | _config.demo.yml 5 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | yarn-error.log 3 | package-lock.json 4 | .vscode/ 5 | .travis.yml 6 | .github/ 7 | yarn.lock 8 | .eslintignore 9 | .eslintrc 10 | stylus_format.json -------------------------------------------------------------------------------- /.travis.demo.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: stable 3 | 4 | # Travis-CI Caching 5 | cache: 6 | directories: 7 | - node_modules 8 | 9 | # S: Build Lifecycle 10 | install: 11 | - npm install 12 | 13 | before_script: 14 | # - npm install -g gulp 15 | 16 | 17 | script: 18 | - hexo clean && hexo g 19 | 20 | 21 | after_script: 22 | - cd ./public 23 | - git init 24 | - git config user.name "Your GitHub User Name" 25 | - git config user.email "Your GitHub Email" 26 | - git add . 27 | - git commit -m "Update docs" 28 | - git push --force --quiet "https://${GH_TOKEN}@${GH_REF}" master:master 29 | # E: Build LifeCycle 30 | 31 | branches: 32 | only: 33 | - master 34 | # - hexo 35 | env: 36 | global: 37 | - GH_REF: github.com/USERNAME/USERNAME.github.io.git 38 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible Node.js debug attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "type": "node", 9 | "request": "launch", 10 | "name": "Launch Program", 11 | "program": "${file}" 12 | } 13 | ] 14 | } -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "eslint.enable": true, 3 | // "editor.formatOnSave": true, 4 | "[markdown]": { 5 | "editor.formatOnSave": false 6 | }, 7 | "stylusSupremacy.insertSemicolons": false, 8 | "stylusSupremacy.insertBraces": false, 9 | "stylusSupremacy.insertNewLineBetweenSelectors": true, 10 | "stylusSupremacy.insertParenthesisAroundIfCondition": false, 11 | "stylusSupremacy.alwaysUseNoneOverZero": true, 12 | "stylusSupremacy.alwaysUseZeroWithoutUnit": true, 13 | "stylusSupremacy.sortProperties": "grouped", 14 | "eslint.autoFixOnSave": true, 15 | "stylusSupremacy.quoteChar": "\"", 16 | "editor.codeActionsOnSave": { 17 | "source.fixAll.eslint": true 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## :tada: 1.9.1 (2022-07-11) 2 | 3 | 4 | ### :sparkles: Features 5 | 6 | * add waline support ([#331](https://github.com/Molunerfinn/hexo-theme-melody/issues/331)) ([d51ac1e](https://github.com/Molunerfinn/hexo-theme-melody/commit/d51ac1e)) 7 | 8 | 9 | ### :bug: Bug Fixes 10 | 11 | * **style:** fix recent post item content overflow ([b3e7f34](https://github.com/Molunerfinn/hexo-theme-melody/commit/b3e7f34)) 12 | * fireworks effect for animejs 3 ([#321](https://github.com/Molunerfinn/hexo-theme-melody/issues/321)) ([49cd43e](https://github.com/Molunerfinn/hexo-theme-melody/commit/49cd43e)) 13 | * post page search ([#328](https://github.com/Molunerfinn/hexo-theme-melody/issues/328)) ([9c30e08](https://github.com/Molunerfinn/hexo-theme-melody/commit/9c30e08)) 14 | * support toc auto heightlight for hexo v6 ([#339](https://github.com/Molunerfinn/hexo-theme-melody/issues/339)) ([98455c6](https://github.com/Molunerfinn/hexo-theme-melody/commit/98455c6)) 15 | * tab error ([b7eca92](https://github.com/Molunerfinn/hexo-theme-melody/commit/b7eca92)) 16 | * **slide:** Remove unused dependencies ([#306](https://github.com/Molunerfinn/hexo-theme-melody/issues/306)) ([a3b33f1](https://github.com/Molunerfinn/hexo-theme-melody/commit/a3b33f1)) 17 | 18 | 19 | 20 | # :tada: 1.9.0 (2020-10-21) 21 | 22 | 23 | ### :sparkles: Features 24 | 25 | * add some options in slides configuration ([9a3bd2e](https://github.com/Molunerfinn/hexo-theme-melody/commit/9a3bd2e)) 26 | * **comment:** add vssue comment system ([#302](https://github.com/Molunerfinn/hexo-theme-melody/issues/302)) ([e49a2b2](https://github.com/Molunerfinn/hexo-theme-melody/commit/e49a2b2)) 27 | 28 | 29 | ### :bug: Bug Fixes 30 | 31 | * decodeURL -> decodeURI ([6929e58](https://github.com/Molunerfinn/hexo-theme-melody/commit/6929e58)) 32 | * image witdh can't fit the content ([cbb36bf](https://github.com/Molunerfinn/hexo-theme-melody/commit/cbb36bf)), closes [#285](https://github.com/Molunerfinn/hexo-theme-melody/issues/285) 33 | * unexpected navbar menu ([b9627a7](https://github.com/Molunerfinn/hexo-theme-melody/commit/b9627a7)), closes [#291](https://github.com/Molunerfinn/hexo-theme-melody/issues/291) 34 | * URL display problem in some environments ([#284](https://github.com/Molunerfinn/hexo-theme-melody/issues/284)) ([355b021](https://github.com/Molunerfinn/hexo-theme-melody/commit/355b021)) 35 | 36 | 37 | 38 | ## :tada: 1.8.2 (2020-08-09) 39 | 40 | 41 | ### :bug: Bug Fixes 42 | 43 | * decodeURL -> decodeURI ([6929e58](https://github.com/Molunerfinn/hexo-theme-melody/commit/6929e58)) 44 | 45 | 46 | 47 | ## :tada: 1.8.1 (2020-08-09) 48 | 49 | 50 | ### :bug: Bug Fixes 51 | 52 | * toc-item's href will be encoded in hexo v5 ([bed1f19](https://github.com/Molunerfinn/hexo-theme-melody/commit/bed1f19)), closes [#286](https://github.com/Molunerfinn/hexo-theme-melody/issues/286) 53 | 54 | 55 | 56 | # :tada: 1.8.0 (2020-08-09) 57 | 58 | 59 | ### :sparkles: Features 60 | 61 | * add hexo 5.0 support ([68e605c](https://github.com/Molunerfinn/hexo-theme-melody/commit/68e605c)) 62 | 63 | 64 | ### :bug: Bug Fixes 65 | 66 | * [#277](https://github.com/Molunerfinn/hexo-theme-melody/issues/277) and add new feature ([#278](https://github.com/Molunerfinn/hexo-theme-melody/issues/278)) ([b801ea6](https://github.com/Molunerfinn/hexo-theme-melody/commit/b801ea6)) 67 | * img style can effect custom image on footer ([#264](https://github.com/Molunerfinn/hexo-theme-melody/issues/264)) ([e7b2a04](https://github.com/Molunerfinn/hexo-theme-melody/commit/e7b2a04)) 68 | 69 | 70 | ### :pencil: Documentation 71 | 72 | * replace demo site ([b355099](https://github.com/Molunerfinn/hexo-theme-melody/commit/b355099)) 73 | * update demo sites ([1296062](https://github.com/Molunerfinn/hexo-theme-melody/commit/1296062)) 74 | 75 | 76 | ### :package: Chore 77 | 78 | * add funding url ([165f338](https://github.com/Molunerfinn/hexo-theme-melody/commit/165f338)) 79 | 80 | 81 | 82 | # :tada: 1.7.0 (2020-01-29) 83 | 84 | 85 | ### :sparkles: Features 86 | 87 | * **keywords:** add page keywords meta option ([21c34fd](https://github.com/Molunerfinn/hexo-theme-melody/commit/21c34fd)), closes [#213](https://github.com/Molunerfinn/hexo-theme-melody/issues/213) 88 | * add 404 page ([db718fd](https://github.com/Molunerfinn/hexo-theme-melody/commit/db718fd)), closes [#110](https://github.com/Molunerfinn/hexo-theme-melody/issues/110) 89 | * add canvas ribbon ([#190](https://github.com/Molunerfinn/hexo-theme-melody/issues/190)) ([7f281df](https://github.com/Molunerfinn/hexo-theme-melody/commit/7f281df)) 90 | * add hitokoto ([#252](https://github.com/Molunerfinn/hexo-theme-melody/issues/252)) ([f508191](https://github.com/Molunerfinn/hexo-theme-melody/commit/f508191)) 91 | * add sidebar_display option for controlling the sidebar display ([18f22c7](https://github.com/Molunerfinn/hexo-theme-melody/commit/18f22c7)), closes [#203](https://github.com/Molunerfinn/hexo-theme-melody/issues/203) 92 | * add top_img for page's post_meta option in other pages ([92623bf](https://github.com/Molunerfinn/hexo-theme-melody/commit/92623bf)), closes [#215](https://github.com/Molunerfinn/hexo-theme-melody/issues/215) 93 | * add top_img_height for control the height of top_img ([e8fbd91](https://github.com/Molunerfinn/hexo-theme-melody/commit/e8fbd91)) 94 | * custom header & footer text color ([#192](https://github.com/Molunerfinn/hexo-theme-melody/issues/192)) ([ecd9bac](https://github.com/Molunerfinn/hexo-theme-melody/commit/ecd9bac)) 95 | * post_meta.date_type add `both` option ([01dad37](https://github.com/Molunerfinn/hexo-theme-melody/commit/01dad37)) 96 | 97 | 98 | ### :bug: Bug Fixes 99 | 100 | * add no-fancybox className to avoid the effect with fancybox.js ([e620a07](https://github.com/Molunerfinn/hexo-theme-melody/commit/e620a07)), closes [#211](https://github.com/Molunerfinn/hexo-theme-melody/issues/211) 101 | * border width ([ace4852](https://github.com/Molunerfinn/hexo-theme-melody/commit/ace4852)), closes [#226](https://github.com/Molunerfinn/hexo-theme-melody/issues/226) 102 | * codeblock language style ([f286fc8](https://github.com/Molunerfinn/hexo-theme-melody/commit/f286fc8)), closes [#229](https://github.com/Molunerfinn/hexo-theme-melody/issues/229) 103 | * nav in 404 page -> 404-nav ([c326a6b](https://github.com/Molunerfinn/hexo-theme-melody/commit/c326a6b)) 104 | * paginator bug ([197c530](https://github.com/Molunerfinn/hexo-theme-melody/commit/197c530)), closes [#234](https://github.com/Molunerfinn/hexo-theme-melody/issues/234) 105 | * read percentage may < 0 in Safari ([0525ef7](https://github.com/Molunerfinn/hexo-theme-melody/commit/0525ef7)), closes [#258](https://github.com/Molunerfinn/hexo-theme-melody/issues/258) 106 | * serveral bugs ([30bfb34](https://github.com/Molunerfinn/hexo-theme-melody/commit/30bfb34)), closes [#188](https://github.com/Molunerfinn/hexo-theme-melody/issues/188) 107 | * slides hljs highlighting bug ([9d8ab38](https://github.com/Molunerfinn/hexo-theme-melody/commit/9d8ab38)), closes [#218](https://github.com/Molunerfinn/hexo-theme-melody/issues/218) 108 | * word error in _config.yml ([5889c35](https://github.com/Molunerfinn/hexo-theme-melody/commit/5889c35)) 109 | 110 | 111 | ### :pencil: Documentation 112 | 113 | * update demo sites ([105531b](https://github.com/Molunerfinn/hexo-theme-melody/commit/105531b)) 114 | * update demo-sites ([242d4b2](https://github.com/Molunerfinn/hexo-theme-melody/commit/242d4b2)) 115 | 116 | 117 | ### :package: Chore 118 | 119 | * add picgo bump-version ([e437892](https://github.com/Molunerfinn/hexo-theme-melody/commit/e437892)) 120 | * remove invalid links ([#227](https://github.com/Molunerfinn/hexo-theme-melody/issues/227)) ([ca32cc2](https://github.com/Molunerfinn/hexo-theme-melody/commit/ca32cc2)) 121 | * update demo sites ([b960e7e](https://github.com/Molunerfinn/hexo-theme-melody/commit/b960e7e)) 122 | * update demo sites ([#230](https://github.com/Molunerfinn/hexo-theme-melody/issues/230)) ([c347072](https://github.com/Molunerfinn/hexo-theme-melody/commit/c347072)) 123 | 124 | 125 | 126 | -------------------------------------------------------------------------------- /FAQ.md: -------------------------------------------------------------------------------- 1 | 本文收录大家在使用`hexo-theme-melody`中遇到的常见问题。其中很大一部分是没有阅读[文档](https://molunerfinn.com/hexo-theme-melody-doc/#/zh-Hans/)导致的。请养成先看文档再提问的习惯! 2 | 3 | ## 常见问题 4 | 5 | ### 1. `wordcount`相关。能看到的报错如:`wordcount is not a function`。 6 | 7 |  8 | 9 | ### 2. `keywords`相关。能看到的报错如:`(config.keywords || []).join is not a function` 10 | 11 | 参考[issue](https://github.com/Molunerfinn/hexo-theme-melody/issues/58)。 12 | 13 | 找到你hexo站点的`_config.yml`(不是主题的`_config.yml`!)然后修改你的`keywords`项,改成空或者数组形式: 14 | 15 | ```yaml 16 | keywords: 17 | - item1 18 | - item2 19 | ``` 20 | 21 | ### 3. `renderer`相关。能看到的报错如:`ERROR Process failed: layout/includes/slide/script.pug` 22 | 23 | 参考[issue](https://github.com/Molunerfinn/hexo-theme-melody/issues/67)。 24 | 25 |  26 | 27 | ### 4. `localSeach`相关。能看到的报错如:`Cannot read property 'path' of undefined` 28 | 29 | 参考[issue](https://github.com/Molunerfinn/hexo-theme-melody/issues/54)。 30 | 31 |  32 | 33 | ### 5. `renderer`相关。能看到的报错如:`Syntax Error: Unexpected charactor` 34 | 35 | 参考[issue](https://github.com/Molunerfinn/hexo-theme-melody/issues/5)。 36 | 37 | 注意你站点里的`package.json`里有没有同时存在`hexo-renderer-pug`和`hexo-renderer-jade`。请删掉`hexo-renderer-pug`。然后重新`npm install`。之后执行`hexo clean` 和 `hexo g` 即可。 38 | 39 | ------ 40 | 41 | If you have meet some problems using `hexo-theme-melody`, it's recommended to read [documentation](https://molunerfinn.com/hexo-theme-melody-doc/#/), most of your problems will be solved. 42 | 43 | ## FAQ 44 | 45 | ### 1. Problem with `wordcount`. Such as `wordcount is not a function`. 46 | 47 |  48 | 49 | ### 2. Problem with `keywords`. Such as `(config.keywords || []).join is not a function` 50 | 51 | Check this [issue](https://github.com/Molunerfinn/hexo-theme-melody/issues/58). 52 | 53 | Find your hexo site `_config.yml` (not the `_config.yml` in theme folder!), then modified your `keywords` option to an array or empty. 54 | 55 | ```yaml 56 | keywords: 57 | - item1 58 | - item2 59 | ``` 60 | 61 | ### 3. Problem with `renderer`. Such as `ERROR Process failed: layout/includes/slide/script.pug` 62 | 63 | Check this [issue](https://github.com/Molunerfinn/hexo-theme-melody/issues/67). 64 | 65 |  66 | 67 | ### 4. Problem with `localSeach`. Such as `Cannot read property 'path' of undefined` 68 | 69 | Check this [issue](https://github.com/Molunerfinn/hexo-theme-melody/issues/54). 70 | 71 |  72 | 73 | ### 5. Problem with `renderer`. Such as `Syntax Error: Unexpected charactor` 74 | 75 | Check this [issue](https://github.com/Molunerfinn/hexo-theme-melody/issues/5). 76 | 77 | Notice that if both `hexo-renderer-pug` & `hexo-renderer-jade` are existing in your hexo site's `package.json`. Please remove `hexo-renderer-pug` and then `npm install`, `hexo clean` and `hexo g`. 78 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The 996ICU License (996ICU) 2 | Version 0.1, March 2019 3 | 4 | PACKAGE is distributed under LICENSE with the following restriction: 5 | 6 | The above license is only granted to entities that act in concordance 7 | with local labor laws. In addition, the following requirements must be 8 | observed: 9 | 10 | * The licencee must not, explicitly or implicitly, request or schedule 11 | their employees to work more than 45 hours in any single week. 12 | * The licencee must not, explicitly or implicitly, request or schedule 13 | their employees to be at work consecutively for 10 hours. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # hexo-theme-melody 2 | 3 |
4 |
5 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |