├── .eslintignore ├── .eslintrc.json ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report_en.md │ ├── bug_report_zh.md │ ├── feature_request_en.md │ └── feature_request_zh.md ├── release-drafter.yml └── workflows │ ├── npm-publish.yml │ ├── release-drafter.yml │ └── semantic-pr.yml ├── .gitignore ├── .vscode ├── extensions.json └── settings.json ├── LICENSE ├── README.md ├── package-lock.json ├── package.json ├── packages ├── demo │ ├── .github │ │ └── dependabot.yml │ ├── .gitignore │ ├── _config.nexmoe.yml │ ├── _config.yml │ ├── netlify.toml │ ├── package-lock.json │ ├── package.json │ ├── scaffolds │ │ ├── draft.md │ │ ├── page.md │ │ └── post.md │ └── source │ │ ├── PY.md │ │ ├── _posts │ │ ├── 20231007-VS Code 插件 Monitor Pro - 监控一切你在意的资源信息.md │ │ ├── 20240305-新标签页助你重新掌控你的收藏夹.md │ │ ├── categories.md │ │ ├── code-highlight.md │ │ ├── elements.md │ │ ├── excerpts.md │ │ ├── gallery-post.md │ │ ├── hello-world.md │ │ ├── images.md │ │ ├── link-post-without-title.md │ │ ├── link-post.md │ │ ├── long-title.md │ │ ├── markdown.md │ │ ├── no-title.md │ │ ├── post-example.md │ │ ├── tag-plugins.md │ │ ├── tags.md │ │ ├── 中文測試.md │ │ └── 日本語テスト.md │ │ ├── archive.md │ │ ├── assets │ │ ├── wallpaper-2311325.jpg │ │ ├── wallpaper-2572384.jpg │ │ └── wallpaper-878514.jpg │ │ └── page │ │ └── index.md ├── docs │ ├── .editorconfig │ ├── .gitignore │ ├── .prettierrc │ ├── .vitepress │ │ ├── config.mts │ │ ├── config │ │ │ ├── en.ts │ │ │ └── zh.ts │ │ └── theme │ │ │ ├── index.ts │ │ │ └── style.css │ ├── LICENSE │ ├── README.md │ ├── env.d.ts │ ├── netlify.toml │ ├── package.json │ ├── pnpm-lock.yaml │ ├── src │ │ ├── index.md │ │ ├── public │ │ │ ├── android-chrome-192x192.png │ │ │ ├── android-chrome-512x512.png │ │ │ ├── apple-touch-icon.png │ │ │ ├── browserconfig.xml │ │ │ ├── favicon-16x16.png │ │ │ ├── favicon-32x32.png │ │ │ ├── favicon.ico │ │ │ ├── gtag.js │ │ │ ├── mstile-150x150.png │ │ │ └── site.webmanifest │ │ ├── section.vue │ │ ├── v3.2 │ │ │ ├── article │ │ │ │ ├── archive.md │ │ │ │ ├── archive │ │ │ │ │ └── image-20210721123359847.png │ │ │ │ ├── cover.md │ │ │ │ ├── front-matter.md │ │ │ │ ├── gallery.md │ │ │ │ ├── gallery │ │ │ │ │ ├── QQ图片20210215103021.png │ │ │ │ │ └── image-20210721124020479.png │ │ │ │ ├── py.md │ │ │ │ └── py │ │ │ │ │ └── image-20210721123326858.png │ │ │ ├── config │ │ │ │ ├── analysis.md │ │ │ │ ├── comment.md │ │ │ │ ├── icon.md │ │ │ │ ├── icon │ │ │ │ │ └── 2020-04-25_12-19-02.png │ │ │ │ ├── search.md │ │ │ │ ├── search │ │ │ │ │ └── a7d385bac726fa4ffcdc3c744e86ad1d127eedaf.jpeg │ │ │ │ └── style-color.md │ │ │ ├── contribution.md │ │ │ ├── faq.md │ │ │ ├── faq │ │ │ │ └── image-20210721115403445.png │ │ │ ├── hexo │ │ │ │ ├── RSS.md │ │ │ │ └── aplayer.md │ │ │ ├── index.md │ │ │ ├── migration.md │ │ │ ├── question.md │ │ │ ├── specification.md │ │ │ ├── start.md │ │ │ └── welcome │ │ │ │ └── ee0093ead3ca8145522ba766c3f9a0ee.png │ │ ├── v4.0 │ │ │ ├── config │ │ │ │ ├── icon.md │ │ │ │ ├── icon │ │ │ │ │ └── 2020-04-25_12-19-02.png │ │ │ │ ├── search.md │ │ │ │ ├── search │ │ │ │ │ └── a7d385bac726fa4ffcdc3c744e86ad1d127eedaf.jpeg │ │ │ │ ├── slot.md │ │ │ │ ├── style.md │ │ │ │ └── yml.md │ │ │ ├── contribution.md │ │ │ ├── faq.md │ │ │ ├── index.md │ │ │ ├── post │ │ │ │ ├── archive.md │ │ │ │ ├── archive │ │ │ │ │ └── image-20210721123359847.png │ │ │ │ ├── cover.md │ │ │ │ ├── front-matter.md │ │ │ │ ├── gallery.md │ │ │ │ ├── gallery_pro.md │ │ │ │ └── links.md │ │ │ └── question.md │ │ ├── v4.2 │ │ │ ├── config │ │ │ │ ├── icon.md │ │ │ │ ├── icon │ │ │ │ │ └── 2020-04-25_12-19-02.png │ │ │ │ ├── search.md │ │ │ │ ├── search │ │ │ │ │ └── a7d385bac726fa4ffcdc3c744e86ad1d127eedaf.jpeg │ │ │ │ ├── slot.md │ │ │ │ ├── style.md │ │ │ │ └── yml.md │ │ │ ├── contribution.md │ │ │ ├── faq.md │ │ │ ├── index.md │ │ │ ├── post │ │ │ │ ├── archive.md │ │ │ │ ├── archive │ │ │ │ │ └── image-20210721123359847.png │ │ │ │ ├── cover.md │ │ │ │ ├── front-matter.md │ │ │ │ ├── gallery.md │ │ │ │ ├── gallery_pro.md │ │ │ │ └── links.md │ │ │ └── question.md │ │ └── vite.config.ts │ └── tsconfig.json └── theme │ ├── include │ ├── README.md │ ├── config.js │ ├── dependency.js │ ├── register.js │ └── util │ │ └── console.js │ ├── index.js │ ├── languages │ ├── default.yml │ ├── en.yml │ ├── it.yml │ ├── ja.yml │ ├── zh-CN.yml │ ├── zh-HK.yml │ ├── zh-TW.yml │ └── zh.yml │ ├── layout │ ├── _index │ │ └── list.ejs │ ├── _layout │ │ ├── nexmoe │ │ │ ├── body.jsx │ │ │ ├── content.jsx │ │ │ ├── footer.jsx │ │ │ └── header.ejs │ │ └── xiaoshu │ │ │ ├── body.jsx │ │ │ ├── content.jsx │ │ │ ├── footer.jsx │ │ │ └── header.jsx │ ├── _partial │ │ ├── _post │ │ │ ├── copyright.ejs │ │ │ ├── meta.ejs │ │ │ ├── tag.ejs │ │ │ └── word-count.ejs │ │ ├── background.jsx │ │ ├── head.ejs │ │ ├── paginator.jsx │ │ ├── right.ejs │ │ └── searchbox.jsx │ ├── _widget │ │ ├── archive.ejs │ │ ├── category.ejs │ │ ├── hitokoto.ejs │ │ ├── link.ejs │ │ ├── recent_posts.ejs │ │ ├── search.ejs │ │ ├── social.ejs │ │ ├── tag.ejs │ │ └── tagcloud.ejs │ ├── archives.ejs │ ├── index.jsx │ ├── layout.jsx │ ├── post.ejs │ └── py.jsx │ ├── package.json │ ├── scripts │ ├── helper │ │ ├── css_auto_version.js │ │ ├── image_filter.js │ │ └── js_auto_version.js │ ├── index.js │ └── tag │ │ ├── gallery.js │ │ └── links.js │ └── source │ ├── _config.yml │ ├── css │ ├── _index │ │ └── list.styl │ ├── _layout │ │ ├── nexmoe │ │ │ ├── content.styl │ │ │ └── header.styl │ │ └── xiaoshu │ │ │ ├── content.styl │ │ │ ├── footer.styl │ │ │ └── header.styl │ ├── _partial │ │ ├── archives.styl │ │ ├── article.styl │ │ ├── background.styl │ │ ├── copy-codeblock.styl │ │ ├── pagination.styl │ │ ├── py.styl │ │ └── searchbox.styl │ ├── _widget │ │ ├── hitokoto.styl │ │ └── index.styl │ └── style.styl │ ├── js │ ├── app.js │ ├── copy-codeblock.js │ └── search.js │ ├── lib │ ├── fancybox │ │ ├── fancybox.css │ │ └── fancybox.umd.js │ ├── iconfont │ │ ├── demo.css │ │ ├── demo_index.html │ │ ├── iconfont.css │ │ ├── iconfont.eot │ │ ├── iconfont.js │ │ ├── iconfont.json │ │ ├── iconfont.svg │ │ ├── iconfont.ttf │ │ ├── iconfont.woff │ │ └── iconfont.woff2 │ ├── lax.min.js │ └── mdui_043tiny │ │ ├── mdui.css │ │ └── mdui.js │ └── preset │ └── plain.styl ├── pnpm-lock.yaml ├── pnpm-workspace.yaml └── renovate.json /.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | source -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "hexo", 4 | "plugin:react/recommended", 5 | "plugin:json/recommended" 6 | ], 7 | "settings": { 8 | "node": { 9 | "tryExtensions": [ 10 | ".js", 11 | ".jsx", 12 | ".json" 13 | ] 14 | }, 15 | "react": { 16 | "version": "16.0" 17 | } 18 | }, 19 | "parserOptions": { 20 | "ecmaFeatures": { 21 | "jsx": true 22 | }, 23 | "sourceType": "module", 24 | "ecmaVersion": "latest" 25 | }, 26 | "plugins": [ 27 | "react" 28 | ], 29 | "rules": { 30 | "react/jsx-uses-vars": "error", 31 | "indent": [ 32 | "error", 33 | 4, 34 | { 35 | "SwitchCase": 1 36 | } 37 | ], 38 | "react/no-unknown-property": [ 39 | "error", 40 | { 41 | "ignore": [ 42 | "class", 43 | "onclick", 44 | "onload", 45 | "onsubmit", 46 | "crossorigin" 47 | ] 48 | } 49 | ], 50 | "react/react-in-jsx-scope": [ 51 | "off" 52 | ], 53 | "react/prop-types": [ 54 | "off" 55 | ], 56 | "react/display-name": [ 57 | "off" 58 | ], 59 | "react/jsx-key": [ 60 | "off" 61 | ], 62 | "react/jsx-no-target-blank": [ 63 | "error", 64 | { 65 | "allowReferrer": true 66 | } 67 | ] 68 | } 69 | } -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report_en.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: 🐛 Bug Report 3 | about: Submit discovered bugs 4 | --- 5 | 6 | 10 | 11 | ### BUG occurrence address 12 | 13 | ### What is expected? 14 | 15 | ### What is actually happening? 16 | 17 | ### Additional info (logs errors etc) 18 | 19 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report_zh.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: 🐛 Bug 报告 3 | about: 早起的虫子被你抓 4 | --- 5 | 6 | 10 | 11 | ### BUG 发生地址 12 | 13 | ### 预期是什么? 14 | 15 | ### 实际发生了什么? 16 | 17 | ### 额外信息(日志、报错等) 18 | 19 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request_en.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: 🍰 Feature Request 3 | about: Submit a new feature request 4 | --- 5 | 6 | 10 | 11 | ### What feature is it? 12 | 13 | ### What can this function do? 14 | 15 | ### Additional description -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request_zh.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: 🍰 功能需求 3 | about: 提交新的功能需求 4 | --- 5 | 6 | 10 | 11 | ### 这是一个什么样的功能? 12 | 13 | ### 这个功能可以干什么? 14 | 15 | ### 额外描述 -------------------------------------------------------------------------------- /.github/release-drafter.yml: -------------------------------------------------------------------------------- 1 | name-template: 'v$RESOLVED_VERSION 🌈' 2 | tag-template: 'v$RESOLVED_VERSION' 3 | categories: 4 | - title: '🚀 Features' 5 | labels: 6 | - 'feature' 7 | - 'enhancement' 8 | - title: '🐛 Bug Fixes' 9 | labels: 10 | - 'fix' 11 | - 'bugfix' 12 | - 'bug' 13 | - title: '🧰 Maintenance' 14 | label: 'chore' 15 | change-template: '- $TITLE @$AUTHOR (#$NUMBER)' 16 | change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks. 17 | version-resolver: 18 | major: 19 | labels: 20 | - 'major' 21 | minor: 22 | labels: 23 | - 'minor' 24 | patch: 25 | labels: 26 | - 'patch' 27 | default: patch 28 | template: | 29 | ## Changes 30 | 31 | $CHANGES 32 | -------------------------------------------------------------------------------- /.github/workflows/npm-publish.yml: -------------------------------------------------------------------------------- 1 | # This workflow will run tests using node and then publish a package to GitHub Packages when a release is created 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages 3 | 4 | name: Node.js Package 5 | 6 | on: 7 | workflow_dispatch: 8 | release: 9 | types: [published] 10 | 11 | jobs: 12 | publish-npm: 13 | runs-on: ubuntu-latest 14 | steps: 15 | - uses: actions/checkout@v4 16 | - uses: actions/setup-node@v4 17 | with: 18 | node-version: 16 19 | registry-url: https://registry.npmjs.org/ 20 | - run: npm publish 21 | env: 22 | NODE_AUTH_TOKEN: ${{secrets.npm_token}} 23 | -------------------------------------------------------------------------------- /.github/workflows/release-drafter.yml: -------------------------------------------------------------------------------- 1 | name: Release Drafter 2 | 3 | on: 4 | push: 5 | # branches to consider in the event; optional, defaults to all 6 | branches: 7 | - master 8 | # pull_request event is required only for autolabeler 9 | pull_request: 10 | # Only following types are handled by the action, but one can default to all as well 11 | types: [opened, reopened, synchronize] 12 | # pull_request_target event is required for autolabeler to support PRs from forks 13 | # pull_request_target: 14 | # types: [opened, reopened, synchronize] 15 | 16 | jobs: 17 | update_release_draft: 18 | runs-on: ubuntu-latest 19 | steps: 20 | # (Optional) GitHub Enterprise requires GHE_HOST variable set 21 | #- name: Set GHE_HOST 22 | # run: | 23 | # echo "GHE_HOST=${GITHUB_SERVER_URL##https:\/\/}" >> $GITHUB_ENV 24 | 25 | # Drafts your next Release notes as Pull Requests are merged into "master" 26 | - uses: release-drafter/release-drafter@v6 27 | # (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml 28 | # with: 29 | # config-name: my-config.yml 30 | # disable-autolabeler: true 31 | env: 32 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 33 | -------------------------------------------------------------------------------- /.github/workflows/semantic-pr.yml: -------------------------------------------------------------------------------- 1 | name: "Lint PR" 2 | 3 | on: 4 | pull_request_target: 5 | types: 6 | - opened 7 | - edited 8 | - synchronize 9 | 10 | permissions: 11 | pull-requests: read 12 | 13 | jobs: 14 | main: 15 | name: Validate PR title 16 | runs-on: ubuntu-latest 17 | steps: 18 | - uses: amannn/action-semantic-pull-request@v5 19 | env: 20 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | 3 | *.log 4 | 5 | node_modules 6 | 7 | .idea 8 | 9 | .directory 10 | 11 | WIKI/.vuepress/dist 12 | 13 | .eslintcache 14 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "dbaeumer.vscode-eslint", 4 | "davidanson.vscode-markdownlint" 5 | ] 6 | } -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "i18n-ally.localesPaths": [ 3 | "packages/theme/languages" 4 | ] 5 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | | ![Homepage](https://user-images.githubusercontent.com/16796652/134768469-52d2426b-5c7c-4a46-8f0e-064361044d88.png) | ![Archive](https://user-images.githubusercontent.com/16796652/134768465-a578b70e-38f2-4266-97e7-f0b85bd86348.png) | 2 | | ------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------- | 3 | | Homepage | Archive | 4 | | ![Links](https://user-images.githubusercontent.com/16796652/134768466-cf580997-1201-48a8-812e-77eb0af6ce59.png) | ![Gallery](https://user-images.githubusercontent.com/16796652/134768468-86751060-b3bf-43f4-970e-4baa8906e29a.png) | 5 | | Links | Gallery | 6 | ## 🎓 Docs 7 | 8 | 9 | 10 | ## 💻 Preview 11 | 12 | 欢迎将你的网站提交到这里来 [直接编辑](https://github.com/theme-nexmoe/hexo-theme-nexmoe/edit/master/README.md) 13 | 14 | | 站点 | 状态 | 站点 | 状态 | 15 | | --------------------------------------------------------- | --------------------------------------------------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------------------------------------------- | 16 | | [折影轻梦](https://nexmoe.com/) | ![折影轻梦](https://img.shields.io/website?url=https://nexmoe.com/) | [fly6022's Blog](https://blog.fly6022.fun) | ![fly6022's Blog](https://img.shields.io/website?url=https://blog.fly6022.fun) | 17 | | [官方示例](https://nexmoe-demo.netlify.app/) | ![官方示例](https://img.shields.io/website?url=https://nexmoe-demo.netlify.app/) | [LittleDeng](https://littlede.ng/) | ![LittleDeng](https://img.shields.io/website?url=https://littlede.ng/) | 18 | | [糖羽仙](https://www.tangyuxian.com/) | ![萌糖官方网站](https://img.shields.io/website?url=https://www.tangyuxian.com/) | [繁华是客 Blog](https://nexmoe-demo.withkr.xyz) | ![繁华是客 Blog](https://img.shields.io/website?url=https://nexmoe-demo.withkr.xyz) | 19 | | [深海小涛](https://hexo.xtaolink.cn/) | ![深海小涛](https://img.shields.io/website?url=https://hexo.xtaolink.cn/) | [DreamCcc](https://note.bequick.run) | ![DreamCcc](https://img.shields.io/website?url=https://note.bequick.run) | 20 | | [西瓜星 🍉✨](https://suikastar.com/) | ![西瓜星 🍉✨](https://img.shields.io/website?url=https://suikastar.com/) | [衬线柔骨](http://sxrekord.com) | ![衬线柔骨](https://img.shields.io/website?url=http://sxrekord.com) | 21 | | [Fentaniao](https://fentaniao.github.io) | ![Fentaniao](https://img.shields.io/website?url=https://fentaniao.github.io) | [矿快报](https://latestminer.github.io) | ![矿快报](https://img.shields.io/website?url=https://latestminer.github.io) | 22 | | [星月的海](https://hosizuki.github.io/) | ![星月的海](https://img.shields.io/website?url=https://hosizuki.github.io/) | [咔斯の小窝](https://kassama.top) | ![咔斯の小窝](https://img.shields.io/website?url=https://kassama.top) | 23 | | [ZL Asica的博客](https://www.zl-asica.com/) | ![ZL Asica的博客](https://img.shields.io/website?url=https://www.zl-asica.com/) | 24 | 25 | ## 💻 Contributors 26 | 27 | ![Contributors](https://opencollective.com/hexo-theme-nexmoe/contributors.svg?width=890&button=false) 28 | 29 | ## 🎇 Awesome 30 | 31 | - Typecho: 32 | - Hexo-Saigyou_Ayakashi: 33 | - Solo-InkDP: 34 | - Hexo-Dark: 35 | - Typora: 36 | 37 | ## 💴 Sponsor 38 | 39 | ![微信赞赏码](https://i.dawnlab.me/e528323511d872bc759128fc9a8c665f.md.png) 40 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nexmoe", 3 | "scripts": { 4 | "dev": "pnpm run --filter=demo dev", 5 | "dev:docs": "pnpm run --filter=docs dev", 6 | "build:demo": "pnpm run --filter=demo build" 7 | }, 8 | "engines": { 9 | "node": ">=18", 10 | "pnpm": ">=8" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/demo/.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: npm 4 | directory: "/" 5 | schedule: 6 | interval: daily 7 | open-pull-requests-limit: 20 8 | -------------------------------------------------------------------------------- /packages/demo/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | Thumbs.db 3 | db.json 4 | *.log 5 | node_modules/ 6 | public/ 7 | .deploy*/ 8 | _multiconfig.yml -------------------------------------------------------------------------------- /packages/demo/_config.nexmoe.yml: -------------------------------------------------------------------------------- 1 | avatar: https://cdn.jsdelivr.net/gh/nexmoe/nexmoe.github.io@latest/images/avatar.png # 网站 Logo 2 | background: # 既是博客的背景,又是文章默认头图 3 | path: https://i.dawnlab.me/b5a7e61560facdd5b8aa9683fce147d7.png 4 | width: 1280 5 | height: 726 6 | favicon: 7 | href: /favicon.ico # 网站图标 8 | type: image/x-icon # 图标类型,可能的值有(image/png, image/vnd.microsoft.icon, image/x-icon, image/gif) 9 | 10 | function: # 功能开关,可选值(true,false) 11 | globalToc: true # 开启该功能会自动开启文章 TOC(文章目录) 功能 12 | wordCount: false # 是否开启文章字数统计 (true, false) 13 | copyCode: true # 是否允许复制代码块 14 | 15 | imageCDN: # 图片 CDN 功能 16 | enable: false # 开启该功能 17 | origin: /../../images/ # 图片原始目录 18 | to: https://cdn.jsdelivr.net/gh/nexmoe/nexmoe.github.io@latest/images/ # 图片 CDN 域名 19 | 20 | # 自定义样式,启用后可在站点的source文件夹下新建custom.css自定义站点样式 21 | customStyles: 22 | - custom.css 23 | 24 | # 附加图标库 使用说明:https://docs.nexmoe.com/config/icon 25 | iconlib: # //at.alicdn.com/t/font_1038733_0xvrvpg9c0r.css 26 | 27 | menu: 28 | 回到首页: 29 | - / 30 | - icon-home 31 | 文章归档: 32 | - /archive.html 33 | - icon-container 34 | 我的朋友: 35 | - /PY.html 36 | 37 | widgets: 38 | - name: search 39 | enable: true 40 | options: 41 | search: 42 | type: engine # 可选engine(用搜索引擎搜索)、swiftype、或local(本地搜索) 43 | url: https://cn.bing.com/search?q=site:nexmoe.com # 搜索引擎地址,在type为swiftype时无效 e.g:https://www.google.com/search?q={你的博客链接} 44 | id: # swiftype的id,见启用教程。在type为engine时无效 45 | - name: social 46 | enable: true 47 | options: 48 | social: 49 | QQ群: 50 | - https://jq.qq.com/?_wv=1027&k=5CfKHun 51 | - icon-QQ 52 | - rgb(249, 174, 8) 53 | - rgba(249, 174, 8, .1) 54 | 哔哩哔哩: 55 | - https://space.bilibili.com/20238211 56 | - icon-bilibili 57 | - rgb(231, 106, 141) 58 | - rgba(231, 106, 141, .1) 59 | GitHub: 60 | - https://github.com/nexmoe/ 61 | - icon-github 62 | - rgb(25, 23, 23) 63 | - rgba(25, 23, 23, .1) 64 | 知乎: 65 | - https://www.zhihu.com/people/nexmoe 66 | - icon-zhihu 67 | - rgb(30, 136, 229) 68 | - rgba(30, 136, 229, .1) 69 | Twitter: 70 | - https://twitter.com/nexmoe 71 | - icon-twitter 72 | - rgb(59, 151, 239) 73 | - rgba(59, 151, 239, .1) 74 | RSS: 75 | - https://nexmoe.com/atom.xml 76 | - icon-rss 77 | - rgb(247, 132, 34) 78 | - rgba(247, 132, 34, .1) 79 | - name: category 80 | enable: true 81 | - name: tagcloud 82 | enable: true 83 | options: 84 | maxTagcloud: 17 # 标签云组件显示的标签数量,0 表示不限制 85 | - name: hitokoto # 一言 widget 86 | enable: false 87 | options: 88 | widgetHitokoto: # 一言组件 89 | loading_placeholder: '🚀 获取中...' # 正在一言时的占位符 90 | loading_error_placeholder: '🐞 获取失败...' # 加载一言失败时的占位符 91 | category: # 一言句子类型(可选),不配置的话随机获取,详见 https://developer.hitokoto.cn/sentence/#%E5%8F%A5%E5%AD%90%E7%B1%BB%E5%9E%8B-%E5%8F%82%E6%95%B0 92 | - name: archive #settings: widgetAchive 93 | enable: true 94 | options: 95 | widgetAchive: #文章归档组件 96 | archive_type: 'year' #按月展示还是按年展示 97 | show_count: true #是否展示数量 98 | - name: recent_posts 99 | enable: true 100 | - name: link #settings: widgetLink 101 | enable: true 102 | options: 103 | widgetLink: #链接组件 104 | - title: 小舒同学 105 | img: https://xsm.nexmoe.com/images/Infinite/Snipaste_2022-05-18_20-46-50.png 106 | link : https://xiaoshu.app/ 107 | - title: 折影轻梦 108 | img: https://cdn.jsdelivr.net/gh/nexmoe/nexmoe.github.io@latest/images/avatar.png 109 | link : https://nexmoe.com/ 110 | 111 | copyTip: "著作权归作者所有。\n商业转载请联系作者获得授权,非商业转载请注明出处。\n来源:%url" # 自定义复制版权文案,使用 %url 代替当前页面URL, 修改为false禁用 112 | 113 | slotHead: | 114 | 115 | 116 | 123 | 124 | slotFooter: | 125 | 126 | 127 | # 自定义侧边栏尾部内容 128 | slotSidebar: | 129 |
鄂ICP备2020018486号 130 |
131 | 132 | 133 | # 评论框插槽 134 | slotComment: | 135 | 请在你的配置文件中设置 slotComment 136 | 137 | slotCopyright: | 138 | 版权声明:本文采用 CC BY-NC-SA 3.0 CN 协议进行许可 139 | 140 | slotArticleEnd: | 141 |

-------------------------------------------------------------------------------- /packages/demo/_config.yml: -------------------------------------------------------------------------------- 1 | title: Hexo 2 | subtitle: '' 3 | description: '' 4 | keywords: null 5 | author: John Doe 6 | language: en 7 | timezone: '' 8 | url: http://example.com 9 | permalink: ':year/:month/:day/:title/' 10 | permalink_defaults: null 11 | pretty_urls: 12 | trailing_index: true 13 | trailing_html: true 14 | source_dir: source 15 | public_dir: public 16 | tag_dir: tags 17 | archive_dir: archives 18 | category_dir: categories 19 | code_dir: downloads/code 20 | i18n_dir: ':lang' 21 | skip_render: null 22 | new_post_name: ':title.md' 23 | default_layout: post 24 | titlecase: false 25 | external_link: 26 | enable: true 27 | field: site 28 | exclude: '' 29 | filename_case: 0 30 | render_drafts: false 31 | post_asset_folder: false 32 | relative_link: false 33 | future: true 34 | highlight: 35 | enable: true 36 | line_number: true 37 | auto_detect: false 38 | tab_replace: '' 39 | wrap: true 40 | hljs: false 41 | prismjs: 42 | enable: false 43 | preprocess: true 44 | line_number: true 45 | tab_replace: '' 46 | index_generator: 47 | path: '' 48 | per_page: 10 49 | order_by: '-date' 50 | default_category: uncategorized 51 | category_map: null 52 | tag_map: null 53 | meta_generator: true 54 | date_format: YYYY-MM-DD 55 | time_format: HH:mm:ss 56 | updated_option: mtime 57 | per_page: 10 58 | pagination_dir: page 59 | include: null 60 | exclude: null 61 | ignore: null 62 | theme: nexmoe 63 | deploy: 64 | type: '' 65 | -------------------------------------------------------------------------------- /packages/demo/netlify.toml: -------------------------------------------------------------------------------- 1 | [build.environment] 2 | NODE_VERSION = "18" 3 | NPM_FLAGS = "--version" # prevent Netlify npm install 4 | 5 | [build] 6 | publish = "packages/demo/public" 7 | command = "npx pnpm i && pnpm build:demo" 8 | ignore = "git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF packages/demo" 9 | -------------------------------------------------------------------------------- /packages/demo/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "demo", 3 | "scripts": { 4 | "build": "hexo generate", 5 | "clean": "hexo clean", 6 | "deploy": "hexo deploy", 7 | "server": "hexo server", 8 | "dev": "hexo clean && hexo server" 9 | }, 10 | "hexo": { 11 | "version": "6.3.0" 12 | }, 13 | "dependencies": { 14 | "hexo": "^7.0.0", 15 | "hexo-generator-archive": "^2.0.0", 16 | "hexo-generator-category": "^2.0.0", 17 | "hexo-generator-index": "^3.0.0", 18 | "hexo-generator-tag": "^2.0.0", 19 | "hexo-renderer-ejs": "^2.0.0", 20 | "hexo-renderer-marked": "^6.0.0", 21 | "hexo-renderer-stylus": "^3.0.0", 22 | "hexo-server": "^3.0.0", 23 | "hexo-theme-nexmoe": "workspace:^" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /packages/demo/scaffolds/draft.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: {{ title }} 3 | tags: 4 | --- 5 | -------------------------------------------------------------------------------- /packages/demo/scaffolds/page.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: {{ title }} 3 | date: {{ date }} 4 | --- 5 | -------------------------------------------------------------------------------- /packages/demo/scaffolds/post.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: {{ title }} 3 | date: {{ date }} 4 | tags: 5 | --- 6 | -------------------------------------------------------------------------------- /packages/demo/source/_posts/20231007-VS Code 插件 Monitor Pro - 监控一切你在意的资源信息.md: -------------------------------------------------------------------------------- 1 | Monitor Pro 是一个全面的资源监控工具,旨在帮助你实时跟踪重要的系统指标并提供直观的展现方式。无论你是什么职业,如果你用 VS Code,请不要错过它。 2 | 3 | ## 安装使用 4 | 5 | 安装后会自动启用该插件。 6 | 7 | 8 | 9 | ## 屏幕截图 10 | 11 | ![](https://i.dawnlab.me/f4994d4cc1b09a7c8429191762d6c085.png) 12 | 13 | ![](https://i.dawnlab.me/6a860a03d54f14ccb9c5b918118abb44.png) 14 | 15 | ![](https://i.dawnlab.me/4739faf7471aa42625e76fad8efe4419.png) 16 | 17 | ## 功能特点 18 | 19 | - [ ] **资源监控** 20 | - [x] **CPU 使用率**:监控 CPU 利用率的百分比,以了解系统正在利用多少处理能力。 21 | - [x] **CPU 频率**:跟踪当前 CPU 频率,以了解系统如何动态调整其处理能力。 22 | - [x] **CPU 温度**:(如果可以的话)监控温度。 23 | - [x] **内存使用**:关注计算机的内存消耗情况。 24 | - [x] **网络使用**:跟踪机器上的网络活动,包括传入和传出的数据传输速率。 25 | - [x] **文件系统使用**(Linux、macOS):提供磁盘的读写速率。 26 | - [x] **电池百分比和充电状态**:如果你使用的是笔记本电脑或便携设备,此功能可让你监控电池电量和充电状态。 27 | - [x] **操作系统发行版名称** 28 | - [ ] **磁盘使用** 29 | - [x] **排序**:自定义监控资源的显示顺序,方便一目了然地监控它们。 30 | - [x] **刷新间隔**:设置更新资源指标的刷新间隔。 31 | - [x] **无布局移位**:确保状态栏中元素的位置和大小不会意外改变。 32 | - [x] **远程 SSH 资源监控**:你可以在远程 SSH 连接的设备上跟踪重要 33 | 的系统指标。 34 | - [ ] **高占用率警报**:当任何监控的资源达到高占用水平时,接收警报。 35 | - [ ] **仪表板**:我希望在一个页面上显示你关心的所有信息,并配备丰富的图表。 36 | 37 | ## 愿景 38 | 39 | 我深知监控信息的重要性,所以我的目标是打造一个最全面、最直观的监控工具,让你轻松掌握系统状态。开发 Monitor Pro 的初衷是为了满足大家对系统监控的各种需求。 40 | 41 | 同时在未来我也希望集成图表的设计,让这些数据更加直观易懂。你可以通过这些图表清楚地看到系统各项指标的变化趋势和相互关系。这样,你就能轻松地了解系统的性能表现。并能够基于这些指标做出明智的决策。 42 | 43 | ## 为什么要开发这款插件? 44 | 45 | 为了在使用 VS Code 的 Remote SSH 时提供一种全面的资源监控工具,以便更好地管理和监控服务器的状态。 46 | 47 | 详细参考: 48 | 49 | ## 建议反馈 50 | 51 | 我非常重视用户的反馈和意见,因为它们对于我改进和完善产品至关重要。有好的建议或者遇到了 BUG,请前来反馈: 52 | 53 | 54 | 55 | ## 支持我 56 | 57 | 来 [Github](https://github.com/nexmoe/vscode-monitor-pro) 点个 star 或是来 [VS Code 市场](https://marketplace.visualstudio.com/items?itemName=nexmoe.monitor-pro&ssr=false#review-details) 给个五星好评吧! 58 | -------------------------------------------------------------------------------- /packages/demo/source/_posts/20240305-新标签页助你重新掌控你的收藏夹.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 新标签页助你重新掌控你的收藏夹 3 | --- 4 | 5 | 在数字时代,我们的浏览器收藏夹,就如同一个宝库,里面藏着我们曾经因兴趣、工作或学习而保留的无数网站链接。小舒同学,一个浏览器新标签页扩展,帮助您高效地管理这些珍贵的在线资源。通过整洁、直观的界面和强大的功能,通过小舒同学这款强大的浏览器扩展,让您的收藏夹焕发新生。 6 | 7 | ## 一键展示管理收藏夹 8 | 9 | 不需要反复整理和搜索您的主页,小舒同学提供了一种轻松的方法来展示和管理您的收藏夹。通过在新标签页中,将书签以清晰的图形方式呈现,帮助您聚焦真正重要的事情。无论是微软的 Edge、Google 的 Chrome,还是 Mozilla 的 Firefox,都可以实现一步直观整洁地展示管理您的网络财富。 10 | 11 | ![一键展示管理收藏夹](https://i.dawnlab.me/628f695f10a222367075b6cb97a8870f.png/nexmoe) 12 | 13 | ## 随时随地的同步空间 14 | 15 | 小舒同学的同步空间可以让您轻松同步收藏夹,通过同步空间功能,不管您是在工作场合的电脑还是在家里的设备,都可以轻松连接,访问您全部的收藏内容。您的内容将被安全地存储与同步,确保您可以在任何时间访问。网络世界的一切都将由您连接统一,不仅能启动哔哩哔哩,更能直接访问您关注的具体内容。 16 | 17 | ![同步空间](https://i.dawnlab.me/cc15688dc52a551044b83a8a50117ccf.png/nexmoe) 18 | 19 | ![网页端](https://i.dawnlab.me/df8a4bea0d13e188a740293d12d39730.png/nexmoe) 20 | 21 | ## 直观且舒适的重组织 22 | 23 | 小舒同学以流畅和直观的用户体验,帮您重新组织您的在线生活。我们专注于舒适的交互设计,将您的收藏夹以一种对您有意义的方式进行组织。 24 | 25 | 小舒同学提供各式各样的卡片形式和布局,让您可以完全按照自己的喜好进行自定义。您可以创建个性化的卡片组合,以满足您的独特需求。 26 | 27 | ![重组织](https://i.dawnlab.me/222bc26cce538c35426bae5c05b4dc77.png/nexmoe) 28 | 29 | ## 严格隐私保护 30 | 31 | 小舒同学重视用户的隐私保护,拒绝记录和上传用户数据。在不使用同步空间的情况下,您的收藏夹数据也只在浏览器本地数据中,确保隐私数据的私密性。依托于 Manifest V3,小舒同学严格控制所需权限,保证只加载本地代码,保护用户的安全与私密。 32 | 33 | ## 定制个性化新标签页 34 | 35 | 小舒同学的自由度极高,可以按照用户的喜好进行多种个性化设置。您可以更换壁纸、主题、主题色,甚至可以用自定义 CSS 美化您的标签页。拥有如此高度自定义的新标签页,您的浏览器将成为真正属于您的个性空间。 36 | 37 | ![主题 Fluid](https://i.dawnlab.me/4921cd51ceca11e84df56a9a1bdc6f62.png/nexmoe) 38 | 39 | ![主题 Meteor](https://i.dawnlab.me/2437f0bbdf2758b379a247f5e9b4d247.png/nexmoe) 40 | 41 | ![主题 Hyper](https://i.dawnlab.me/846cf64aaf0ceee2688b4fc342c52681.png/nexmoe) 42 | 43 | 小舒同学不仅仅是一个简单的收藏夹工具,它改变了我们与网络信息的互动方式,提供了一个更高效、更有组织性的网络生活体验。减少了无谓的折腾,让每一次收藏都变得值得,让每一次浏览都充满发现的喜悦。现在,尝试小舒同学,让您的收藏夹变成您的独特网络资产,发挥它们真正的潜力吧。 44 | -------------------------------------------------------------------------------- /packages/demo/source/_posts/categories.md: -------------------------------------------------------------------------------- 1 | title: Categories 2 | date: 2013-12-24 23:30:09 3 | categories: 4 | - Foo 5 | - Bar 6 | - Baz 7 | --- 8 | 9 | This post contains 3 categories. Make sure your theme can display all of the categories. -------------------------------------------------------------------------------- /packages/demo/source/_posts/elements.md: -------------------------------------------------------------------------------- 1 | title: Elements 2 | date: 2013-12-24 23:29:08 3 | tags: 4 | --- 5 | 6 | The purpose of this post is to help you make sure all of HTML elements can display properly. If you use CSS reset, don't forget to redefine the style by yourself. 7 | 8 | --- 9 | 10 | # Heading 1 11 | 12 | ## Heading 2 13 | 14 | ### Heading 3 15 | 16 | #### Heading 4 17 | 18 | ##### Heading 5 19 | 20 | ###### Heading 6 21 | 22 | --- 23 | 24 | ## Paragraph 25 | 26 | Lorem ipsum dolor sit amet, [test link]() consectetur adipiscing elit. **Strong text** pellentesque ligula commodo viverra vehicula. *Italic text* at ullamcorper enim. Morbi a euismod nibh. Underline text non elit nisl. ~~Deleted text~~ tristique, sem id condimentum tempus, metus lectus venenatis mauris, sit amet semper lorem felis a eros. Fusce egestas nibh at sagittis auctor. Sed ultricies ac arcu quis molestie. Donec dapibus nunc in nibh egestas, vitae volutpat sem iaculis. Curabitur sem tellus, elementum nec quam id, fermentum laoreet mi. Ut mollis ullamcorper turpis, vitae facilisis velit ultricies sit amet. Etiam laoreet dui odio, id tempus justo tincidunt id. Phasellus scelerisque nunc sed nunc ultricies accumsan. 27 | 28 | Interdum et malesuada fames ac ante ipsum primis in faucibus. `Sed erat diam`, blandit eget felis aliquam, rhoncus varius urna. Donec tellus sapien, sodales eget ante vitae, feugiat ullamcorper urna. Praesent auctor dui vitae dapibus eleifend. Proin viverra mollis neque, ut ullamcorper elit posuere eget. 29 | 30 | > Praesent diam elit, interdum ut pulvinar placerat, imperdiet at magna. 31 | 32 | Maecenas ornare arcu at mi suscipit, non molestie tortor ultrices. Aenean convallis, diam et congue ultricies, erat magna tincidunt orci, pulvinar posuere mi sapien ac magna. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Praesent vitae placerat mauris. Nullam laoreet ante posuere tortor blandit auctor. Sed id ligula volutpat leo consequat placerat. Mauris fermentum dolor sed augue malesuada sollicitudin. Vivamus ultrices nunc felis, quis viverra orci eleifend ut. Donec et quam id urna cursus posuere. Donec elementum scelerisque laoreet. 33 | 34 | ## List Types 35 | 36 | ### Definition List (dl) 37 | 38 |
Definition List Title
This is a definition list division.
39 | 40 | ### Ordered List (ol) 41 | 42 | 1. List Item 1 43 | 2. List Item 2 44 | 3. List Item 3 45 | 46 | ### Unordered List (ul) 47 | 48 | - List Item 1 49 | - List Item 2 50 | - List Item 3 51 | 52 | ### Checkbox List (ul) 53 | 54 | - [ ] List Item 1 unchecked 55 | - [x] List Item 2 checked 56 | - [X] List Item 3 checked 57 | 58 | ## Table 59 | 60 | | Table Header 1 | Table Header 2 | Table Header 3 | 61 | | - | - | - | 62 | | Division 1 | Division 2 | Division 3 | 63 | | Division 1 | Division 2 | Division 3 | 64 | | Division 1 | Division 2 | Division 3 | 65 | 66 | ## Misc Stuff - abbr, acronym, sub, sup, kbd, etc. 67 | 68 | Lorem superscript dolor subscript amet, consectetuer adipiscing elit. Nullam dignissim convallis est. Quisque aliquam. cite. Nunc iaculis suscipit dui. Nam sit amet sem. Aliquam libero nisi, imperdiet at, tincidunt nec, gravida vehicula, nisl. Praesent mattis, massa quis luctus fermentum, turpis mi volutpat justo, eu volutpat enim diam eget metus. Maecenas ornare tortor. Donec sed tellus eget sapien fringilla nonummy. NBA Mauris a ante. Suspendisse quam sem, consequat at, commodo vitae, feugiat in, nunc. Morbi imperdiet augue quis tellus. AVE. Use Crtl + C to stop. 69 | -------------------------------------------------------------------------------- /packages/demo/source/_posts/excerpts.md: -------------------------------------------------------------------------------- 1 | title: Excerpts 2 | date: 2013-12-25 00:23:23 3 | tags: 4 | --- 5 | 6 | The following contents should be invisible in home/archive page. 7 | 8 | 9 | 10 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce eget urna vitae velit eleifend interdum at ac nisi. In nec ligula lacus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Sed eu cursus erat, ut dapibus quam. Aliquam eleifend dolor vitae libero pharetra adipiscing. Etiam adipiscing dolor a quam tempor, eu convallis nulla varius. Aliquam sollicitudin risus a porta aliquam. Ut nec velit dolor. Proin eget leo lobortis, aliquam est sed, mollis mauris. Fusce vitae leo pretium massa accumsan condimentum. Fusce malesuada gravida lectus vel vulputate. Donec bibendum porta nibh ut aliquam. 11 | 12 | Sed lorem felis, congue non fringilla eu, aliquam eu eros. Curabitur orci libero, mollis sed semper vitae, adipiscing in lectus. Aenean non egestas odio. Donec sollicitudin nisi quis lorem gravida, in pharetra mauris fringilla. Duis sit amet faucibus dolor, id aliquam neque. In egestas, odio gravida tempor dictum, mauris felis faucibus purus, sit amet commodo lacus diam vitae est. Ut ut quam eget massa semper sodales. Aenean non ipsum cursus, blandit lectus in, ornare odio. Curabitur ultrices porttitor vulputate. -------------------------------------------------------------------------------- /packages/demo/source/_posts/gallery-post.md: -------------------------------------------------------------------------------- 1 | title: Gallery Post 2 | date: 2013-12-25 00:16:18 3 | photos: 4 | - /assets/wallpaper-2572384.jpg 5 | - /assets/wallpaper-2311325.jpg 6 | - /assets/wallpaper-878514.jpg 7 | - http://placehold.it/350x150.jpg 8 | --- 9 | 10 | This post contains 4 photos: 11 | 12 | - Widescreen wallpaper 13 | - Portrait photo 14 | - Dual widescreen wallpaper 15 | - Small photo 16 | 17 | All photos should be displayed properly. 18 | 19 | *From [Wallbase.cc](http://wallbase.cc)* -------------------------------------------------------------------------------- /packages/demo/source/_posts/hello-world.md: -------------------------------------------------------------------------------- 1 | title: Hello World 2 | date: 2013-12-24 17:49:32 3 | tags: 4 | --- 5 | 6 | Welcome to [Hexo](http://zespia.tw/hexo)! This is your very first post. Check [documentation](http://zespia.tw/hexo/docs) to learn how to use. -------------------------------------------------------------------------------- /packages/demo/source/_posts/images.md: -------------------------------------------------------------------------------- 1 | title: Images 2 | date: 2013-12-26 22:46:49 3 | --- 4 | 5 | This is a image test post. 6 | 7 | ![](/assets/wallpaper-2572384.jpg) 8 | 9 | ![Caption](/assets/wallpaper-2311325.jpg) 10 | 11 | ![](/assets/wallpaper-878514.jpg) 12 | 13 | ![Small Picture](https://placehold.it/350x150.jpg) 14 | -------------------------------------------------------------------------------- /packages/demo/source/_posts/link-post-without-title.md: -------------------------------------------------------------------------------- 1 | date: 2013-12-24 23:44:13 2 | link: http://www.google.com/ 3 | --- 4 | 5 | This is a link post without a title. The title should be the link with or without protocol. Clicking on the link should open [Google](http://www.google.com/) in a new tab or window. -------------------------------------------------------------------------------- /packages/demo/source/_posts/link-post.md: -------------------------------------------------------------------------------- 1 | title: Link Post 2 | date: 2013-12-24 23:30:04 3 | link: http://www.google.com/ 4 | --- 5 | 6 | This is a link post. Clicking on the link should open [Google](http://www.google.com/) in a new tab or window. -------------------------------------------------------------------------------- /packages/demo/source/_posts/long-title.md: -------------------------------------------------------------------------------- 1 | title: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam justo turpis, tincidunt ac convallis id. 2 | date: 2013-12-24 23:31:06 3 | tags: 4 | --- 5 | 6 | This post has a long title. Make sure the title displayed right. -------------------------------------------------------------------------------- /packages/demo/source/_posts/no-title.md: -------------------------------------------------------------------------------- 1 | date: 2013-12-25 22:57:49 2 | tags: 3 | --- 4 | 5 | This post doesn't have a title. Make sure it's accessible. -------------------------------------------------------------------------------- /packages/demo/source/_posts/post-example.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 文章演示页面 3 | date: 2021-07-25 4 | cover: https://cdn.jsdelivr.net/gh/nexmoe/nexmoe.github.io@latest/images/cover/compress/5c3aec85a4343.jpg 5 | coverWidth: 920 6 | coverHeight: 613、 7 | tags: 8 | - 演示标签 9 | categories: 10 | - 演示分类 11 | --- 12 | 13 | 显示在首页的内容 14 | 15 | [![Powered By Vercel](https://www.datocms-assets.com/31049/1618983297-powered-by-vercel.svg "Powered By Vercel")](https://vercel.com/?utm_source=theme-nexmoe&utm_campaign=oss "Powered By Vercel") 16 | 17 | 18 | 19 | # 一级标题 20 | ## 二级标题 21 | ### 三级标题 22 | #### 四级标题 23 | 24 | 25 | ## 瀑布流图片 26 | 27 | {% gallery %} 28 | ![1](https://cdn.jsdelivr.net/gh/nexmoe/image@latest/20210207192754.jpg) 29 | ![1](https://cdn.jsdelivr.net/gh/nexmoe/image@latest/20210207192756.jpg) 30 | ![1](https://cdn.jsdelivr.net/gh/nexmoe/image@latest/20210207192757.jpg) 31 | ![1](https://cdn.jsdelivr.net/gh/nexmoe/image@latest/20210207192530.jpg) 32 | ![1](https://cdn.jsdelivr.net/gh/nexmoe/image@latest/20210207192531.jpg) 33 | ![1](https://cdn.jsdelivr.net/gh/nexmoe/image@latest/20210207192534.jpg) 34 | ![1](https://cdn.jsdelivr.net/gh/nexmoe/image@latest/20210207192535.jpg) 35 | ![1](https://cdn.jsdelivr.net/gh/nexmoe/image@latest/20210207192415.jpg) 36 | {% endgallery %} 37 | 38 | ## 相片集 39 | ![珠江](https://i.loli.net/2018/09/01/5b8a59551a4d8.jpg)|![珠江](https://i.loli.net/2018/09/01/5b8a6ab761262.jpg)|![某收门票公园](https://i.loli.net/2018/09/01/5b8a5994b6e28.jpg) 40 | - | - | - 41 | ![某收门票公园](https://i.loli.net/2018/09/01/5b8a5994b6e28.jpg)|![某收门票公园](https://i.loli.net/2018/09/01/5b8a5c8c34439.jpg)|![珠海](https://i.loli.net/2018/09/01/5b8a59d5c50f3.jpg) 42 | 43 | ## 字符效果和横线等 44 | 45 | ---- 46 | 47 | ~~删除线~~ 48 | *斜体字* _斜体字_ 49 | **粗体** __粗体__ 50 | ***粗斜体*** ___粗斜体___ 51 | 52 | 上标:X2,下标:O2 53 | 54 | **缩写(同HTML的abbr标签)** 55 | 56 | > 即更长的单词或短语的缩写形式,前提是开启识别HTML标签时,已默认开启 57 | 58 | The HTML specification is maintained by the W3C. 59 | 60 | ## 引用 Blockquotes 61 | 62 | > 引用文本 Blockquotes 63 | 64 | ## 锚点与链接 Links 65 | 66 | [普通链接](http://localhost/) 67 | 68 | [普通链接带描述](http://localhost/ "描述") 69 | 70 | 直接链接:https://github.com 71 | 72 | ## 多语言代码高亮 Codes 73 | 74 | #### 行内代码 Inline code 75 | 76 | 执行命令:`npm install marked` 77 | 78 | #### JS代码  79 | 80 | ```javascript 81 | function test(){ 82 | console.log("Hello world!"); 83 | } 84 | 85 | (function(){ 86 | var box = function(){ 87 | return box.fn.init(); 88 | }; 89 | 90 | box.prototype = box.fn = { 91 | init : function(){ 92 | console.log('box.init()'); 93 | 94 | return this; 95 | }, 96 | 97 | add : function(str){ 98 | alert("add", str); 99 | 100 | return this; 101 | }, 102 | 103 | remove : function(str){ 104 | alert("remove", str); 105 | 106 | return this; 107 | } 108 | }; 109 | 110 | box.fn.init.prototype = box.fn; 111 | 112 | window.box =box; 113 | })(); 114 | 115 | var testBox = box(); 116 | testBox.add("jQuery").remove("jQuery"); 117 | ``` 118 | 119 | #### HTML代码 HTML codes 120 | 121 | ```html 122 | 123 | 124 | 125 | 126 | Hello world! 127 | 128 | 129 |

Hello world!

130 | 131 | 132 | ``` 133 | 134 | ## 图片 Images 135 | 136 | 137 | ![赞助我](https://i.dawnlab.me/ee0093ead3ca8145522ba766c3f9a0ee.png) 138 | 139 | 140 | 图片加链接 (Image + Link): 141 | 142 | [![](https://i.dawnlab.me/ee0093ead3ca8145522ba766c3f9a0ee.png)](https://nexmoe.com/donate.html "赞助我") 143 | 144 | ---- 145 | 146 | ### 列表 Lists 147 | 148 | #### 无序列表 149 | 150 | - 列表一 151 | - 列表二 152 | - 列表二-1 153 | - 列表二-2 154 | - 列表二-3 155 | - 列表三 156 | - 列表一 157 | - 列表二 158 | - 列表三 159 | 160 | #### 有序列表 161 | 162 | 1. 第一行 163 | 2. 第二行 164 | 3. 第三行 165 | 166 | #### GFM task list 167 | 168 | - [x] GFM task list 1 169 | - [x] GFM task list 2 170 | - [ ] GFM task list 3 171 | - [ ] GFM task list 3-1 172 | - [ ] GFM task list 3-2 173 | - [ ] GFM task list 3-3 174 | - [ ] GFM task list 4 175 | - [ ] GFM task list 4-1 176 | - [ ] GFM task list 4-2 177 | 178 | ---- 179 | 180 | ### 绘制表格 Tables 181 | 182 | | 项目 | 价格 | 数量 | 183 | | -------- | -----: | :----: | 184 | | 计算机 | $1600 | 5 | 185 | | 手机 | $12 | 12 | 186 | | 管线 | $1 | 234 | 187 | 188 |
-------------------------------------------------------------------------------- /packages/demo/source/_posts/tag-plugins.md: -------------------------------------------------------------------------------- 1 | title: Tag Plugins 2 | date: 2013-12-25 00:14:39 3 | tags: 4 | --- 5 | 6 | This post is used for testing tag plugins. See [docs](http://zespia.tw/hexo/docs/tag-plugins.html) for more info. 7 | 8 | ## Block Quote 9 | 10 | ### Normal blockquote 11 | 12 | > Praesent diam elit, interdum ut pulvinar placerat, imperdiet at magna. 13 | 14 | ### Quote from a book 15 | 16 | {% blockquote David Levithan, Wide Awake %} 17 | Do not just seek happiness for yourself. Seek happiness for all. Through kindness. Through mercy. 18 | {% endblockquote %} 19 | 20 | ### Quote from Twitter 21 | 22 | {% blockquote @DevDocs https://twitter.com/devdocs/status/356095192085962752 %} 23 | NEW: DevDocs now comes with syntax highlighting. http://devdocs.io 24 | {% endblockquote %} 25 | 26 | ### Quote from an article on the web 27 | 28 | {% blockquote Seth Godin http://sethgodin.typepad.com/seths_blog/2009/07/welcome-to-island-marketing.html Welcome to Island Marketing %} 29 | Every interaction is both precious and an opportunity to delight. 30 | {% endblockquote %} 31 | 32 | ## Code Block 33 | 34 | ### Normal code block 35 | 36 | ``` 37 | alert('Hello World!'); 38 | ``` 39 | 40 | ### With caption 41 | 42 | {% codeblock Array.map %} 43 | array.map(callback[, thisArg]) 44 | {% endcodeblock %} 45 | 46 | ### With caption and URL 47 | 48 | {% codeblock .compact http://underscorejs.org/#compact Underscore.js %} 49 | .compact([0, 1, false, 2, ‘’, 3]); 50 | => [1, 2, 3] 51 | {% endcodeblock %} 52 | 53 | ### With marked lines 54 | 55 | Line 1,7-8,10 should be marked with different color. 56 | 57 | {% codeblock lang:js mark:1,7-8,10 %} 58 | const http = require('http'); 59 | 60 | const hostname = '127.0.0.1'; 61 | const port = 1337; 62 | 63 | http.createServer((req, res) => { 64 | res.writeHead(200, { 'Content-Type': 'text/plain' }); 65 | res.end('Hello World\n'); 66 | }).listen(port, hostname, () => { 67 | console.log(`Server running at http://${hostname}:${port}/`); 68 | }); 69 | {% endcodeblock %} 70 | 71 | Note: Theme's style should support `.highlight.line.marked` (recommend to use the selection or current line color). 72 | 73 | ## Pullquote 74 | 75 | ### Left 76 | 77 | {% pullquote left %} 78 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. 79 | {% endpullquote %} 80 | 81 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas tempus molestie arcu, et fringilla mauris placerat ac. Nullam luctus bibendum risus. Ut cursus sed ipsum feugiat egestas. Suspendisse elementum, velit eu consequat consequat, augue lorem dapibus libero, eget pulvinar dolor est sit amet nulla. Suspendisse a porta tortor, et posuere mi. Pellentesque ultricies, mi quis volutpat malesuada, erat felis vulputate nisl, ac congue ante tortor ut ante. Proin aliquam sem vel mauris tincidunt, eget scelerisque tortor euismod. Nulla tincidunt enim nec commodo dictum. Mauris id sapien et orci gravida luctus id ut dui. In vel vulputate odio. Duis vel turpis molestie, scelerisque enim eu, lobortis eros. Cras at ipsum gravida, sagittis ante vel, viverra tellus. Nunc mauris turpis, elementum ullamcorper nisl pretium, ultrices cursus justo. Mauris porttitor commodo eros, ac ornare orci interdum in. Cras fermentum cursus leo sed mattis. In dignissim lorem sem, sit amet elementum mauris venenatis ac. 82 | 83 | ### Right 84 | 85 | {% pullquote right %} 86 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. 87 | {% endpullquote %} 88 | 89 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed ligula justo, lobortis sit amet semper vel, dignissim sit amet libero. Praesent ac tempus ligula. Maecenas at gravida odio. Etiam tristique volutpat lacus eu faucibus. Donec non tempus arcu. Phasellus adipiscing, mauris nec mollis egestas, ipsum nunc auctor velit, et rhoncus lorem ipsum at ante. Praesent et sem in velit volutpat auctor. Duis vel mauris nulla. Maecenas mattis interdum ante, quis sagittis nibh cursus et. Nulla facilisi. Morbi convallis gravida tortor, ut fermentum enim gravida et. Nunc vel dictum nisl, non ultrices libero. Proin vestibulum felis eget orci consectetur lobortis. Vestibulum augue nulla, iaculis vitae augue vehicula, dignissim ultrices libero. Sed imperdiet urna et quam ultrices tincidunt nec ac magna. Etiam vel pharetra elit. 90 | -------------------------------------------------------------------------------- /packages/demo/source/_posts/tags.md: -------------------------------------------------------------------------------- 1 | title: Tags 2 | date: 2013-12-24 23:29:53 3 | tags: 4 | - Foo 5 | - Bar 6 | - Baz 7 | --- 8 | 9 | This post contains 3 tags. Make sure your theme can display all of the tags. -------------------------------------------------------------------------------- /packages/demo/source/_posts/中文測試.md: -------------------------------------------------------------------------------- 1 | title: 中文測試 2 | date: 2013-12-24 23:31:30 3 | tags: 4 | --- 5 | 6 | This is a Chinese test post. 7 | 8 | 善我王上魚、產生資西員合兒臉趣論。畫衣生這著爸毛親可時,安程幾?合學作。觀經而作建。都非子作這!法如言子你關!手師也。 9 | 10 | 以也座論頭室業放。要車時地變此親不老高小是統習直麼調未,行年香一? 11 | 12 | 就竟在,是我童示讓利分和異種百路關母信過明驗有個歷洋中前合著區亮風值新底車有正結,進快保的行戰從:弟除文辦條國備當來際年每小腳識世可的的外的廣下歌洲保輪市果底天影;全氣具些回童但倒影發狀在示,數上學大法很,如要我……月品大供這起服滿老?應學傳者國:山式排只不之然清同關;細車是!停屋常間又,資畫領生,相們制在?公別的人寫教資夠。資再我我!只臉夫藝量不路政吃息緊回力之;兒足灣電空時局我怎初安。意今一子區首者微陸現際安除發連由子由而走學體區園我車當會,經時取頭,嚴了新科同?很夫營動通打,出和導一樂,查旅他。坐是收外子發物北看蘭戰坐車身做可來。道就學務。 13 | 14 | 國新故。 15 | 16 | > 工步他始能詩的,裝進分星海演意學值例道……於財型目古香亮自和這乎?化經溫詩。只賽嚴大一主價世哥受的沒有中年即病行金拉麼河。主小路了種就小為廣不? 17 | 18 | *From [亂數假文產生器 - Chinese Lorem Ipsum](http://www.richyli.com/tool/loremipsum/)* -------------------------------------------------------------------------------- /packages/demo/source/_posts/日本語テスト.md: -------------------------------------------------------------------------------- 1 | title: 日本語テスト 2 | date: 2013-12-24 23:33:26 3 | tags: 4 | --- 5 | 6 | This is a Japanese test post. 7 | 8 | 私は昨日ついにその助力家というのの上よりするたなけれ。 9 | 10 | 最も今をお話団はちょうどこの前後なかろでくらいに困りがいるたをは帰着考えたなかって、そうにもするでうたらない。 11 | 12 | がたを知っないはずも同時に九月をいよいよたありた。 13 | 14 | もっと槙さんにぼんやり金少し説明にえた自分大した人私か影響にというお関係たうませないが、この次第も私か兄具合に使うて、槙さんののに当人のあなたにさぞご意味と行くて私個人が小尊敬を聴いように同時に同反抗に集っだうて、いよいよまず相当へあっうからいだ事をしでなけれ。 15 | 16 | > それでそれでもご時日をしはずはたったいやと突き抜けるますて、その元がは行ったてという獄を尽すていけですた。 17 | 18 | この中道具の日その学校はあなたごろがすまなりかとネルソンさんの考えるですん、辺の事実ないというご盲従ありたですと、爺さんのためが薬缶が結果までの箸の当時してならて、多少の十月にためからそういう上からとにかくしましないと触れべきものたで、ないうですと多少お人達したのでたた。 19 | 20 | *From [すぐ使えるダミーテキスト - 日本語 Lorem ipsum](http://lipsum.sugutsukaeru.jp/index.cgi)* -------------------------------------------------------------------------------- /packages/demo/source/archive.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 文章归档 3 | layout: archives 4 | --- -------------------------------------------------------------------------------- /packages/demo/source/assets/wallpaper-2311325.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theme-nexmoe/hexo-theme-nexmoe/1e415b5216df229d908cbc1e9cf5f7291e2d4cbb/packages/demo/source/assets/wallpaper-2311325.jpg -------------------------------------------------------------------------------- /packages/demo/source/assets/wallpaper-2572384.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theme-nexmoe/hexo-theme-nexmoe/1e415b5216df229d908cbc1e9cf5f7291e2d4cbb/packages/demo/source/assets/wallpaper-2572384.jpg -------------------------------------------------------------------------------- /packages/demo/source/assets/wallpaper-878514.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theme-nexmoe/hexo-theme-nexmoe/1e415b5216df229d908cbc1e9cf5f7291e2d4cbb/packages/demo/source/assets/wallpaper-878514.jpg -------------------------------------------------------------------------------- /packages/demo/source/page/index.md: -------------------------------------------------------------------------------- 1 | title: Page 2 | date: 2013-12-26 22:52:56 3 | --- 4 | 5 | This is a page test. -------------------------------------------------------------------------------- /packages/docs/.editorconfig: -------------------------------------------------------------------------------- 1 | [*] 2 | charset = utf-8 3 | indent_style = space 4 | indent_size = 2 5 | end_of_line = lf 6 | insert_final_newline = true 7 | trim_trailing_whitespace = true 8 | 9 | [*.md] 10 | trim_trailing_whitespace = false 11 | -------------------------------------------------------------------------------- /packages/docs/.gitignore: -------------------------------------------------------------------------------- 1 | ### OSX ### 2 | # General 3 | .DS_Store 4 | .AppleDouble 5 | .LSOverride 6 | 7 | # Thumbnails 8 | ._* 9 | 10 | # Files that might appear in the root of a volume 11 | .DocumentRevisions-V100 12 | .fseventsd 13 | .Spotlight-V100 14 | .TemporaryItems 15 | .Trashes 16 | .VolumeIcon.icns 17 | .com.apple.timemachine.donotpresent 18 | 19 | # Directories potentially created on remote AFP share 20 | .AppleDB 21 | .AppleDesktop 22 | Network Trash Folder 23 | Temporary Items 24 | .apdisk 25 | 26 | ### Node ### 27 | # Logs 28 | logs 29 | *.log 30 | npm-debug.log* 31 | yarn-debug.log* 32 | yarn-error.log* 33 | lerna-debug.log* 34 | 35 | # Diagnostic reports (https://nodejs.org/api/report.html) 36 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 37 | 38 | # Runtime data 39 | pids 40 | *.pid 41 | *.seed 42 | *.pid.lock 43 | 44 | # Directory for instrumented libs generated by jscoverage/JSCover 45 | lib-cov 46 | 47 | # Coverage directory used by tools like istanbul 48 | coverage 49 | *.lcov 50 | 51 | # nyc test coverage 52 | .nyc_output 53 | 54 | # node-waf configuration 55 | .lock-wscript 56 | 57 | # Compiled binary addons (https://nodejs.org/api/addons.html) 58 | build/Release 59 | 60 | # Dependency directories 61 | node_modules/ 62 | jspm_packages/ 63 | 64 | # TypeScript v1 declaration files 65 | typings/ 66 | 67 | # TypeScript cache 68 | *.tsbuildinfo 69 | 70 | # Optional npm cache directory 71 | .npm 72 | 73 | # Optional eslint cache 74 | .eslintcache 75 | 76 | # Optional REPL history 77 | .node_repl_history 78 | 79 | # Output of 'npm pack' 80 | *.tgz 81 | 82 | # Yarn Integrity file 83 | .yarn-integrity 84 | 85 | # pnpm link folder 86 | pnpm-global 87 | 88 | # dotenv environment variables file 89 | .env 90 | .env.test 91 | 92 | # parcel-bundler cache (https://parceljs.org/) 93 | .cache 94 | 95 | # rollup.js default build output 96 | dist/ 97 | 98 | # vuepress build output 99 | .vuepress/dist 100 | .vitepress/cache 101 | 102 | # Serverless directories 103 | .serverless/ 104 | 105 | # Temporary folders 106 | tmp/ 107 | temp/ 108 | TODOs.md 109 | src/api/index.json 110 | src/examples/data.json 111 | src/tutorial/data.json 112 | draft.md 113 | -------------------------------------------------------------------------------- /packages/docs/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "semi": false, 3 | "singleQuote": true, 4 | "trailingComma": "none", 5 | "printWidth": 75 6 | } 7 | -------------------------------------------------------------------------------- /packages/docs/.vitepress/config.mts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vitepress' 2 | import { zhConfig } from './config/zh' 3 | 4 | export default defineConfig({ 5 | srcDir: 'src', 6 | appearance: false, 7 | locales: { 8 | root: { 9 | label: '中文简体', 10 | lang: 'zh-CN', // optional, will be added as `lang` attribute on `html` tag 11 | ...zhConfig 12 | }, 13 | }, 14 | sitemap: { 15 | hostname: 'https://docs.nexmoe.com' 16 | }, 17 | head: [ 18 | [ 19 | 'meta', 20 | { 21 | name: 'keywords', 22 | content: 'hexo,nexmoe,theme,blog,beautiful,simple' 23 | } 24 | ], 25 | [ 26 | 'link', 27 | { 28 | rel: 'shortcut icon', 29 | type: 'image/x-icon', 30 | sizes: '32x32', 31 | href: `/favicon.ico` 32 | } 33 | ], 34 | [ 35 | 'script', 36 | { 37 | src: 'https://www.googletagmanager.com/gtag/js?id=G-HG5GSWYXHL', 38 | async: 'true' 39 | } 40 | ], 41 | ['script', { src: '/gtag.js' }], 42 | [ 43 | 'script', 44 | { 45 | async: 'true', 46 | crossorigin: 'anonymous', 47 | src: 'https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-2058306854838448' 48 | } 49 | ] 50 | ], 51 | 52 | themeConfig: { 53 | search: { 54 | provider: 'local', 55 | options: { 56 | _render(src, env, md) { 57 | const html = md.render(src, env) 58 | if (env.frontmatter?.search === false) return '' 59 | if (!env.relativePath.startsWith('v4.2')) return '' 60 | return html 61 | } 62 | } 63 | }, 64 | 65 | socialLinks: [ 66 | { icon: 'twitter', link: 'https://twitter.com/nexmoe' }, 67 | { 68 | icon: 'github', 69 | link: 'https://github.com/theme-nexmoe/hexo-theme-nexmoe' 70 | } 71 | ], 72 | 73 | editLink: { 74 | pattern: 75 | 'https://github.com/theme-nexmoe/hexo-theme-nexmoe/edit/master/packages/docs/src/:path' 76 | } 77 | } 78 | }) 79 | -------------------------------------------------------------------------------- /packages/docs/.vitepress/config/en.ts: -------------------------------------------------------------------------------- 1 | import type { DefaultTheme, LocaleSpecificConfig } from 'vitepress' 2 | 3 | const ogUrl = 'https://docs.nexmoe.com/' 4 | const ogDescription = '🔥 A rather special Hexo theme' 5 | const ogLogo = '/icon.svg' 6 | 7 | export const enConfig: LocaleSpecificConfig = { 8 | title: 'Hexo Theme Nexmoe', 9 | titleTemplate: '🔥 A rather special Hexo theme', 10 | description: ogDescription, 11 | head: [ 12 | ['meta', { property: 'og:url', content: ogUrl }], 13 | ['meta', { property: 'og:description', content: ogDescription }] 14 | ], 15 | 16 | themeConfig: { 17 | nav: [ 18 | { 19 | text: 'Quick Start', 20 | link: '/v4.0/', 21 | activeMatch: `^/v4.0/` 22 | }, 23 | { 24 | text: 'Version', 25 | items: [ 26 | { 27 | text: 'v4.0', 28 | link: '/v4.0/', 29 | activeMatch: `^/v4.0/` 30 | }, 31 | { 32 | text: 'v3.2', 33 | link: '/v3.2/', 34 | activeMatch: `^/v3.2/` 35 | } 36 | ] 37 | } 38 | ], 39 | sidebar: { 40 | '/v4.0/': [ 41 | { 42 | items: [ 43 | { 44 | text: 'Quick Start', 45 | link: '/v4.0/' 46 | }, 47 | { 48 | text: 'FAQ', 49 | link: '/v4.0/faq' 50 | } 51 | ] 52 | }, 53 | { 54 | text: 'Theme Config', 55 | items: [ 56 | { 57 | text: 'yml', 58 | link: '/v4.0/config/yml' 59 | }, 60 | { 61 | text: 'Slot', 62 | link: '/v4.0/config/slot' 63 | }, 64 | { 65 | text: 'Style', 66 | link: '/v4.0/config/style' 67 | } 68 | /* 69 | { 70 | text: 'Icon', 71 | link: '/v4.0/config/icon' 72 | }, 73 | { 74 | text: 'Search', 75 | link: '/v4.0/config/search' 76 | } 77 | */ 78 | ] 79 | }, 80 | { 81 | text: 'Posts & Pages', 82 | items: [ 83 | { 84 | text: 'Front-matter', 85 | link: '/v4.0/post/front-matter' 86 | }, 87 | // { 88 | // text: "Archive", 89 | // link: "/v4.0/article/archive", 90 | // }, 91 | // { 92 | // text: "Cover", 93 | // link: "/v4.0/article/cover", 94 | // }, 95 | { 96 | text: 'Gallery', 97 | link: '/v4.0/post/gallery' 98 | }, 99 | { 100 | text: 'Gallery Pro', 101 | link: '/v4.0/post/gallery_pro' 102 | }, 103 | { 104 | text: 'Links', 105 | link: '/v4.0/post/links' 106 | } 107 | ] 108 | }, 109 | { 110 | items: [ 111 | { 112 | text: 'Contribution', 113 | link: '/v4.0/contribution' 114 | } 115 | ] 116 | } 117 | ] 118 | } 119 | } 120 | } 121 | -------------------------------------------------------------------------------- /packages/docs/.vitepress/theme/index.ts: -------------------------------------------------------------------------------- 1 | // https://vitepress.dev/guide/custom-theme 2 | import { h } from 'vue' 3 | import Theme from 'vitepress/theme' 4 | import './style.css' 5 | 6 | export default { 7 | extends: Theme, 8 | Layout: () => { 9 | return h(Theme.Layout, null, { 10 | // https://vitepress.dev/guide/extending-default-theme#layout-slots 11 | }) 12 | }, 13 | enhanceApp({ app, router, siteData }) { 14 | // ... 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /packages/docs/.vitepress/theme/style.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Customize default theme styling by overriding CSS variables: 3 | * https://github.com/vuejs/vitepress/blob/main/src/client/theme-default/styles/vars.css 4 | */ 5 | 6 | /** 7 | * Colors 8 | * 9 | * Each colors have exact same color scale system with 3 levels of solid 10 | * colors with different brightness, and 1 soft color. 11 | * 12 | * - `XXX-1`: The most solid color used mainly for colored text. It must 13 | * satisfy the contrast ratio against when used on top of `XXX-soft`. 14 | * 15 | * - `XXX-2`: The color used mainly for hover state of the button. 16 | * 17 | * - `XXX-3`: The color for solid background, such as bg color of the button. 18 | * It must satisfy the contrast ratio with pure white (#ffffff) text on 19 | * top of it. 20 | * 21 | * - `XXX-soft`: The color used for subtle background such as custom container 22 | * or badges. It must satisfy the contrast ratio when putting `XXX-1` colors 23 | * on top of it. 24 | * 25 | * The soft color must be semi transparent alpha channel. This is crucial 26 | * because it allows adding multiple "soft" colors on top of each other 27 | * to create a accent, such as when having inline code block inside 28 | * custom containers. 29 | * 30 | * - `default`: The color used purely for subtle indication without any 31 | * special meanings attched to it such as bg color for menu hover state. 32 | * 33 | * - `brand`: Used for primary brand colors, such as link text, button with 34 | * brand theme, etc. 35 | * 36 | * - `tip`: Used to indicate useful information. The default theme uses the 37 | * brand color for this by default. 38 | * 39 | * - `warning`: Used to indicate warning to the users. Used in custom 40 | * container, badges, etc. 41 | * 42 | * - `danger`: Used to show error, or dangerous message to the users. Used 43 | * in custom container, badges, etc. 44 | * -------------------------------------------------------------------------- */ 45 | 46 | :root { 47 | --vp-c-default-1: var(--vp-c-gray-1); 48 | --vp-c-default-2: var(--vp-c-gray-2); 49 | --vp-c-default-3: var(--vp-c-gray-3); 50 | --vp-c-default-soft: var(--vp-c-gray-soft); 51 | 52 | --vp-c-brand-1: var(--vp-c-indigo-1); 53 | --vp-c-brand-2: var(--vp-c-indigo-2); 54 | --vp-c-brand-3: var(--vp-c-indigo-3); 55 | --vp-c-brand-soft: var(--vp-c-indigo-soft); 56 | 57 | --vp-c-tip-1: var(--vp-c-brand-1); 58 | --vp-c-tip-2: var(--vp-c-brand-2); 59 | --vp-c-tip-3: var(--vp-c-brand-3); 60 | --vp-c-tip-soft: var(--vp-c-brand-soft); 61 | 62 | --vp-c-warning-1: var(--vp-c-yellow-1); 63 | --vp-c-warning-2: var(--vp-c-yellow-2); 64 | --vp-c-warning-3: var(--vp-c-yellow-3); 65 | --vp-c-warning-soft: var(--vp-c-yellow-soft); 66 | 67 | --vp-c-danger-1: var(--vp-c-red-1); 68 | --vp-c-danger-2: var(--vp-c-red-2); 69 | --vp-c-danger-3: var(--vp-c-red-3); 70 | --vp-c-danger-soft: var(--vp-c-red-soft); 71 | } 72 | 73 | /** 74 | * Component: Button 75 | * -------------------------------------------------------------------------- */ 76 | 77 | :root { 78 | --vp-button-brand-border: transparent; 79 | --vp-button-brand-text: var(--vp-c-white); 80 | --vp-button-brand-bg: var(--vp-c-brand-3); 81 | --vp-button-brand-hover-border: transparent; 82 | --vp-button-brand-hover-text: var(--vp-c-white); 83 | --vp-button-brand-hover-bg: var(--vp-c-brand-2); 84 | --vp-button-brand-active-border: transparent; 85 | --vp-button-brand-active-text: var(--vp-c-white); 86 | --vp-button-brand-active-bg: var(--vp-c-brand-1); 87 | } 88 | 89 | /** 90 | * Component: Home 91 | * -------------------------------------------------------------------------- */ 92 | 93 | :root { 94 | --vp-home-hero-name-color: transparent; 95 | --vp-home-hero-name-background: -webkit-linear-gradient( 96 | 120deg, 97 | #bd34fe 30%, 98 | #41d1ff 99 | ); 100 | 101 | --vp-home-hero-image-background-image: linear-gradient( 102 | -45deg, 103 | #bd34fe 50%, 104 | #47caff 50% 105 | ); 106 | --vp-home-hero-image-filter: blur(40px); 107 | } 108 | 109 | @media (min-width: 640px) { 110 | :root { 111 | --vp-home-hero-image-filter: blur(56px); 112 | } 113 | } 114 | 115 | @media (min-width: 960px) { 116 | :root { 117 | --vp-home-hero-image-filter: blur(72px); 118 | } 119 | } 120 | 121 | /** 122 | * Component: Custom Block 123 | * -------------------------------------------------------------------------- */ 124 | 125 | :root { 126 | --vp-custom-block-tip-border: transparent; 127 | --vp-custom-block-tip-text: var(--vp-c-text-1); 128 | --vp-custom-block-tip-bg: var(--vp-c-brand-soft); 129 | --vp-custom-block-tip-code-bg: var(--vp-c-brand-soft); 130 | } 131 | 132 | /** 133 | * Component: Algolia 134 | * -------------------------------------------------------------------------- */ 135 | 136 | .DocSearch { 137 | --docsearch-primary-color: var(--vp-c-brand-1) !important; 138 | } 139 | 140 | 141 | /* .vitepress/theme/custom.css 142 | :root { 143 | --vp-c-brand: #df5d64; 144 | --vp-c-brand-dark: #d4454d; 145 | --vp-c-brand-darker: #d4454d; 146 | --vp-c-brand-light: #df5d64b8; 147 | --vp-c-brand-lighter: #df5d64b8; 148 | 149 | } */ 150 | -------------------------------------------------------------------------------- /packages/docs/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 vuejs 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /packages/docs/README.md: -------------------------------------------------------------------------------- 1 | # vuejs.org 2 | 3 | ## Contributing 4 | 5 | This site is built with [VitePress](https://github.com/vuejs/vitepress) and depends on [@vue/theme](https://github.com/vuejs/vue-theme). Site content is written in Markdown format located in `src`. For simple edits, you can directly edit the file on GitHub and generate a Pull Request. 6 | 7 | For local development, [pnpm](https://pnpm.io/) is preferred as package manager: 8 | 9 | ```bash 10 | pnpm i 11 | pnpm run dev 12 | ``` 13 | 14 | This project requires Node.js to be `v14.0.0` or higher, because we use new JavaScript features in our code, such as optional chaining. 15 | 16 | 17 | ## Working on the content 18 | 19 | - See VitePress docs on supported [Markdown Extensions](https://vitepress.vuejs.org/guide/markdown.html) and the ability to [use Vue syntax inside markdown](https://vitepress.vuejs.org/guide/using-vue.html). 20 | 21 | - See the [Writing Guide](https://github.com/vuejs/docs/blob/main/.github/contributing/writing-guide.md) for our rules and recommendations on writing and maintaining documentation content. 22 | 23 | ## Working on the theme 24 | 25 | If changes need to made for the theme, check out the [instructions for developing the theme alongside the docs](https://github.com/vuejs/vue-theme#developing-with-real-content). 26 | -------------------------------------------------------------------------------- /packages/docs/env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | 4 | declare module '@vue/theme/config' { 5 | import { UserConfig } from 'vitepress' 6 | const config: () => Promise 7 | export default config 8 | } 9 | 10 | declare module '@vue/theme/highlight' { 11 | const createHighlighter: () => Promise<(input: string) => string> 12 | export default createHighlighter 13 | } 14 | -------------------------------------------------------------------------------- /packages/docs/netlify.toml: -------------------------------------------------------------------------------- 1 | [build.environment] 2 | NODE_VERSION = "16" 3 | NPM_FLAGS = "--version" # prevent Netlify npm install 4 | 5 | [build] 6 | publish = ".vitepress/dist" 7 | command = "npx pnpm i --store=node_modules/.pnpm-store && npm run build" 8 | -------------------------------------------------------------------------------- /packages/docs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "docs", 3 | "engines": { 4 | "node": ">=18", 5 | "pnpm": ">=8" 6 | }, 7 | "main": "index.js", 8 | "scripts": { 9 | "test": "echo \"Error: no test specified\" && exit 1", 10 | "dev": "vitepress dev", 11 | "build": "vitepress build", 12 | "preview": "vitepress preview" 13 | }, 14 | "dependencies": { 15 | "landify": "^0.3.5", 16 | "typescript": "^5.4.3", 17 | "vue": "^3.4.21" 18 | }, 19 | "devDependencies": { 20 | "vitepress": "1.1.3" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /packages/docs/src/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: home 3 | 4 | hero: 5 | name: Hexo Theme Nexmoe 6 | text: 一个比较特别的 Hexo 主题,聚焦图片和色彩 🔥 7 | actions: 8 | - theme: brand 9 | text: 开始 10 | link: /v4.2/ 11 | - theme: alt 12 | text: Demo 13 | link: https://nexmoe.com/ 14 | 15 | features: 16 | - icon: ⚡️ 17 | title: 绚丽 18 | details: 大胆的阴影、色彩与模糊效果 19 | - icon: 🏞️ 20 | title: 图片友好 21 | details: 图片瀑布流、灯箱、图片懒加载 22 | - icon: 🛠️ 23 | title: 强个性化 24 | details: 您可以很方便的使用任意的评论系统、统计系统等各种第三方工具 25 | 26 | --- 27 | 28 | 29 | 32 | 33 | 34 | 35 | 41 | -------------------------------------------------------------------------------- /packages/docs/src/public/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theme-nexmoe/hexo-theme-nexmoe/1e415b5216df229d908cbc1e9cf5f7291e2d4cbb/packages/docs/src/public/android-chrome-192x192.png -------------------------------------------------------------------------------- /packages/docs/src/public/android-chrome-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theme-nexmoe/hexo-theme-nexmoe/1e415b5216df229d908cbc1e9cf5f7291e2d4cbb/packages/docs/src/public/android-chrome-512x512.png -------------------------------------------------------------------------------- /packages/docs/src/public/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theme-nexmoe/hexo-theme-nexmoe/1e415b5216df229d908cbc1e9cf5f7291e2d4cbb/packages/docs/src/public/apple-touch-icon.png -------------------------------------------------------------------------------- /packages/docs/src/public/browserconfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | #da532c 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /packages/docs/src/public/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theme-nexmoe/hexo-theme-nexmoe/1e415b5216df229d908cbc1e9cf5f7291e2d4cbb/packages/docs/src/public/favicon-16x16.png -------------------------------------------------------------------------------- /packages/docs/src/public/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theme-nexmoe/hexo-theme-nexmoe/1e415b5216df229d908cbc1e9cf5f7291e2d4cbb/packages/docs/src/public/favicon-32x32.png -------------------------------------------------------------------------------- /packages/docs/src/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theme-nexmoe/hexo-theme-nexmoe/1e415b5216df229d908cbc1e9cf5f7291e2d4cbb/packages/docs/src/public/favicon.ico -------------------------------------------------------------------------------- /packages/docs/src/public/gtag.js: -------------------------------------------------------------------------------- 1 | window.dataLayer = window.dataLayer || []; 2 | function gtag() { 3 | dataLayer.push(arguments); 4 | } 5 | gtag("js", new Date()); 6 | 7 | gtag("config", "G-HG5GSWYXHL"); -------------------------------------------------------------------------------- /packages/docs/src/public/mstile-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theme-nexmoe/hexo-theme-nexmoe/1e415b5216df229d908cbc1e9cf5f7291e2d4cbb/packages/docs/src/public/mstile-150x150.png -------------------------------------------------------------------------------- /packages/docs/src/public/site.webmanifest: -------------------------------------------------------------------------------- 1 | { 2 | "name": "", 3 | "short_name": "", 4 | "icons": [ 5 | { 6 | "src": "/android-chrome-192x192.png", 7 | "sizes": "192x192", 8 | "type": "image/png" 9 | }, 10 | { 11 | "src": "/android-chrome-512x512.png", 12 | "sizes": "512x512", 13 | "type": "image/png" 14 | } 15 | ], 16 | "theme_color": "#ffffff", 17 | "background_color": "#ffffff", 18 | "display": "standalone" 19 | } 20 | -------------------------------------------------------------------------------- /packages/docs/src/section.vue: -------------------------------------------------------------------------------- 1 | 94 | 95 | 114 | -------------------------------------------------------------------------------- /packages/docs/src/v3.2/article/archive.md: -------------------------------------------------------------------------------- 1 | # 归档页面 2 | 3 | ## 使用 4 | 5 | 在站点根目录下的 `source` 文件夹内创建一个 `.md` 文件,文件名和路径根据个人喜好决定,会决定渲染生成以后页面的路径。 6 | 7 | 在文件中写入以下内容: 8 | 9 | ```yaml 10 | --- 11 | title: 文章归档 12 | layout: archives 13 | --- 14 | ``` 15 | 16 | > title 可以更换为自己喜欢的标题 permalink 为本页面地址 17 | 18 | 参考: 19 | 20 | ### 关于分类的图片 21 | 22 | 有的朋友布置完之后发现自己的页面是这样的: 23 | ![image.png](https://s2.loli.net/2022/04/11/JGga2t5dnyNTDsI.png) 24 | 而大佬的页面长这样: 25 | ![image-20210721123359847-acb36390920d2ff88ad0e8db50fd1e32.png](https://s2.loli.net/2022/04/11/bYvMsq8lLTVxBg4.png) 26 | ~~于是你开始思考。。。~~ 27 | 好吧,如果你打开主题目录下的`layout\archives.ejs`文件,可以看到这样一段代码: 28 | 29 | ```html 30 |
31 | <% site.categories.sort('name').map(function(category){ %> 32 | <% let coverx = "" %> 33 | <% category.posts.sort('-date').map(function(post){ %> 34 | 35 | <% if(post.cover!==undefined && coverx==""){ %> 36 | <% coverx = post.cover %> 37 | <% } %> 38 | <% }) %> 39 | 40 | 41 |
42 |

<%= category.name %>

43 |
44 | <% }) %> 45 |
46 | ``` 47 | 48 | 通过分析代码,我们发现,分类的图片来自最新的使用该分类的文章的图片。 49 | 其实,可以更改这一行代码`<% if(post.cover!==undefined && coverx==""){ %>`,删去`&& coverx==""`,再在`<% let coverx = "" %>`中`coverx = ""`的双引号中间放入一个图片的URL或者随机图片API的URL以作到该分类下文章无单独设置的封面时使用某一/随机图片作为封面。 50 | 51 | ## 演示 52 | 53 | [文章归档 - 折影轻梦 (nexmoe.com)](https://nexmoe.com/archive.html) 54 | 55 | ![image-20210721123359847](archive/image-20210721123359847.png) 56 | -------------------------------------------------------------------------------- /packages/docs/src/v3.2/article/archive/image-20210721123359847.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theme-nexmoe/hexo-theme-nexmoe/1e415b5216df229d908cbc1e9cf5f7291e2d4cbb/packages/docs/src/v3.2/article/archive/image-20210721123359847.png -------------------------------------------------------------------------------- /packages/docs/src/v3.2/article/cover.md: -------------------------------------------------------------------------------- 1 | # 文章封面图 2 | 3 | 在 Front-matter 中插入 cover 值,该值可以是图片的远程链接,可以是图片的绝对路径 4 | 5 | 为防止图片抖动,你需要手动填写封面图原长度和高度, 6 | 7 | 最新版本已可忽略长度高度,忽略后会默认图片比例为 16:9 8 | 9 | ```yaml 10 | --- 11 | title: Hello World 12 | date: 2013/7/13 20:46:25 13 | cover: https://i.loli.net/2019/07/21/5d33d5dc1531213134.png 14 | coverWidth: 1200 15 | coverHeight: 750 16 | --- 17 | ``` 18 | -------------------------------------------------------------------------------- /packages/docs/src/v3.2/article/front-matter.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 5 3 | --- 4 | 5 | # Front-matter 6 | 7 | ## 主题特有 8 | 9 | | 参数 | 描述 | 默认值 | 10 | | :------------ | :----------------------- | :--------------------- | 11 | | `cover` | 封面,需为图片目录或链接 | config.background.path | 12 | | `coverWidth` | 封面宽度 | 1600 | 13 | | `coverHeight` | 封面宽度 | 900 | 14 | | `reprint` | 是否为转载 | false | 15 | 16 | ## Hexo 自带 17 | 18 | [Front-matter | Hexo](https://hexo.io/zh-cn/docs/front-matter) 19 | 20 | -------------------------------------------------------------------------------- /packages/docs/src/v3.2/article/gallery.md: -------------------------------------------------------------------------------- 1 | # 瀑布流图片 2 | 3 | ## 使用 4 | 5 | 在文章中插入以下内容 6 | 7 | ```markdown 8 | {% gallery %} 9 | ![1](https://cdn.jsdelivr.net/gh/nexmoe/image@latest/20210207192753.jpg) 10 | ![1](https://cdn.jsdelivr.net/gh/nexmoe/image@latest/20210207192754.jpg) 11 | ![1](https://cdn.jsdelivr.net/gh/nexmoe/image@latest/20210207192755.jpg) 12 | ![1](https://cdn.jsdelivr.net/gh/nexmoe/image@latest/20210207192756.jpg) 13 | ![1](https://cdn.jsdelivr.net/gh/nexmoe/image@latest/20210207192757.jpg) 14 | ![1](https://cdn.jsdelivr.net/gh/nexmoe/image@latest/20210207192530.jpg) 15 | ![1](https://cdn.jsdelivr.net/gh/nexmoe/image@latest/20210207192531.jpg) 16 | ![1](https://cdn.jsdelivr.net/gh/nexmoe/image@latest/20210207192532.jpg) 17 | ![1](https://cdn.jsdelivr.net/gh/nexmoe/image@latest/20210207192533.jpg) 18 | ![1](https://cdn.jsdelivr.net/gh/nexmoe/image@latest/20210207192534.jpg) 19 | ![1](https://cdn.jsdelivr.net/gh/nexmoe/image@latest/20210207192535.jpg) 20 | ![1](https://cdn.jsdelivr.net/gh/nexmoe/image@latest/20210207192415.jpg) 21 | ![1](https://cdn.jsdelivr.net/gh/nexmoe/image@latest/20210207192416.jpg) 22 | {% endgallery %} 23 | ``` 24 | 25 | ## 演示 26 | 27 | [Farewell 2020! - 折影轻梦 (nexmoe.com)](https://nexmoe.com/1W4AR7.html) 28 | 29 | ![image-20210721124020479](gallery/image-20210721124020479.png) 30 | -------------------------------------------------------------------------------- /packages/docs/src/v3.2/article/gallery/QQ图片20210215103021.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theme-nexmoe/hexo-theme-nexmoe/1e415b5216df229d908cbc1e9cf5f7291e2d4cbb/packages/docs/src/v3.2/article/gallery/QQ图片20210215103021.png -------------------------------------------------------------------------------- /packages/docs/src/v3.2/article/gallery/image-20210721124020479.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theme-nexmoe/hexo-theme-nexmoe/1e415b5216df229d908cbc1e9cf5f7291e2d4cbb/packages/docs/src/v3.2/article/gallery/image-20210721124020479.png -------------------------------------------------------------------------------- /packages/docs/src/v3.2/article/py.md: -------------------------------------------------------------------------------- 1 | # 友情链接 2 | 3 | ## 创建页面 4 | 5 | 在站点根目录下的 `source` 文件夹内创建一个 `.md` 文件,文件名和路径根据个人喜好决定,会决定渲染生成以后页面的路径。 6 | 7 | 在文件中写入以下内容: 8 | 9 | ```yaml 10 | --- 11 | title: links 12 | date: 2013/7/13 20:46:25 13 | layout: py 14 | permalink: PY.html 15 | --- 16 | ``` 17 | 18 | > title 可以更换为自己喜欢的标题 permalink 为本页面地址 19 | 20 | 参考:https://hexo.io/zh-cn/docs/front-matter 21 | 22 | ## 添加友链 23 | 24 | 在 `.md` 中直接添加以下内容即可 25 | 26 | ```markdown 27 | - [![标题](https://example.com/logo.png)](https://example.com/ "标题") 28 | ``` 29 | 30 | 例如 31 | 32 | ```markdown 33 | - [![折影轻梦](https://avatar.mixcm.com/github/nexmoe)](https://nexmoe.com/ "折影轻梦") 34 | ``` 35 | 36 | ## 演示 37 | 38 | https://nexmoe.com/PY.html 39 | 40 | ![image-20210721123326858](py/image-20210721123326858.png) -------------------------------------------------------------------------------- /packages/docs/src/v3.2/article/py/image-20210721123326858.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theme-nexmoe/hexo-theme-nexmoe/1e415b5216df229d908cbc1e9cf5f7291e2d4cbb/packages/docs/src/v3.2/article/py/image-20210721123326858.png -------------------------------------------------------------------------------- /packages/docs/src/v3.2/config/analysis.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 2 3 | --- 4 | 5 | 6 | 7 | # 分析系统 8 | 9 | 10 | ## [Google](https://analytics.google.com/) 11 | 12 | 登陆 Google Analytics 管理后台,找到你的站点 - 媒体资源设置,找到 `跟踪 ID`,一般是以 `UA-` 开头。 根据你想使用的方式,将 `跟踪 ID` 填写到 `google_site_id` 或 `gtags_site_id` 中。 **请注意:** **`gtags`** **需要加载更大更多的文件。** 13 | 14 | ## CNZZ 15 | 16 | 登陆 CNZZ 后台,找到代码安装页面,应该会提供类似如下形式的代码: 17 | 18 | 19 | 20 | ```html 21 | 22 | ``` 23 | 24 | 把那一长串 ID 设置在 `cnzz_site_id` 中。 25 | 26 | > 脚本生成的内容会产生“站长统计”,Nexmoe已将其隐藏。 27 | 28 | ## [腾讯分析](http://ta.qq.com/) 29 | 30 | 登录腾讯分析控制台,登录并获取分析的 ID,填入 `tencent_site_id` 中。 31 | 32 | ## [百度统计](http://tongji.baidu.com/) 33 | 34 | 登陆百度统计后台,定位到代码获取页面,应该会提供类似如下形式的代码: 35 | 36 | 37 | 38 | ```html 39 | 47 | ``` 48 | 49 | 把那一长串 ID 设置在 `baidu_site_id` 中。 50 | 51 | ## [51.La统计](https://www.51.la/) 52 | 53 | 登陆51.La统计后台,定位到代码获取页面,应该会提供类似如下形式的代码: 54 | 55 | 56 | 57 | ```html 58 | 59 | ``` 60 | 61 | 把那一长串 ID 设置在 `la_site_id` 中。 62 | 63 | -------------------------------------------------------------------------------- /packages/docs/src/v3.2/config/icon.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 3 3 | --- 4 | 5 | # 图标 6 | 7 | ## 主题自带图标 8 | 9 | [IconFont Demonexmoe.com](https://nexmoe.com/lib/iconfont/demo_index.html) 10 | 11 | ## 自己创造 12 | 13 | 1️⃣ 使用阿里的图标库:登陆阿里矢量库注册 14 | 15 | 2️⃣ 图标管理 16 | 17 | 3️⃣ 新建项目 18 | 19 | 4️⃣编辑项目页面 Font Family 参数修改为`nexmoefont` 20 | 21 | 5️⃣ 添加新图标到项目 22 | 23 | 6️⃣ 生成的 css 地址添加到主题配置文件 iconlib 参数的 value 部分 24 | 25 | 7️⃣ 在使用图标部分引用在矢量库的 class 26 | 27 | ![img](icon/2020-04-25_12-19-02.png) -------------------------------------------------------------------------------- /packages/docs/src/v3.2/config/icon/2020-04-25_12-19-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theme-nexmoe/hexo-theme-nexmoe/1e415b5216df229d908cbc1e9cf5f7291e2d4cbb/packages/docs/src/v3.2/config/icon/2020-04-25_12-19-02.png -------------------------------------------------------------------------------- /packages/docs/src/v3.2/config/search.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 4 3 | --- 4 | 5 | # 搜索 6 | 7 | ## **开始** 8 | 9 | Nexmoe现在支持三种搜索引擎,网页搜索引擎(如百度、Bing)、本地搜索和 Swiftype 10 | 11 | ## **使用网页搜索引擎** 12 | 13 | - 打开你的博客配置文件,将`search`项下的`type`设置为`engine`,将`url`改为可用于直接搜索的网址 14 | 15 | 例: 16 | 17 | 18 | 19 | ```yaml 20 | search: 21 | type: engine 22 | url: https://cn.bing.com/search?q=site:nexmoe.com 23 | ``` 24 | 25 | ## **使用本地搜索** 26 | 27 | - 打开你的博客配置文件,将`search`项下的`type`设置为`local` 28 | 29 | 例: 30 | 31 | 32 | 33 | ```yaml 34 | search: 35 | type: local 36 | ``` 37 | 38 | - 打开你的站点配置文件,添加以下字段: 39 | 40 | ```yaml 41 | jsonContent: 42 | meta: false 43 | pages: false 44 | posts: 45 | title: true 46 | date: false 47 | path: true 48 | text: true 49 | raw: false 50 | content: false 51 | slug: false 52 | updated: false 53 | comments: false 54 | link: false 55 | permalink: false 56 | excerpt: false 57 | categories: false 58 | tags: false 59 | ``` 60 | 61 | > ⚠请确保你已经安装了`hexo-generator-json-content`插件! 62 | 63 | ## **使用 Swiftype** 64 | 65 | - 打开你的博客配置文件,将`search`项下的`type`设置为`swiftype` 66 | - 转到你的Swiftype引擎仪表盘,进入`Install Search`,在你的安装代码(`install code`)的如图位置得到你的`swiftype-id`,并填入博客配置文件`search`项下的`id`项 67 | 68 | ![img](search/a7d385bac726fa4ffcdc3c744e86ad1d127eedaf.jpeg) 69 | 70 | 例: 71 | 72 | ```yaml 73 | search: 74 | type: swiftype 75 | url: ... 76 | id: FwpiTVmsf_TAL1XGiS17 77 | ``` 78 | 79 | [ 80 | ](https://docs.nexmoe.com/hexo-nexmoe/zhu-ti-pei-zhi/icon) 81 | -------------------------------------------------------------------------------- /packages/docs/src/v3.2/config/search/a7d385bac726fa4ffcdc3c744e86ad1d127eedaf.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theme-nexmoe/hexo-theme-nexmoe/1e415b5216df229d908cbc1e9cf5f7291e2d4cbb/packages/docs/src/v3.2/config/search/a7d385bac726fa4ffcdc3c744e86ad1d127eedaf.jpeg -------------------------------------------------------------------------------- /packages/docs/src/v3.2/config/style-color.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 5 3 | --- 4 | 5 | # 样式与颜色 6 | 7 | :::tip 8 | 该功能自 3.1.0 版本支持 9 | ::: 10 | 11 | ## 暗色主题 12 | 13 | 要启用暗色主题,须在站点主题配置中设置以下字段: 14 | 15 | ```yaml 16 | function: 17 | ...: 18 | darkmode: true 19 | ``` 20 | 21 | > 由于技术性问题,现`disqus`、`disqusjs`、`livere`均不适配暗色主题 22 | 23 | ## 自定义配色方案 24 | 25 | Nexmoe为各位预备了一套完备的配色方案,但如果各位有自定义配色的需求,可以在站点主题配置中设置。 26 | 27 | ```yaml 28 | color: # 配色方案,从first到seventh为优先级为1-7的颜色,默认为彩虹配色 29 | first: # 同时作为主题色 30 | r: ... 31 | g: ... 32 | b: ... 33 | second: 34 | ... 35 | seventh: 36 | ``` 37 | 38 | 这里的`first`到`seventh`分别是使用优先级1——7的颜色,原配色为红橙黄绿青蓝紫,各位可以根据这几个颜色的出现频率配色,特别注意`first`是主题色。各项下的`r`、`g`、`b`项分别填写颜色的r,g,b值。 39 | 40 | ## 用户自定义样式 41 | 42 | 如果有想自定义但配置中未提供的样式,可以通过启用用户自定义样式自定义。 43 | 44 | 先在站点主题配置中设置以下字段: 45 | 46 | ```yaml 47 | customstyle: true 48 | ``` 49 | 50 | 再在博客根目录下的`source`文件夹中新建`custom.css`,并在此文件中编写用户想要自定义的css样式。 51 | -------------------------------------------------------------------------------- /packages/docs/src/v3.2/contribution.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 7 3 | --- 4 | 5 | # 参与贡献 6 | 7 | 如你所见的,这是一个开源的项目,开源的目的就是为了更好的社区维护,我希望任何愿意的人都可以通过任何方式参与到 Nexmoe 的贡献中来。 8 | 9 | ## 贡献者 10 | 11 | ![贡献者](https://opencollective.com/hexo-theme-nexmoe/contributors.svg?width=890&button=false) 12 | 13 | ## 国际化 14 | 15 | 支持多语言,默认语言为简体中文。 目前中文翻译较全,其他语言翻译不完全,有余力的大佬可以来贡献一下。 16 | https://crowdin.com/project/hexo-theme-nexmoe 17 | 18 | > 非常欢迎你帮助我们将 Nexmoe 翻译至其他语言! 19 | 20 | ## Issue 21 | 22 | [报告错误](https://github.com/theme-nexmoe/hexo-theme-nexmoe/issues/new) 23 | 24 | 这对你没任何技术要求,只需要提交你发现的 BUG,就足以。 25 | 26 | ## Pull Request(PR) 27 | 28 | [提交新功能](https://github.com/theme-nexmoe/hexo-theme-nexmoe/pulls) 29 | 30 | 欢迎任何功能上的 PR。 31 | 32 | ## 文档 33 | 34 | [完善教程](https://github.com/theme-nexmoe/hexo-docs/) 35 | 36 | 如你所见,这个文档内容很少,因为没有人喜欢写文档。 如果你有充足的时间,并且十分乐意参加到贡献中来,文档无疑是项目中非常重要的一环。 37 | 38 | 本站使用 [Docusaurus,点击查看使用文档](https://docusaurus.io/) 39 | 40 | ## 投稿 41 | 42 | [在 Nexmoe 的博客投稿](https://github.com/theme-nexmoe/hexo-docs/tree/master/blog) 43 | 44 | 关于 Nexmoe 的使用教程,或者基于 Nexmoe 的其他版本等等内容可以在这里投稿。[如何添加文章?](https://docusaurus.io/zh-CN/docs/blog#adding-posts) 45 | 46 | :::tip 47 | 48 | 本站使用 `` 为摘要,与 Hexo 相同,而不是 `` 49 | 50 | ::: 51 | 52 | ## 参与社区 53 | 54 | 参与社区讨论,同样也是对该项目的支持与贡献 55 | 56 | https://github.com/theme-nexmoe/hexo-theme-nexmoe/discussions 57 | -------------------------------------------------------------------------------- /packages/docs/src/v3.2/faq.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 2 3 | --- 4 | 5 | # 常见问题 6 | 7 | ## 未安装 wordcount 8 | 9 | 有时候运行错误会有 wordcount 这一关键词的报错,运行以下命令即可 10 | 11 | ```shell 12 | npm i --save hexo-wordcount 13 | ``` 14 | 15 | ## 代码高亮 16 | 17 | 自2.9.0版本后,需要在 _config.yml 文件中进行如下配置使用高亮 18 | 19 | ```yaml 20 | highlight: 21 | enable: true 22 | hljs: true 23 | auto_detect: true 24 | ``` 25 | 26 | 更多内容:[代码高亮 | Hexo](https://hexo.io/zh-cn/docs/syntax-highlight#Highlight-js) 27 | 28 | ## 首页取文章概述 29 | 30 | Hexo 在写作的时候(**许多博客都是这样的**),需要在文中添加 `` 则该标记之前的部分就会成为该文章的概述,显示在首页里 31 | 32 | **Hexo 在 `` 需要有一段内容** 33 | 34 | ![image-20210721115403445](faq/image-20210721115403445.png) 35 | 36 | 更多内容:[标签插件(Tag Plugins) | Hexo](https://hexo.io/zh-cn/docs/tag-plugins#文章摘要和截断) 37 | 38 | -------------------------------------------------------------------------------- /packages/docs/src/v3.2/faq/image-20210721115403445.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theme-nexmoe/hexo-theme-nexmoe/1e415b5216df229d908cbc1e9cf5f7291e2d4cbb/packages/docs/src/v3.2/faq/image-20210721115403445.png -------------------------------------------------------------------------------- /packages/docs/src/v3.2/hexo/RSS.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 6 3 | --- 4 | 5 | # RSS 6 | 7 | ## 安装 hexo-generator-feed 8 | 9 | ```shell 10 | npm install hexo-generator-feed --save 11 | ``` 12 | 13 | ## 修改配置 (`_config.nexmoe.yml`) 14 | 15 | 1. 侧边栏添加 RSS 订阅入口 16 | 17 | ```yaml 18 | RSS: 19 | - /atom.xml 20 | - icon-rss 21 | - rgb(235, 152, 0) 22 | - rgba(235, 152, 0, .15) 23 | ``` 24 | 25 | > 以上值仅供参考 26 | 27 | 2. 添加插件相关配置 28 | 29 | ```yaml 30 | # hexo generator feed 31 | feed: 32 | enable: true 33 | type: atom 34 | path: atom.xml 35 | limit: false 36 | hub: 37 | content: 38 | content_limit: 140 39 | content_limit_delim: ' ' 40 | order_by: -date 41 | icon: 42 | autodiscovery: true 43 | template: 44 | ``` 45 | 46 | > 以上各值的具体含义和作用请参考 [hexojs/hexo-generator-feed](https://github.com/hexojs/hexo-generator-feed) 47 | 48 | :::info 49 | 如若在浏览器中预览时出现乱码问题,考虑使用 `https` 连接。 50 | 51 | 不管是否使用 https 连接,都不会影响正常的 RSS 效果。 52 | ::: 53 | -------------------------------------------------------------------------------- /packages/docs/src/v3.2/hexo/aplayer.md: -------------------------------------------------------------------------------- 1 | # 插入音乐 2 | 3 | 本教程使用 hexo-tag-aplayer 插件来达到在 Hexo 文章中插入音乐的效果 4 | 5 | ## 安装 6 | 7 | 在你的 Hexo 程序根目录(与_config.yml同目录)下 8 | 9 | ```shell 10 | npm install --save hexo-tag-aplayer 11 | ``` 12 | 13 | ## 打开 Meting 14 | 15 | 引入 MetingJS 后,播放器将支持对于 QQ音乐、网易云音乐、虾米、酷狗、百度等平台的音乐播放。 16 | 17 | 在 Hexo 配置文件 `_config.yml` 中设置: 18 | 19 | ``` 20 | aplayer: 21 | meting: true 22 | ``` 23 | 24 | ## 使用 25 | 26 | 接着就可以通过 `{% meting ...%}` 在文章中使用 MetingJS 播放器了: 27 | 28 | ```markdown 29 | 30 | {% meting "60198" "netease" "playlist" %} 31 | 32 | 33 | {% meting "60198" "netease" "playlist" "autoplay" "mutex:false" "listmaxheight:340px" "preload:none" "theme:#ad7a86"%} 34 | ``` 35 | 36 | ## 参数 37 | 38 | 有关 `{% meting %}` 的选项列表如下: 39 | 40 | | 选项 | 默认值 | 描述 | 41 | | ------------- | ---------- | ----------------------------------------------------------- | 42 | | id | **必须值** | 歌曲 id / 播放列表 id / 相册 id / 搜索关键字 | 43 | | server | **必须值** | 音乐平台: `netease`, `tencent`, `kugou`, `xiami`, `baidu` | 44 | | type | **必须值** | `song`, `playlist`, `album`, `search`, `artist` | 45 | | fixed | `false` | 开启固定模式 | 46 | | mini | `false` | 开启迷你模式 | 47 | | loop | `all` | 列表循环模式:`all`, `one`,`none` | 48 | | order | `list` | 列表播放模式: `list`, `random` | 49 | | volume | 0.7 | 播放器音量 | 50 | | lrctype | 0 | 歌词格式类型 | 51 | | listfolded | `false` | 指定音乐播放列表是否折叠 | 52 | | storagename | `metingjs` | LocalStorage 中存储播放器设定的键名 | 53 | | autoplay | `true` | 自动播放,移动端浏览器暂时不支持此功能 | 54 | | mutex | `true` | 该选项开启时,如果同页面有其他 aplayer 播放,该播放器会暂停 | 55 | | listmaxheight | `340px` | 播放列表的最大长度 | 56 | | preload | `auto` | 音乐文件预载入模式,可选项: `none`, `metadata`, `auto` | 57 | | theme | `#ad7a86` | 播放器风格色彩设置 | 58 | -------------------------------------------------------------------------------- /packages/docs/src/v3.2/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | slug: / 3 | sidebar_position: 0 4 | --- 5 | 6 | # 欢迎 7 | 8 | :::info 9 | 10 | If you are a non-Chinese user, I recommend you to use Google Translate or deepl to translate this document. 11 | 12 | ::: 13 | 14 | ## 我们曾经费尽心思折腾我们的主页,却从来没好好整理过我们的收藏夹 15 | 16 | 17 | 小舒同学是省事、高效的新一代新建标签页浏览器插件, 根据你的收藏夹生成新建标签页。 可以作为你的浏览器主页也可以仅仅是新建标签页。 但从此以后再也不需要管理收藏夹的同时还要额外管理一个主页了 18 | 19 | [![](https://user-images.githubusercontent.com/16796652/139290295-4f3b7e8a-3d71-4597-b18c-9ad625bbdc72.png)](https://shu.nexmoe.com/ "![](https://user-images.githubusercontent.com/16796652/139290295-4f3b7e8a-3d71-4597-b18c-9ad625bbdc72.png)") 20 | 21 | | ![homepage](https://user-images.githubusercontent.com/16796652/134768469-52d2426b-5c7c-4a46-8f0e-064361044d88.png) | ![archive](https://user-images.githubusercontent.com/16796652/134768465-a578b70e-38f2-4266-97e7-f0b85bd86348.png) | 22 | | ------------------------------------------------------------ | ------------------------------------------------------------ | 23 | | 首页 | 归档页面 | 24 | | ![友情链接](https://user-images.githubusercontent.com/16796652/134768466-cf580997-1201-48a8-812e-77eb0af6ce59.png) | ![瀑布流](https://user-images.githubusercontent.com/16796652/134768468-86751060-b3bf-43f4-970e-4baa8906e29a.png) | 25 | | 友情链接 | 图片瀑布流 | 26 | 27 | ## 💻 演示 28 | 29 | [视频演示点我](https://www.bilibili.com/video/BV1Gv411J79T) 30 | 31 | 欢迎将你的网站提交到这里来 [点我提交演示站点](https://github.com/theme-nexmoe/hexo-theme-nexmoe/discussions/145) 或 [直接编辑(推荐)](https://github.com/theme-nexmoe/hexo-theme-nexmoe/edit/master/README.md) 32 | 33 | | 站点 | 状态 | 34 | | ------------------------------------- | ------------------------------------------------------------ | 35 | | [折影轻梦](https://nexmoe.com/) | ![折影轻梦](https://img.shields.io/website?url=https://nexmoe.com/) | 36 | | [官方示例](https://hexo-theme-nexmoe-example.pages.dev/) | ![官方示例](https://img.shields.io/website?url=https://hexo-theme-nexmoe-example.pages.dev/) | 37 | | [糖羽仙](https://www.tangyuxian.com/) | ![萌糖官方网站](https://img.shields.io/website?url=https://www.tangyuxian.com/) | 38 | | [深海小涛](https://hexo.xtaolink.cn/) | ![深海小涛](https://img.shields.io/website?url=https://hexo.xtaolink.cn/) | 39 | | [西瓜星 🍉✨](https://suikastar.com/) | ![西瓜星 🍉✨](https://img.shields.io/website?url=https://suikastar.com/) | 40 | | [LittleDeng](https://lde.ng/) | ![LittleDeng](https://img.shields.io/website?url=https://lde.ng/) | 41 | | [fly6022's Blog](https://blog.fly6022.fun) | ![fly6022's Blog](https://img.shields.io/website?url=https://blog.fly6022.fun) | 42 | 43 | ## 💻 贡献者 44 | 45 | ![贡献者](https://opencollective.com/hexo-theme-nexmoe/contributors.svg?width=890&button=false) 46 | 47 | ## 💴 赞助我促进更新 48 | 49 | 有问题可以在留言处提问 50 | ![支付二维码](https://i.dawnlab.me/ee0093ead3ca8145522ba766c3f9a0ee.png) 51 | 52 | ## 🍻 后续更新 53 | 54 | star 以及 issue 是我更新的动力! 55 | 新闻聊天划水群(本群不讨论主题): [482634342 轻惋摸🐟社](https://jq.qq.com/?_wv=1027&k=5CfKHun) 56 | 57 | [![Powered By Vercel](https://www.datocms-assets.com/31049/1618983297-powered-by-vercel.svg "Powered By Vercel")](https://vercel.com/?utm_source=theme-nexmoe&utm_campaign=oss "Powered By Vercel") 58 | -------------------------------------------------------------------------------- /packages/docs/src/v3.2/migration.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 9 3 | --- 4 | 5 | # 迁移至NPM版本 6 | 7 | 1.确保你为 Hexo 5.0 以上版本 8 | 9 | 2.将旧版本中主题目录下的 config.yml 文件重命名为 _config.nexmoe.yml 并移动到 Hexo 根目录下 10 | 11 | 3.删除主题文件夹 12 | 13 | 4.进入本文档快速开始部分按照教程操作 14 | 15 | -------------------------------------------------------------------------------- /packages/docs/src/v3.2/question.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 10 3 | --- 4 | 5 | 6 | 7 | # 遇到问题怎么办? 8 | 9 | ## 1、查阅 Hexo 官方文档 10 | 11 | 大部分用户遇到的问题都是在使用 Hexo 时的问题,查阅搜索 Hexo 官方文档即可找到解决方法 12 | 13 | 请仔细阅读 [Hexo 的官方文档](https://hexo.io/zh-cn/docs/) 14 | 15 | ## 2、搜索本文档 16 | 17 | 本文档内容较少,只解决主题的问题 18 | 19 | ## 3、搜索 GitHub 中的 issue 20 | 21 | 很多问题在issue中也能找到答案 [前往搜索 issue](https://github.com/theme-nexmoe/hexo-theme-nexmoe/issues) 22 | 23 | ## 4、使用搜索引擎 24 | 25 | 搜索引擎往往能帮助我们 26 | 27 | ## 5、社区提问 28 | 29 | 有使用问题请在这里提问: 30 | 31 | 也可以进主题讨论群 614621637:[Hexo Nexmoe 主题](https://jq.qq.com/?_wv=1027&k=1YL6FmUS) 32 | 33 | Telegram 群: 34 | -------------------------------------------------------------------------------- /packages/docs/src/v3.2/specification.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 6 3 | --- 4 | 5 | # 版本升级规范 6 | 7 | 自 2.7.13 版本以后,本主题将按照如下规定发布版本升级 8 | 9 | 1.1.x 版本,代表本次的版本升级为无感升级,不需要修改配置文件,并且不会被直接察觉。多为性能优化或其他细节优化 10 | 11 | 1.x.1 版本,代表本次升级有直观的可被察觉的升级,多为界面升级、新增功能,可能需要修改配置文件 12 | 13 | x.1.1 版本,代表大版本升级,升级易被察觉,需要修改配置文件 14 | -------------------------------------------------------------------------------- /packages/docs/src/v3.2/start.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 1 3 | --- 4 | 5 | # 快速开始 6 | 7 | :::tip 8 | 你也可以用本项目的示例快速起步 [Nexmoe 主题 Hexo 示例,帮助你快速起步](https://github.com/theme-nexmoe/hexo-theme-nexmoe-example) 9 | ::: 10 | 11 | 在使用 Nexmoe 之前,请仔细阅读 [Hexo 的官方文档](https://hexo.io/zh-cn/docs/),完成对 Hexo 的安装,并完成对 `config.yml` 的基本配置(标题、介绍、作者、时区、语言等) 12 | 13 | ## 使用 NPM 安装主题 14 | 15 | 在 Hexo 的根目录下运行 16 | 17 | ```shell 18 | npm i hexo-theme-nexmoe@3.2.13 19 | ``` 20 | 21 | ## 安装 WordCount(必须) 22 | 23 | 其他主题不同,安装 Nexmoe 需要额外的步骤 24 | 25 | 主题默认已经集成了文章【字数统计】、【阅读时长】统计功能,需要WordCount的支持 26 | 27 | 运行如下命令安装 28 | 29 | ```shell 30 | npm i --save hexo-wordcount 31 | ``` 32 | 33 | ## 启用 Nexmoe 34 | 35 | 在 `config.yml` 中,修改 `theme` 的值为 `nexmoe` 36 | 37 | ## 配置 Nexmoe 38 | 39 | 安装好主题后,在 Hexo 根目录下修改 `_config.nexmoe.yml` 40 | 41 | ## 运行 Nexmoe 42 | 43 | 在站点根目录下运行下面的命令在本地启动一个 Hexo Server 44 | 45 | ```shell 46 | hexo s --debug 47 | ``` 48 | 49 | > 在服务启动的过程,注意观察命令行输出是否有任何异常信息,如果你碰到问题,这些信息将帮助他人更好的定位错误。 50 | 51 | 当命令行输出下述内容时说明 Hexo 已经监听在本机的 4000 端口,使用浏览器访问 `http://localhost:4000/` ,检查站点是否正确运行 52 | 53 | ```shell 54 | INFO Hexo is running at http://localhost:4000/. Press Ctrl+C to stop. 55 | ``` 56 | 57 | > 如果你在使用过程中遇到问题,请尝试在文档中进行搜索,或者在 GitHub 上提出 [issue](https://github.com/nexmoe/hexo-theme-nexmoe/issues/new) 58 | 59 | ## 更新 Nexmoe 60 | 61 | 使用 NPM 的 install 命令即可升级 62 | 63 | ```shell 64 | npm i hexo-theme-nexmoe 65 | ``` 66 | 67 | 更新后在 Hexo 根目录下对照`_config.new.yml` 修改 `_config.nexmoe.yml` 68 | -------------------------------------------------------------------------------- /packages/docs/src/v3.2/welcome/ee0093ead3ca8145522ba766c3f9a0ee.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theme-nexmoe/hexo-theme-nexmoe/1e415b5216df229d908cbc1e9cf5f7291e2d4cbb/packages/docs/src/v3.2/welcome/ee0093ead3ca8145522ba766c3f9a0ee.png -------------------------------------------------------------------------------- /packages/docs/src/v4.0/config/icon.md: -------------------------------------------------------------------------------- 1 | # 图标 2 | 3 | :::warning 4 | 文档部分内容可能已过时,请以实际效果为准。 5 | ::: 6 | 7 | ## 主题自带图标 8 | 9 | [IconFont Demonexmoe.com](https://nexmoe.com/lib/iconfont/demo_index.html) 10 | 11 | ## 自己创造 12 | 13 | 1️⃣ 使用阿里的图标库:登陆阿里矢量库注册 14 | 15 | 2️⃣ 图标管理 16 | 17 | 3️⃣ 新建项目 18 | 19 | 4️⃣编辑项目页面 Font Family 参数修改为`nexmoefont` 20 | 21 | 5️⃣ 添加新图标到项目 22 | 23 | 6️⃣ 生成的 css 地址添加到主题配置文件 iconlib 参数的 value 部分 24 | 25 | 7️⃣ 在使用图标部分引用在矢量库的 class 26 | 27 | ![img](icon/2020-04-25_12-19-02.png) 28 | -------------------------------------------------------------------------------- /packages/docs/src/v4.0/config/icon/2020-04-25_12-19-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theme-nexmoe/hexo-theme-nexmoe/1e415b5216df229d908cbc1e9cf5f7291e2d4cbb/packages/docs/src/v4.0/config/icon/2020-04-25_12-19-02.png -------------------------------------------------------------------------------- /packages/docs/src/v4.0/config/search.md: -------------------------------------------------------------------------------- 1 | # 搜索 2 | 3 | :::warning 4 | 文档部分内容可能已过时,请以实际效果为准。 5 | ::: 6 | 7 | ## **开始** 8 | 9 | Nexmoe 现在支持三种搜索引擎,网页搜索引擎(如百度、Bing)、本地搜索和 Swiftype 10 | 11 | ## **使用网页搜索引擎** 12 | 13 | - 打开你的博客配置文件,将`search`项下的`type`设置为`engine`,将`url`改为可用于直接搜索的网址 14 | 15 | 例: 16 | 17 | ```yaml 18 | search: 19 | type: engine 20 | url: https://cn.bing.com/search?q=site:nexmoe.com 21 | ``` 22 | 23 | ## **使用本地搜索** 24 | 25 | - 打开你的博客配置文件,将`search`项下的`type`设置为`local` 26 | 27 | 例: 28 | 29 | ```yaml 30 | search: 31 | type: local 32 | ``` 33 | 34 | - 打开你的站点配置文件,添加以下字段: 35 | 36 | ```yaml 37 | jsonContent: 38 | meta: false 39 | pages: false 40 | posts: 41 | title: true 42 | date: false 43 | path: true 44 | text: true 45 | raw: false 46 | content: false 47 | slug: false 48 | updated: false 49 | comments: false 50 | link: false 51 | permalink: false 52 | excerpt: false 53 | categories: false 54 | tags: false 55 | ``` 56 | 57 | > ⚠请确保你已经安装了`hexo-generator-json-content`插件! 58 | 59 | ## **使用 Swiftype** 60 | 61 | - 打开你的博客配置文件,将`search`项下的`type`设置为`swiftype` 62 | - 转到你的 Swiftype 引擎仪表盘,进入`Install Search`,在你的安装代码(`install code`)的如图位置得到你的`swiftype-id`,并填入博客配置文件`search`项下的`id`项 63 | 64 | ![img](search/a7d385bac726fa4ffcdc3c744e86ad1d127eedaf.jpeg) 65 | 66 | 例: 67 | 68 | ```yaml 69 | search: 70 | type: swiftype 71 | url: ... 72 | id: FwpiTVmsf_TAL1XGiS17 73 | ``` 74 | 75 | [ 76 | ](https://docs.nexmoe.com/hexo-nexmoe/zhu-ti-pei-zhi/icon) 77 | -------------------------------------------------------------------------------- /packages/docs/src/v4.0/config/search/a7d385bac726fa4ffcdc3c744e86ad1d127eedaf.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theme-nexmoe/hexo-theme-nexmoe/1e415b5216df229d908cbc1e9cf5f7291e2d4cbb/packages/docs/src/v4.0/config/search/a7d385bac726fa4ffcdc3c744e86ad1d127eedaf.jpeg -------------------------------------------------------------------------------- /packages/docs/src/v4.0/config/slot.md: -------------------------------------------------------------------------------- 1 | # 插槽 2 | 3 | 您可以将 HTML 添加到插槽区域。如分析、广告、评论系统等。 4 | 5 | ::: warning 6 | 外面用单引号包围时,内部只能使用双引号。 7 | ::: 8 | 9 | ## slotHead 10 | 11 | slotHead 的值将添加到页面的 `<head>` 中。 12 | 您可以在此处添加 Gtag。 13 | 14 | ## slotFooter 15 | 16 | slotFooter 的值将添加到页面末尾。 17 | 您可以在此处添加 AdSense。 18 | 19 | ## slotSidebar 20 | 21 | slotSidebar 的值将添加到侧边栏中。 22 | 23 | ## slotComment 24 | 25 | slotComment 的值将添加到评论区域。 26 | 您可以在此处添加任何注释系统。如 Disqus、Gitment、Gitalk、Valine 27 | 28 | ## slotCopyright 29 | 30 | slotCopyright 的值将添加到版权区域。 31 | 32 | ## slotArticleEnd 33 | 34 | slotArticleEnd 的值将添加到文章末尾。 35 | -------------------------------------------------------------------------------- /packages/docs/src/v4.0/config/style.md: -------------------------------------------------------------------------------- 1 | # 样式 2 | 3 | ## 使用 4 | 5 | 您应该在根目录中的 `_config.nexmoe.yml` 中设置 `customStyles` 的值。 6 | 默认配置如下: 7 | 8 | ```yaml 9 | customStyles: 10 | - custom.css 11 | ``` 12 | 13 | 然后,您应该在名为 `source` 的路径中创建一个名为 `custom.css` 的文件。这样您就可以编写自己的自定义样式。 14 | 15 | ## 默认变量 16 | 17 | ```css 18 | :root { 19 | --gutter: 25px; 20 | --radius: 13px; 21 | --color-primary: #ff4e6a; 22 | --color2: #ff761e; 23 | --color3: #ffb900; 24 | --color4: #33d57a; 25 | --color5: #00dbff; 26 | --color6: #1a98ff; 27 | --color7: #9090ff; 28 | --color-primary-bg: rgba(255,78,106,0.15); 29 | --color2-bg: rgba(255,118,30,0.15); 30 | --color3-bg: rgba(255,185,0,0.15); 31 | --color4-bg: rgba(51,213,122,0.15); 32 | --color5-bg: rgba(0,219,255,0.15); 33 | --color6-bg: rgba(26,152,255,0.15); 34 | --color7-bg: rgba(144,144,255,0.15); 35 | --color-shadow: rgba(161, 177, 204, 0.4); 36 | } 37 | ``` 38 | -------------------------------------------------------------------------------- /packages/docs/src/v4.0/config/yml.md: -------------------------------------------------------------------------------- 1 | # yml 2 | 3 | ## 请参考 4 | 5 | 6 | -------------------------------------------------------------------------------- /packages/docs/src/v4.0/contribution.md: -------------------------------------------------------------------------------- 1 | # 参与贡献 2 | 3 | 如你所见的,这是一个开源的项目,开源的目的就是为了更好的社区维护,我希望任何愿意的人都可以通过任何方式参与到 Nexmoe 的贡献中来。 4 | 5 | ## 贡献者 6 | 7 | ![贡献者](https://opencollective.com/hexo-theme-nexmoe/contributors.svg?width=890&button=false) 8 | 9 | ## 文档 10 | 11 | [完善教程](https://github.com/theme-nexmoe/hexo-docs/) 12 | 13 | 如你所见,这个文档内容很少,因为没有人喜欢写文档。 如果你有充足的时间,并且十分乐意参加到贡献中来,文档无疑是项目中非常重要的一环。 14 | 15 | ## 国际化 16 | 17 | 支持多语言,默认语言为简体中文。 目前中文翻译较全,其他语言翻译不完全,有余力的大佬可以来贡献一下。 18 | 19 | 20 | > 非常欢迎你帮助我们将 Nexmoe 翻译至其他语言! 21 | 22 | ## Pull Request(PR) 23 | 24 | [提交新功能](https://github.com/theme-nexmoe/hexo-theme-nexmoe/pulls) 25 | 26 | ## 参与社区 27 | 28 | 参与社区讨论,同样也是对该项目的支持与贡献 29 | 30 | 31 | -------------------------------------------------------------------------------- /packages/docs/src/v4.0/faq.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 2 3 | --- 4 | 5 | # 常见问题 6 | 7 | ## 语法突出显示 8 | 9 | 在根目录中编辑`_config.yml`以启用语法高亮显示。 10 | 11 | ```yaml 12 | highlight: 13 | enable: true 14 | hljs: true 15 | auto_detect: true 16 | ``` 17 | 18 | 查看更多信息:[Syntax Highlighting | Hexo](https://hexo.io/docs/syntax-highlight#Highlight-js) 19 | -------------------------------------------------------------------------------- /packages/docs/src/v4.0/index.md: -------------------------------------------------------------------------------- 1 | # 快速入门 2 | 3 | :::tip 4 | 你可以参考 https://github.com/nexmoe/nexmoe.com 进行配置 5 | ::: 6 | 7 | 在使用 Nexmoe 之前,您应该阅读 [Hexo Docs](https://hexo.io/docs/index.html),完成 Hexo 的安装并通过编辑 `config.yml` 初始化项目。 8 | 9 | ## 安装 Nexmoe 10 | 11 | 运行以下命令以安装 Nexmoe: 12 | 13 | ```shell 14 | npm install hexo-theme-nexmoe hexo-renderer-inferno 15 | ``` 16 | 17 | ## 使用 Nexmoe 18 | 19 | 在项目的根目录中编辑 `_config.yml`。将名为 `theme` 的键的值更改为 `nexmoe`。 20 | 21 | ## 配置 Nexmoe 22 | 23 | 在项目的根目录中编辑 `_config.nexmoe.yml`。 24 | 25 | ## 运行 Nexmoe 26 | 27 | 使用以下命令运行 Nexmoe: 28 | 29 | ```shell 30 | hexo server --debug 31 | ``` 32 | 33 | :::tip 34 | 在服务启动期间,查看命令行输出中的任何异常消息,这将帮助其他人在遇到问题时更好地查找错误。 35 | ::: 36 | 当命令行输出以下内容时,表示 Hexo 正在本地机器上的端口 4000 上侦听。使用浏览器访问 `http://localhost:4000/` 检查站点是否正常运行 37 | 38 | ```shell 39 | INFO Hexo is running at http://localhost:4000/. Press Ctrl+C to stop. 40 | ``` 41 | 42 | :::tip 43 | 如果您在使用它时遇到问题,请尝试搜索文档或提出 [问题](https://github.com/nexmoe/hexo-theme-nexmoe/issues/new) 在 GitHub 上 44 | ::: 45 | 46 | ## 更新 Nexmoe 47 | 48 | 运行以下命令更新 Nexmoe: 49 | 50 | ```shell 51 | npm update hexo-theme-nexmoe 52 | ``` 53 | 54 | 更新后,您应该在变更日志中看到更改的内容。并编辑 `_config.nexmoe.yml` 以匹配新版本。 55 | -------------------------------------------------------------------------------- /packages/docs/src/v4.0/post/archive.md: -------------------------------------------------------------------------------- 1 | # 归档页面 2 | 3 | :::warning 4 | 文档部分内容可能已过时,请以实际效果为准。 5 | ::: 6 | 7 | ## 使用 8 | 9 | 在站点根目录下的 `source` 文件夹内创建一个 `.md` 文件,文件名和路径根据个人喜好决定,会决定渲染生成以后页面的路径。 10 | 11 | 在文件中写入以下内容: 12 | 13 | ```yaml 14 | --- 15 | title: 文章归档 16 | layout: archives 17 | --- 18 | ``` 19 | 20 | > title 可以更换为自己喜欢的标题 permalink 为本页面地址 21 | 22 | 参考: 23 | 24 | ## 演示 25 | 26 | [文章归档 - 折影轻梦 (nexmoe.com)](https://nexmoe.com/archive.html) 27 | 28 | ![image-20210721123359847](archive/image-20210721123359847.png) 29 | 30 | ## 关于分类的图片 31 | 32 | 有的朋友布置完之后发现自己的页面是这样的: 33 | ![image.png](https://s2.loli.net/2022/04/11/JGga2t5dnyNTDsI.png) 34 | 而大佬的页面长这样: 35 | ![image-20210721123359847-acb36390920d2ff88ad0e8db50fd1e32.png](https://s2.loli.net/2022/04/11/bYvMsq8lLTVxBg4.png) 36 | ~~于是你开始思考。~~ 37 | 好吧,如果你打开主题目录下的`layout\archives.ejs`文件,可以看到这样一段代码: 38 | 39 | ```html 40 |
41 | <% site.categories.sort('name').map(function(category){ %> 42 | <% let coverx = "" %> 43 | <% category.posts.sort('-date').map(function(post){ %> 44 | 45 | <% if(post.cover!==undefined && coverx==""){ %> 46 | <% coverx = post.cover %> 47 | <% } %> 48 | <% }) %> 49 | 50 | 51 |
52 |

<%= category.name %>

53 |
54 | <% }) %> 55 |
56 | ``` 57 | 58 | 通过分析代码,我们发现,分类的图片来自最新的使用该分类的文章的图片。 59 | 其实,可以更改这一行代码`<% if(post.cover!==undefined && coverx==""){ %>`, 删去`&& coverx==""`, 再在`<% let coverx = "" %>`中`coverx = ""`的双引号中间放入一个图片的 URL 或者随机图片 API 的 URL 以作到该分类下文章无单独设置的封面时使用某一/随机图片作为封面。 60 | -------------------------------------------------------------------------------- /packages/docs/src/v4.0/post/archive/image-20210721123359847.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theme-nexmoe/hexo-theme-nexmoe/1e415b5216df229d908cbc1e9cf5f7291e2d4cbb/packages/docs/src/v4.0/post/archive/image-20210721123359847.png -------------------------------------------------------------------------------- /packages/docs/src/v4.0/post/cover.md: -------------------------------------------------------------------------------- 1 | # 文章封面图 2 | 3 | 在 Front-matter 中插入 cover 值,该值可以是图片的远程链接,可以是图片的绝对路径 4 | 5 | 为防止图片抖动,你需要手动填写封面图原长度和高度, 6 | 7 | 最新版本已可忽略长度高度,忽略后会默认图片比例为 16:9 8 | 9 | ```yaml 10 | --- 11 | title: Hello World 12 | date: 2013/7/13 20:46:25 13 | cover: https://i.loli.net/2019/07/21/5d33d5dc1531213134.png 14 | coverWidth: 1200 15 | coverHeight: 750 16 | --- 17 | ``` 18 | -------------------------------------------------------------------------------- /packages/docs/src/v4.0/post/front-matter.md: -------------------------------------------------------------------------------- 1 | # Front-matter 2 | 3 | ## Nexmoe Specific 4 | 5 | | key | des | default | 6 | | :------------ | :----------------------- | :--------------------- | 7 | | `cover` | The cover should be a picture directory or link | config.background.path | 8 | | `coverWidth` | Cover Width | 1600 | 9 | | `coverHeight` | Cover Height | 900 | 10 | | `reprint` | Whether the article is reproduced | false | 11 | 12 | ## Hexo 13 | 14 | [Front-matter | Hexo](https://hexo.io/docs/front-matter) 15 | 16 | -------------------------------------------------------------------------------- /packages/docs/src/v4.0/post/gallery.md: -------------------------------------------------------------------------------- 1 | # Gallery 2 | 3 | This function consists of markdown table and image functions 4 | 5 | ## Use 6 | 7 | Add the following to your `.md` file. 8 | 9 | ```markdown 10 | | ![6ade6c2a3205d620306de34d8f5bc295.png](https://i.dawnlab.me/6ade6c2a3205d620306de34d8f5bc295.png) | ![](https://i.dawnlab.me/b4bea1206475acb925968b76148b0e0a.jpg) | ![a29d9534105a19909dbc1fbece7b0621.png](https://i.dawnlab.me/a29d9534105a19909dbc1fbece7b0621.png) | 11 | | ----------- | ----------- | ----------- | 12 | ``` 13 | -------------------------------------------------------------------------------- /packages/docs/src/v4.0/post/gallery_pro.md: -------------------------------------------------------------------------------- 1 | # Gallery Pro 2 | 3 | ## Use 4 | 5 | Add the following to your `.md` file 6 | 7 | ```markdown 8 | {% gallery %} 9 | ![1](https://cdn.jsdelivr.net/gh/nexmoe/image@latest/20210207192753.jpg) 10 | ![1](https://cdn.jsdelivr.net/gh/nexmoe/image@latest/20210207192754.jpg) 11 | ![1](https://cdn.jsdelivr.net/gh/nexmoe/image@latest/20210207192755.jpg) 12 | ![1](https://cdn.jsdelivr.net/gh/nexmoe/image@latest/20210207192756.jpg) 13 | ![1](https://cdn.jsdelivr.net/gh/nexmoe/image@latest/20210207192757.jpg) 14 | ![1](https://cdn.jsdelivr.net/gh/nexmoe/image@latest/20210207192530.jpg) 15 | ![1](https://cdn.jsdelivr.net/gh/nexmoe/image@latest/20210207192531.jpg) 16 | ![1](https://cdn.jsdelivr.net/gh/nexmoe/image@latest/20210207192532.jpg) 17 | ![1](https://cdn.jsdelivr.net/gh/nexmoe/image@latest/20210207192533.jpg) 18 | ![1](https://cdn.jsdelivr.net/gh/nexmoe/image@latest/20210207192534.jpg) 19 | ![1](https://cdn.jsdelivr.net/gh/nexmoe/image@latest/20210207192535.jpg) 20 | ![1](https://cdn.jsdelivr.net/gh/nexmoe/image@latest/20210207192415.jpg) 21 | ![1](https://cdn.jsdelivr.net/gh/nexmoe/image@latest/20210207192416.jpg) 22 | {% endgallery %} 23 | ``` 24 | 25 | ## Demo 26 | 27 | 28 | -------------------------------------------------------------------------------- /packages/docs/src/v4.0/post/links.md: -------------------------------------------------------------------------------- 1 | # Links 2 | 3 | ## Use 4 | 5 | Add the following to your `.md` file 6 | 7 | ```markdown 8 | {% links shuffle %} 9 | [ 10 | { 11 | "title": "折影轻梦", 12 | "link": "https://nexmoe.com", 13 | "img": "https://www.gravatar.com/avatar/c7fd185f8c967dec20c29c75a40b9e09", 14 | "des": "为热爱战斗着,努力学着变得勇敢" 15 | } 16 | ] 17 | {% endlinks %} 18 | ``` 19 | 20 | ## Demo 21 | 22 | 23 | -------------------------------------------------------------------------------- /packages/docs/src/v4.0/question.md: -------------------------------------------------------------------------------- 1 | # 遇到问题怎么办? 2 | 3 | ## 1、查阅 Hexo 官方文档 4 | 5 | 大部分用户遇到的问题都是在使用 Hexo 时的问题,查阅搜索 Hexo 官方文档即可找到解决方法 6 | 7 | 请仔细阅读 [Hexo 的官方文档](https://hexo.io/zh-cn/docs/) 8 | 9 | ## 2、搜索本文档 10 | 11 | 本文档内容较少,只解决主题的问题 12 | 13 | ## 3、搜索 GitHub 中的 issue 14 | 15 | 很多问题在issue中也能找到答案 [前往搜索 issue](https://github.com/theme-nexmoe/hexo-theme-nexmoe/issues) 16 | 17 | ## 4、使用搜索引擎 18 | 19 | 搜索引擎往往能帮助我们 20 | 21 | ## 5、社区提问 22 | 23 | 有使用问题请在这里提问: 24 | 25 | 也可以进主题讨论群 614621637:[Hexo Nexmoe 主题](https://jq.qq.com/?_wv=1027&k=1YL6FmUS) 26 | -------------------------------------------------------------------------------- /packages/docs/src/v4.2/config/icon.md: -------------------------------------------------------------------------------- 1 | # 图标 2 | 3 | :::warning 4 | 文档部分内容可能已过时,请以实际效果为准。 5 | ::: 6 | 7 | ## 主题自带图标 8 | 9 | [IconFont Demonexmoe.com](https://nexmoe.com/lib/iconfont/demo_index.html) 10 | 11 | ## 自己创造 12 | 13 | 1️⃣ 使用阿里的图标库:登陆阿里矢量库注册 14 | 15 | 2️⃣ 图标管理 16 | 17 | 3️⃣ 新建项目 18 | 19 | 4️⃣编辑项目页面 Font Family 参数修改为`nexmoefont` 20 | 21 | 5️⃣ 添加新图标到项目 22 | 23 | 6️⃣ 生成的 css 地址添加到主题配置文件 iconlib 参数的 value 部分 24 | 25 | 7️⃣ 在使用图标部分引用在矢量库的 class 26 | 27 | ![img](icon/2020-04-25_12-19-02.png) 28 | -------------------------------------------------------------------------------- /packages/docs/src/v4.2/config/icon/2020-04-25_12-19-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theme-nexmoe/hexo-theme-nexmoe/1e415b5216df229d908cbc1e9cf5f7291e2d4cbb/packages/docs/src/v4.2/config/icon/2020-04-25_12-19-02.png -------------------------------------------------------------------------------- /packages/docs/src/v4.2/config/search.md: -------------------------------------------------------------------------------- 1 | # 搜索 2 | 3 | :::warning 4 | 文档部分内容可能已过时,请以实际效果为准。 5 | ::: 6 | 7 | ## **开始** 8 | 9 | Nexmoe 现在支持三种搜索引擎,网页搜索引擎(如百度、Bing)、本地搜索和 Swiftype 10 | 11 | ## **使用网页搜索引擎** 12 | 13 | - 打开你的博客配置文件,将`search`项下的`type`设置为`engine`,将`url`改为可用于直接搜索的网址 14 | 15 | 例: 16 | 17 | ```yaml 18 | search: 19 | type: engine 20 | url: https://cn.bing.com/search?q=site:nexmoe.com 21 | ``` 22 | 23 | ## **使用本地搜索** 24 | 25 | - 打开你的博客配置文件,将`search`项下的`type`设置为`local` 26 | 27 | 例: 28 | 29 | ```yaml 30 | search: 31 | type: local 32 | ``` 33 | 34 | - 打开你的站点配置文件,添加以下字段: 35 | 36 | ```yaml 37 | jsonContent: 38 | meta: false 39 | pages: false 40 | posts: 41 | title: true 42 | date: false 43 | path: true 44 | text: true 45 | raw: false 46 | content: false 47 | slug: false 48 | updated: false 49 | comments: false 50 | link: false 51 | permalink: false 52 | excerpt: false 53 | categories: false 54 | tags: false 55 | ``` 56 | 57 | > ⚠请确保你已经安装了`hexo-generator-json-content`插件! 58 | 59 | ## **使用 Swiftype** 60 | 61 | - 打开你的博客配置文件,将`search`项下的`type`设置为`swiftype` 62 | - 转到你的 Swiftype 引擎仪表盘,进入`Install Search`,在你的安装代码(`install code`)的如图位置得到你的`swiftype-id`,并填入博客配置文件`search`项下的`id`项 63 | 64 | ![img](search/a7d385bac726fa4ffcdc3c744e86ad1d127eedaf.jpeg) 65 | 66 | 例: 67 | 68 | ```yaml 69 | search: 70 | type: swiftype 71 | url: ... 72 | id: FwpiTVmsf_TAL1XGiS17 73 | ``` 74 | 75 | [ 76 | ](https://docs.nexmoe.com/hexo-nexmoe/zhu-ti-pei-zhi/icon) 77 | -------------------------------------------------------------------------------- /packages/docs/src/v4.2/config/search/a7d385bac726fa4ffcdc3c744e86ad1d127eedaf.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theme-nexmoe/hexo-theme-nexmoe/1e415b5216df229d908cbc1e9cf5f7291e2d4cbb/packages/docs/src/v4.2/config/search/a7d385bac726fa4ffcdc3c744e86ad1d127eedaf.jpeg -------------------------------------------------------------------------------- /packages/docs/src/v4.2/config/slot.md: -------------------------------------------------------------------------------- 1 | # 插槽(第三方集成) 2 | 3 | 您可以将 HTML 添加到插槽区域。如分析、广告、评论系统等。 4 | 5 | 建议参考: 6 | 7 | ::: warning 8 | 外面用单引号包围时,内部只能使用双引号。 9 | ::: 10 | 11 | ## slotHead 12 | 13 | slotHead 的值将添加到页面的 `<head>` 中。 14 | 您可以在此处添加 Gtag。 15 | 16 | ## slotFooter 17 | 18 | slotFooter 的值将添加到页面末尾。 19 | 您可以在此处添加 AdSense。 20 | 21 | ## slotSidebar 22 | 23 | slotSidebar 的值将添加到侧边栏中。 24 | 25 | ## slotComment 26 | 27 | slotComment 的值将添加到评论区域。 28 | 您可以在此处添加任何评论系统。如 Disqus、Gitment、Gitalk、Valine 等等... 29 | 30 | ## slotCopyright 31 | 32 | slotCopyright 的值将添加到版权区域。 33 | 34 | ## slotArticleEnd 35 | 36 | slotArticleEnd 的值将添加到文章末尾。 37 | -------------------------------------------------------------------------------- /packages/docs/src/v4.2/config/style.md: -------------------------------------------------------------------------------- 1 | # 样式 2 | 3 | ## 使用 4 | 5 | 您应该在根目录中的 `_config.nexmoe.yml` 中设置 `customStyles` 的值。 6 | 默认配置如下: 7 | 8 | ```yaml 9 | customStyles: 10 | - custom.css 11 | ``` 12 | 13 | 然后,您应该在名为 `source` 的路径中创建一个名为 `custom.css` 的文件。这样您就可以编写自己的自定义样式。 14 | 15 | ## 默认变量 16 | 17 | ```css 18 | :root { 19 | --gutter: 25px; 20 | --radius: 13px; 21 | --color-primary: #ff4e6a; 22 | --color2: #ff761e; 23 | --color3: #ffb900; 24 | --color4: #33d57a; 25 | --color5: #00dbff; 26 | --color6: #1a98ff; 27 | --color7: #9090ff; 28 | --color-primary-bg: rgba(255,78,106,0.15); 29 | --color2-bg: rgba(255,118,30,0.15); 30 | --color3-bg: rgba(255,185,0,0.15); 31 | --color4-bg: rgba(51,213,122,0.15); 32 | --color5-bg: rgba(0,219,255,0.15); 33 | --color6-bg: rgba(26,152,255,0.15); 34 | --color7-bg: rgba(144,144,255,0.15); 35 | --color-shadow: rgba(161, 177, 204, 0.4); 36 | } 37 | ``` 38 | -------------------------------------------------------------------------------- /packages/docs/src/v4.2/config/yml.md: -------------------------------------------------------------------------------- 1 | # yml 2 | 3 | 请打开 Hexo 根目录下的 _config.nexmoe.yml 文件并查看注释进行配置编辑。 4 | -------------------------------------------------------------------------------- /packages/docs/src/v4.2/contribution.md: -------------------------------------------------------------------------------- 1 | # 参与贡献 2 | 3 | 如你所见的,这是一个开源的项目,开源的目的就是为了更好的社区维护,我希望任何愿意的人都可以通过任何方式参与到 Nexmoe 的贡献中来。 4 | 5 | ## 快速起步 6 | 7 | ### 环境 8 | 9 | 项目使用 pnpm 管理,请确认你已拥有 node.js, pnpm 环境 10 | 11 | ### 技能要求 12 | 13 | - JavaScript 14 | - jsx 15 | - stylus 16 | 17 | ### Clone 18 | 19 | 20 | 21 | ### 安装依赖 22 | 23 | ```sh 24 | pnpm i 25 | ``` 26 | 27 | ### 开发模式 28 | 29 | ```sh 30 | pnpm run dev 31 | ``` 32 | 33 | ## 修改文档 34 | 35 | 文档位于 `packages/docs` 36 | 37 | ## 贡献者 38 | 39 | ![贡献者](https://opencollective.com/hexo-theme-nexmoe/contributors.svg?width=890&button=false) 40 | -------------------------------------------------------------------------------- /packages/docs/src/v4.2/faq.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 2 3 | --- 4 | 5 | # 常见问题 6 | 7 | ## 语法突出显示 8 | 9 | 本主题不自动代码高亮处理,以带来更好的性能、个性化体验。 10 | 11 | 你需要手动安装语法高亮插件或是使用 Hexo 自带的。 12 | 13 | ### 方法1(推荐) 14 | 15 | 参考我的方式使用 [Shiki](https://shiki.style/) 进行语法高亮:https://github.com/nexmoe/nexmoe.com/commit/0d1a87ad0addfdfb310111171af58bb7e7906d90 16 | 17 | ### 方法2 18 | 19 | 在根目录中编辑 `_config.yml` 以启用语法高亮显示。 20 | 21 | ```yaml 22 | highlight: 23 | enable: true 24 | hljs: true 25 | auto_detect: true 26 | warp: true 27 | ``` 28 | 29 | 查看更多信息:[Syntax Highlighting | Hexo](https://hexo.io/docs/syntax-highlight#Highlight-js) 30 | 31 | ## Cannot read properties of undefined 32 | 33 | 如果遇到上面字样的报错,请检查你的 Hexo 根目录下是否正常配置了 `_config.nexmoe.yml` 34 | -------------------------------------------------------------------------------- /packages/docs/src/v4.2/index.md: -------------------------------------------------------------------------------- 1 | # 快速入门 2 | 3 | :::tip 4 | 你可以参考 进行配置 5 | ::: 6 | 7 | 在使用 Nexmoe 之前,您应该阅读 [Hexo Docs](https://hexo.io/docs/index.html),完成 Hexo 的安装并通过编辑 `config.yml` 初始化项目。 8 | 9 | ## 安装 Nexmoe 10 | 11 | 运行以下命令以安装 Nexmoe: 12 | 13 | ```shell 14 | npm install hexo-theme-nexmoe hexo-renderer-inferno 15 | ``` 16 | 17 | ## 使用 Nexmoe 18 | 19 | 1. 方法1 在项目的根目录中编辑 `_config.yml`。将名为 `theme` 的键的值更改为 `nexmoe`。 20 | 2. 方法2 21 | 22 | ```shell 23 | hexo config theme nexmoe 24 | ``` 25 | 26 | ## 配置 Nexmoe 27 | 28 | 在项目的根目录中编辑 `_config.nexmoe.yml`。 29 | 30 | ## 运行 Nexmoe 31 | 32 | 使用以下命令运行 Nexmoe: 33 | 34 | ```shell 35 | hexo server --debug 36 | ``` 37 | 38 | :::tip 39 | 在服务启动期间,查看命令行输出中的任何异常消息,这将帮助其他人在遇到问题时更好地查找错误。 40 | ::: 41 | 当命令行输出以下内容时,表示 Hexo 正在本地机器上的端口 4000 上侦听。使用浏览器访问 `http://localhost:4000/` 检查站点是否正常运行 42 | 43 | ```shell 44 | INFO Hexo is running at http://localhost:4000/. Press Ctrl+C to stop. 45 | ``` 46 | 47 | :::tip 48 | 如果您在使用它时遇到问题,请尝试搜索文档或提出 [问题](https://github.com/nexmoe/hexo-theme-nexmoe/issues/new) 在 GitHub 上 49 | ::: 50 | 51 | ## 更新 Nexmoe 52 | 53 | 运行以下命令更新 Nexmoe: 54 | 55 | ```shell 56 | npm update hexo-theme-nexmoe 57 | ``` 58 | 59 | 更新后,您应该在变更日志中看到更改的内容。并编辑 `_config.nexmoe.yml` 以匹配新版本。 60 | 61 | 配置文件在此处参考: 62 | -------------------------------------------------------------------------------- /packages/docs/src/v4.2/post/archive.md: -------------------------------------------------------------------------------- 1 | # 归档页面 2 | 3 | ## 使用 4 | 5 | 在站点根目录下的 `source` 文件夹内创建一个 `.md` 文件,文件名和路径根据个人喜好决定,会决定渲染生成以后页面的路径。 6 | 7 | 在文件中写入以下内容: 8 | 9 | ```yaml 10 | --- 11 | title: 文章归档 12 | layout: archives 13 | --- 14 | ``` 15 | 16 | > title 可以更换为自己喜欢的标题 permalink 为本页面地址 17 | 18 | 参考: 19 | 20 | ## 演示 21 | 22 | 源码: 23 | 24 | [文章归档 - 折影轻梦 (nexmoe.com)](https://nexmoe.com/archive.html) 25 | 26 | ![image-20210721123359847](archive/image-20210721123359847.png) 27 | 28 | ## 关于分类的图片 29 | 30 | 分类的图片来自该分类最新文章的图片。 31 | 32 | ### 解析 33 | 34 | 有的朋友布置完之后发现自己的页面是这样的: 35 | ![image.png](https://s2.loli.net/2022/04/11/JGga2t5dnyNTDsI.png) 36 | 而大佬的页面长这样: 37 | ![image-20210721123359847-acb36390920d2ff88ad0e8db50fd1e32.png](https://s2.loli.net/2022/04/11/bYvMsq8lLTVxBg4.png) 38 | ~~于是你开始思考。~~ 39 | 好吧,如果你打开主题目录下的`layout\archives.ejs`文件,可以看到这样一段代码: 40 | 41 | ```html 42 |
43 | <% site.categories.sort('name').map(function(category){ %> 44 | <% let coverx = "" %> 45 | <% category.posts.sort('-date').map(function(post){ %> 46 | 47 | <% if(post.cover!==undefined && coverx==""){ %> 48 | <% coverx = post.cover %> 49 | <% } %> 50 | <% }) %> 51 | 52 | 53 |
54 |

<%= category.name %>

55 |
56 | <% }) %> 57 |
58 | ``` 59 | 60 | 通过分析代码,我们发现,分类的图片来自最新的使用该分类的文章的图片。 61 | 其实,可以更改这一行代码`<% if(post.cover!==undefined && coverx==""){ %>`, 删去`&& coverx==""`, 再在`<% let coverx = "" %>`中`coverx = ""`的双引号中间放入一个图片的 URL 或者随机图片 API 的 URL 以作到该分类下文章无单独设置的封面时使用某一/随机图片作为封面。 62 | -------------------------------------------------------------------------------- /packages/docs/src/v4.2/post/archive/image-20210721123359847.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theme-nexmoe/hexo-theme-nexmoe/1e415b5216df229d908cbc1e9cf5f7291e2d4cbb/packages/docs/src/v4.2/post/archive/image-20210721123359847.png -------------------------------------------------------------------------------- /packages/docs/src/v4.2/post/cover.md: -------------------------------------------------------------------------------- 1 | # 文章封面图 2 | 3 | 在 Front-matter 中插入 cover 值,该值可以是图片的远程链接,可以是图片的绝对路径 4 | 5 | 为防止图片抖动,你需要手动填写封面图原长度和高度, 6 | 7 | 最新版本已可忽略长度高度,忽略后会默认图片比例为 16:9 8 | 9 | ```yaml 10 | --- 11 | title: Hello World 12 | date: 2013/7/13 20:46:25 13 | cover: https://i.loli.net/2019/07/21/5d33d5dc1531213134.png 14 | coverWidth: 1200 15 | coverHeight: 750 16 | --- 17 | ``` 18 | -------------------------------------------------------------------------------- /packages/docs/src/v4.2/post/front-matter.md: -------------------------------------------------------------------------------- 1 | # Front-matter 2 | 3 | ## Nexmoe Specific 4 | 5 | | key | des | default | 6 | | :------------ | :----------------------- | :--------------------- | 7 | | `cover` | The cover should be a picture directory or link | config.background.path | 8 | | `coverWidth` | Cover Width | 1600 | 9 | | `coverHeight` | Cover Height | 900 | 10 | | `reprint` | Whether the article is reproduced | false | 11 | 12 | ## Hexo 13 | 14 | [Front-matter | Hexo](https://hexo.io/docs/front-matter) 15 | 16 | -------------------------------------------------------------------------------- /packages/docs/src/v4.2/post/gallery.md: -------------------------------------------------------------------------------- 1 | # Gallery 2 | 3 | This function consists of markdown table and image functions 4 | 5 | ## Use 6 | 7 | Add the following to your `.md` file. 8 | 9 | ```markdown 10 | | ![6ade6c2a3205d620306de34d8f5bc295.png](https://i.dawnlab.me/6ade6c2a3205d620306de34d8f5bc295.png) | ![](https://i.dawnlab.me/b4bea1206475acb925968b76148b0e0a.jpg) | ![a29d9534105a19909dbc1fbece7b0621.png](https://i.dawnlab.me/a29d9534105a19909dbc1fbece7b0621.png) | 11 | | ----------- | ----------- | ----------- | 12 | ``` 13 | -------------------------------------------------------------------------------- /packages/docs/src/v4.2/post/gallery_pro.md: -------------------------------------------------------------------------------- 1 | # Gallery Pro 2 | 3 | ## Use 4 | 5 | Add the following to your `.md` file 6 | 7 | ```markdown 8 | {% gallery %} 9 | ![1](https://cdn.jsdelivr.net/gh/nexmoe/image@latest/20210207192753.jpg) 10 | ![1](https://cdn.jsdelivr.net/gh/nexmoe/image@latest/20210207192754.jpg) 11 | ![1](https://cdn.jsdelivr.net/gh/nexmoe/image@latest/20210207192755.jpg) 12 | ![1](https://cdn.jsdelivr.net/gh/nexmoe/image@latest/20210207192756.jpg) 13 | ![1](https://cdn.jsdelivr.net/gh/nexmoe/image@latest/20210207192757.jpg) 14 | ![1](https://cdn.jsdelivr.net/gh/nexmoe/image@latest/20210207192530.jpg) 15 | ![1](https://cdn.jsdelivr.net/gh/nexmoe/image@latest/20210207192531.jpg) 16 | ![1](https://cdn.jsdelivr.net/gh/nexmoe/image@latest/20210207192532.jpg) 17 | ![1](https://cdn.jsdelivr.net/gh/nexmoe/image@latest/20210207192533.jpg) 18 | ![1](https://cdn.jsdelivr.net/gh/nexmoe/image@latest/20210207192534.jpg) 19 | ![1](https://cdn.jsdelivr.net/gh/nexmoe/image@latest/20210207192535.jpg) 20 | ![1](https://cdn.jsdelivr.net/gh/nexmoe/image@latest/20210207192415.jpg) 21 | ![1](https://cdn.jsdelivr.net/gh/nexmoe/image@latest/20210207192416.jpg) 22 | {% endgallery %} 23 | ``` 24 | 25 | ## Demo 26 | 27 | 28 | -------------------------------------------------------------------------------- /packages/docs/src/v4.2/post/links.md: -------------------------------------------------------------------------------- 1 | # 友情链接 2 | 3 | ## Use 4 | 5 | Add the following to your `.md` file 6 | 7 | ```markdown 8 | {% links shuffle %} 9 | [ 10 | { 11 | "title": "折影轻梦", 12 | "link": "https://nexmoe.com", 13 | "img": "https://www.gravatar.com/avatar/c7fd185f8c967dec20c29c75a40b9e09", 14 | "des": "为热爱战斗着,努力学着变得勇敢" 15 | } 16 | ] 17 | {% endlinks %} 18 | ``` 19 | 20 | ## Demo 21 | 22 | 预览: 23 | 24 | 源码: 25 | -------------------------------------------------------------------------------- /packages/docs/src/v4.2/question.md: -------------------------------------------------------------------------------- 1 | # 遇到问题怎么办? 2 | 3 | ## 1、查阅 Hexo 官方文档 4 | 5 | 大部分用户遇到的问题都是在使用 Hexo 时的问题,查阅搜索 Hexo 官方文档即可找到解决方法 6 | 7 | 请仔细阅读 [Hexo 的官方文档](https://hexo.io/zh-cn/docs/) 8 | 9 | ## 2、搜索本文档 10 | 11 | 本文档内容较少,只解决主题的问题 12 | 13 | ## 3、搜索 GitHub 中的 issue 14 | 15 | 很多问题在issue中也能找到答案 [前往搜索 issue](https://github.com/theme-nexmoe/hexo-theme-nexmoe/issues) 16 | 17 | ## 4、使用搜索引擎 18 | 19 | 搜索引擎往往能帮助我们 20 | 21 | ## 5、社区提问 22 | 23 | 有使用问题请在这里提问: 24 | 25 | 也可以进主题讨论群 614621637:[Hexo Nexmoe 主题](https://jq.qq.com/?_wv=1027&k=1YL6FmUS) 26 | -------------------------------------------------------------------------------- /packages/docs/src/vite.config.ts: -------------------------------------------------------------------------------- 1 | /** @type {import('vite').UserConfig} */ 2 | export default { 3 | ssr: { noExternal: ['landify'] }, 4 | } 5 | -------------------------------------------------------------------------------- /packages/docs/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "outDir": "dist", 4 | "target": "esnext", 5 | "module": "esnext", 6 | "moduleResolution": "node", 7 | "esModuleInterop": true, 8 | "resolveJsonModule": true, 9 | "allowJs": true, 10 | "strict": true, 11 | "jsx": "preserve", 12 | "baseUrl": ".", 13 | "paths": { 14 | "/@theme/*": [".vitepress/theme/*"] 15 | } 16 | }, 17 | "include": ["env.d.ts", "src/**/*", ".vitepress/**/*"] 18 | } 19 | -------------------------------------------------------------------------------- /packages/theme/include/README.md: -------------------------------------------------------------------------------- 1 | Refer from: -------------------------------------------------------------------------------- /packages/theme/include/config.js: -------------------------------------------------------------------------------- 1 | /* eslint no-process-exit: "off" */ 2 | const fs = require('fs'); 3 | const path = require('path'); 4 | // const util = require('util'); 5 | // const crypto = require('crypto'); 6 | // const yaml = require('hexo-component-inferno/lib/util/yaml'); 7 | // const { Migrator } = require('hexo-component-inferno/lib/core/migrate'); 8 | // const { SchemaLoader } = require('hexo-component-inferno/lib/core/schema'); 9 | const { yellow } = require('./util/console'); 10 | 11 | // function loadThemeConfig(hexo, cfgPaths) { 12 | // const configs = cfgPaths.map(cfgPath => fs.readFileSync(cfgPath)) 13 | // .map(cfgPath => yaml.parse(cfgPath)); 14 | // return Object.assign({}, ...configs, hexo.config.theme_config); 15 | // } 16 | 17 | // function generateThemeConfigFile(schema, cfgPath) { 18 | // const defaultValue = schema.getDefaultValue(); 19 | // fs.writeFileSync(cfgPath, defaultValue.toYaml()); 20 | // } 21 | 22 | // function hashConfigFile(cfgPath) { 23 | // const content = fs.readFileSync(cfgPath); 24 | // return crypto.createHash('md5').update(content).digest('hex'); 25 | // } 26 | 27 | function checkConfig(hexo) { 28 | if (!process.argv.includes('--nexmoe-dont-check-config')) { 29 | console.info('[Nexmoe] Checking theme configurations'); 30 | 31 | const themeSiteCfg = path.join(hexo.base_dir, '_config.nexmoe.yml'); 32 | const themeDirCfg = path.join(hexo.theme_dir, '_config.yml'); 33 | const themeCfgPaths = [themeDirCfg, themeSiteCfg].filter(cfgPath => fs.existsSync(cfgPath)); 34 | // const themeSiteCfgExample = themeSiteCfg + '.example'; 35 | 36 | // const schemaDir = path.join(hexo.theme_dir, 'include/schema/'); 37 | // const loader = SchemaLoader.load(require(path.join(schemaDir, 'config.json')), schemaDir); 38 | // const schema = loader.getSchema('/config.json'); 39 | 40 | if (!process.argv.includes('--nexmoe-dont-generate-config')) { 41 | if (!themeCfgPaths.length) { 42 | console.warn('None of the following configuration files is found:'); 43 | console.warn(`- ${yellow(themeSiteCfg)}`); 44 | console.warn(`- ${yellow(themeDirCfg)}`); 45 | console.info('Generating theme configuration file...'); 46 | // generateThemeConfigFile(schema, themeSiteCfg); 47 | fs.writeFileSync(themeSiteCfg, fs.readFileSync(path.join(hexo.theme_dir, 'source/_config.yml'))); 48 | themeCfgPaths.push(themeSiteCfg); 49 | console.info(`${yellow(themeSiteCfg)} created successfully.`); 50 | console.info('To skip configuration generation, use "--nexmoe-dont-generate-config".'); 51 | } 52 | } 53 | 54 | // let cfg = loadThemeConfig(hexo, themeCfgPaths); 55 | 56 | // if (!process.argv.includes('--nexmoe-dont-upgrade-config')) { 57 | // const migrator = new Migrator(require(path.join(hexo.theme_dir, 'include/migration/head'))); 58 | // if (cfg.version && migrator.isOudated(cfg.version)) { 59 | // console.warn(`Your theme configuration is outdated (${cfg.version} < ${migrator.getLatestVersion()}).`); 60 | // console.info('To skip the configuration upgrade, use "--nexmoe-dont-upgrade-config".'); 61 | 62 | // console.info('Backing up theme configuration files...'); 63 | // for (const cfgPath of themeCfgPaths) { 64 | // const backupPath = cfgPath + '.' + hashConfigFile(cfgPath); 65 | // const relCfgPath = path.relative(hexo.base_dir, cfgPath); 66 | // const relBackupPath = path.relative(hexo.base_dir, backupPath); 67 | // fs.renameSync(cfgPath, backupPath); 68 | // console.info(`${yellow(relCfgPath)} => ${yellow(relBackupPath)}`); 69 | // } 70 | 71 | // console.info('Upgrading theme configurations...'); 72 | // cfg = migrator.migrate(cfg); 73 | // fs.writeFileSync(themeSiteCfg, yaml.stringify(cfg)); 74 | // console.info(`Theme configurations are written to ${yellow(themeSiteCfg)}.`); 75 | 76 | // generateThemeConfigFile(schema, themeSiteCfgExample); 77 | // console.info(`Example configurations is at ${yellow(themeSiteCfgExample)}.`); 78 | // } 79 | // } 80 | 81 | // const validation = schema.validate(cfg); 82 | // if (validation !== true) { 83 | // console.warn('Theme configurations failed one or more checks.'); 84 | // console.warn('nexmoe may still run, but you will encounter unexcepted results.'); 85 | // console.warn('Here is some information for you to correct the configuration file.'); 86 | // console.warn(util.inspect(validation)); 87 | // } 88 | 89 | } 90 | } 91 | 92 | module.exports = hexo => { 93 | try { 94 | checkConfig(hexo); 95 | } catch (e) { 96 | console.error(e); 97 | console.error('Theme configuration checking failed.'); 98 | console.info('You may use \'--nexmoe-dont-check-config\' to skip configuration checking.'); 99 | process.exit(-1); 100 | } 101 | }; 102 | -------------------------------------------------------------------------------- /packages/theme/include/dependency.js: -------------------------------------------------------------------------------- 1 | /* eslint no-process-exit: "off" */ 2 | const semver = require('semver'); 3 | const packageInfo = require('../package.json'); 4 | const { yellow, red, green } = require('./util/console'); 5 | 6 | module.exports = hexo => { 7 | function checkDependency(name, reqVer) { 8 | try { 9 | require.resolve(name); 10 | const version = require(name + '/package.json').version; 11 | if (!semver.satisfies(version, reqVer)) { 12 | console.error(`Package ${yellow(name)}'s version (${yellow(version)}) does not satisfy the required version (${red(reqVer)}).`); 13 | return false; 14 | } 15 | return true; 16 | } catch (e) { 17 | console.error(`Package ${yellow(name)} is not installed.`); 18 | } 19 | return false; 20 | } 21 | 22 | console.info('[Nexmoe] Checking package dependencies'); 23 | const dependencies = Object.assign({}, packageInfo.dependencies); 24 | const missingDeps = Object.keys(dependencies) 25 | .filter(name => !checkDependency(name, dependencies[name])); 26 | if (missingDeps && missingDeps.length) { 27 | console.error('Please install the missing dependencies your Hexo site root directory:'); 28 | console.error(green('npm install --save ' + missingDeps.map(name => `${name}@${dependencies[name]}`).join(' '))); 29 | console.error('or:'); 30 | console.error(green('yarn add ' + missingDeps.map(name => `${name}@${dependencies[name]}`).join(' '))); 31 | process.exit(-1); 32 | } 33 | }; 34 | -------------------------------------------------------------------------------- /packages/theme/include/register.js: -------------------------------------------------------------------------------- 1 | module.exports = hexo => { 2 | console.info('=== Registering Hexo extensions ==='); 3 | require('hexo-component-inferno/lib/hexo/filter/locals')(hexo); 4 | require('hexo-component-inferno/lib/hexo/generator/assets')(hexo); 5 | require('hexo-component-inferno/lib/hexo/generator/insight')(hexo); 6 | require('hexo-component-inferno/lib/hexo/generator/categories')(hexo); 7 | require('hexo-component-inferno/lib/hexo/generator/category')(hexo); 8 | require('hexo-component-inferno/lib/hexo/generator/manifest')(hexo); 9 | require('hexo-component-inferno/lib/hexo/generator/tags')(hexo); 10 | require('hexo-component-inferno/lib/hexo/helper/cdn')(hexo); 11 | require('hexo-component-inferno/lib/hexo/helper/page')(hexo); 12 | require('hexo-component-inferno/lib/hexo/tag/message')(hexo); 13 | require('hexo-component-inferno/lib/hexo/tag/tabs')(hexo); 14 | require('hexo-component-inferno/lib/core/view').init(hexo); 15 | }; 16 | -------------------------------------------------------------------------------- /packages/theme/include/util/console.js: -------------------------------------------------------------------------------- 1 | let chalk; 2 | try { 3 | chalk = require('chalk'); // eslint-disable-line node/no-extraneous-require 4 | } catch (e) { } 5 | 6 | module.exports = new Proxy({}, { 7 | get(obj, prop) { 8 | if (chalk) { 9 | return chalk[prop]; 10 | } 11 | return function() { 12 | return arguments.length === 1 ? arguments[0] : arguments; 13 | }; 14 | } 15 | }); 16 | -------------------------------------------------------------------------------- /packages/theme/index.js: -------------------------------------------------------------------------------- 1 | // 这个文件用来防止 hexo 5.0.0 使用 "hexo clean" 命令报错。 2 | // This file is used to prevent hexo 5.0.0 from using "hexo clean" command error. 3 | -------------------------------------------------------------------------------- /packages/theme/languages/default.yml: -------------------------------------------------------------------------------- 1 | continue: More 2 | nav: 3 | home: Home 4 | 5 | search: Search 6 | archive: Archive 7 | recent_posts: Recent Posts 8 | categories: Categories 9 | hitokoto: Hitokoto 10 | tagcloud: Tagcloud 11 | social: Social 12 | 13 | count: 14 | articles: Articles 15 | tags: Tags 16 | categories: Categories 17 | 18 | copyright: 19 | author: Author 20 | permalink: Link -------------------------------------------------------------------------------- /packages/theme/languages/en.yml: -------------------------------------------------------------------------------- 1 | continue: View More... 2 | nav: 3 | home: Home 4 | search: Search 5 | archive: Archive 6 | recent_posts: Recent Posts 7 | categories: Categories 8 | hitokoto: 一言 9 | tagcloud: Tag Cloud 10 | social: Social Button 11 | count: 12 | articles: Articles 13 | tags: Tags 14 | categories: Categories 15 | copyright: 16 | author: Author 17 | permalink: Link 18 | -------------------------------------------------------------------------------- /packages/theme/languages/it.yml: -------------------------------------------------------------------------------- 1 | continue: Mostra di più 2 | nav: 3 | home: Home 4 | search: Cerca 5 | archive: Archivio 6 | recent_posts: Post recenti 7 | categories: Categorie 8 | hitokoto: 一言 9 | tagcloud: Tagcloud 10 | social: Social 11 | count: 12 | articles: Articoli 13 | tags: Tags 14 | categories: Categorie 15 | copyright: 16 | author: Autore 17 | permalink: Link 18 | -------------------------------------------------------------------------------- /packages/theme/languages/ja.yml: -------------------------------------------------------------------------------- 1 | continue: もっと見る 2 | nav: 3 | home: ホームに戻る 4 | search: 検索 5 | archive: 記事のアーカイブ 6 | recent_posts: 最新記事 7 | categories: カテゴリ管理 8 | hitokoto: 一言 9 | tagcloud: タグクラウド 10 | social: ソーシャルボタン 11 | count: 12 | articles: 記事 13 | tags: タグ 14 | categories: カテゴリ 15 | copyright: 16 | author: オリジナルの投稿者 17 | permalink: 本文リンク 18 | -------------------------------------------------------------------------------- /packages/theme/languages/zh-CN.yml: -------------------------------------------------------------------------------- 1 | continue: 查看更多 2 | nav: 3 | home: 回到首页 4 | 5 | search: 搜索 6 | archive: 文章归档 7 | recent_posts: 最新文章 8 | categories: 文章分类 9 | hitokoto: 一言 10 | tagcloud: 标签云 11 | social: 社交按钮 12 | 13 | count: 14 | articles: 文章 15 | tags: 标签 16 | categories: 分类 17 | 18 | copyright: 19 | author: 本文作者 20 | permalink: 本文链接 -------------------------------------------------------------------------------- /packages/theme/languages/zh-HK.yml: -------------------------------------------------------------------------------- 1 | continue: 查看更多 2 | nav: 3 | home: 回到首页 4 | search: 搜索 5 | archive: 文章归档 6 | recent_posts: 最新文章 7 | categories: 文章分类 8 | hitokoto: 壹言 9 | tagcloud: 标签云 10 | social: 社交按钮 11 | count: 12 | articles: 文章 13 | tags: 标签 14 | categories: 分类 15 | copyright: 16 | author: 本文作者 17 | permalink: 本文链接 18 | -------------------------------------------------------------------------------- /packages/theme/languages/zh-TW.yml: -------------------------------------------------------------------------------- 1 | continue: 查看更多 2 | nav: 3 | home: 回到首頁 4 | search: 搜尋 5 | archive: 所有文章 6 | recent_posts: 最新文章 7 | categories: 文章分類 8 | hitokoto: 壹言 9 | tagcloud: 標籤雲 10 | social: 社交平台 11 | count: 12 | articles: 文章 13 | tags: 標籤 14 | categories: 分類 15 | copyright: 16 | author: 本文作者 17 | permalink: 本文連結 18 | -------------------------------------------------------------------------------- /packages/theme/languages/zh.yml: -------------------------------------------------------------------------------- 1 | continue: 查看更多 2 | nav: 3 | home: 回到首頁 4 | search: 搜尋 5 | archive: 文章歸檔 6 | recent_posts: 最新文章 7 | categories: 文章分類 8 | hitokoto: 一言 9 | tagcloud: 標簽雲 10 | social: 社交按鈕 11 | count: 12 | articles: 文章 13 | tags: 標籤 14 | categories: 類別 15 | copyright: 16 | author: 博主 17 | permalink: 文章連結 18 | -------------------------------------------------------------------------------- /packages/theme/layout/_index/list.ejs: -------------------------------------------------------------------------------- 1 | <% page.posts.each(function (page) { %> 2 |
3 | 4 | <% if (page.cover){ %> 5 |
6 | <%= page.title %> 7 |

<%= page.title %>

8 |
9 | <%} else{ %> 10 |
11 | <%= page.title %> 12 |

<%= page.title %>

13 |
14 | <% } %> 15 |
16 | 17 | <%- partial('_partial/_post/meta', {page: page}) %> 18 | 19 |
20 | <%- page.excerpt %> 21 |
22 |
23 | <% }) %> -------------------------------------------------------------------------------- /packages/theme/layout/_layout/nexmoe/body.jsx: -------------------------------------------------------------------------------- 1 | const { Component, Fragment } = require('inferno'); 2 | 3 | module.exports = class extends Component { 4 | render() { 5 | const { partial } = this.props; 6 | const Content = require('./content'); 7 | const Footer = require('./footer'); 8 | 9 | return ( 10 | 11 |
17 |
18 | 19 |
25 |
26 | 27 | 30 |
31 | ); 32 | } 33 | }; 34 | -------------------------------------------------------------------------------- /packages/theme/layout/_layout/nexmoe/content.jsx: -------------------------------------------------------------------------------- 1 | const { Component } = require('inferno'); 2 | 3 | module.exports = class extends Component { 4 | render() { 5 | const { body } = this.props; 6 | 7 | return ( 8 |
12 | ); 13 | } 14 | }; 15 | -------------------------------------------------------------------------------- /packages/theme/layout/_layout/nexmoe/footer.jsx: -------------------------------------------------------------------------------- 1 | const { Component, Fragment } = require('inferno'); 2 | 3 | module.exports = class extends Component { 4 | render() { 5 | // const { body } = this.props; 6 | 7 | return ( 8 | 9 | ); 10 | } 11 | }; 12 | -------------------------------------------------------------------------------- /packages/theme/layout/_layout/nexmoe/header.ejs: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 | <%= config.author || config.title %> 5 | 6 |
7 |
8 |
<%= __('count.articles') %><%= site.posts.length %>
9 |
<%= __('count.tags') %><%= site.tags.length %>
10 |
<%= __('count.categories') %><%= site.categories.length %>
11 |
12 |
13 | <% for (name in theme.menu) { %> 14 | 15 | 16 |
17 | <%= name %> 18 |
19 |
20 | <% } %> 21 |
22 | 23 | <% theme.widgets.forEach(function(widget){ %> 24 | <% if(widget.enable){ %> 25 | <%- partial('_widget/' + widget.name, {options: widget.options}) %> 26 | <% }}) %> 27 | 28 | 34 |
-------------------------------------------------------------------------------- /packages/theme/layout/_layout/xiaoshu/body.jsx: -------------------------------------------------------------------------------- 1 | const { Component, Fragment } = require('inferno'); 2 | 3 | module.exports = class extends Component { 4 | render() { 5 | const { partial } = this.props; 6 | const Header = require('./header'); 7 | const Content = require('./content'); 8 | const Footer = require('./footer'); 9 | 10 | return ( 11 | 12 |
13 |
14 |
15 |
16 |
17 | 18 |
24 |
25 |
26 | 27 | 30 |
31 | ); 32 | } 33 | }; 34 | -------------------------------------------------------------------------------- /packages/theme/layout/_layout/xiaoshu/content.jsx: -------------------------------------------------------------------------------- 1 | const { Component } = require('inferno'); 2 | 3 | module.exports = class extends Component { 4 | render() { 5 | const { body } = this.props; 6 | 7 | return
; 8 | } 9 | }; 10 | -------------------------------------------------------------------------------- /packages/theme/layout/_layout/xiaoshu/footer.jsx: -------------------------------------------------------------------------------- 1 | const { Component, Fragment } = require('inferno'); 2 | 3 | module.exports = class extends Component { 4 | render() { 5 | const { config, date, theme, __ } = this.props; 6 | 7 | return ( 8 | 9 |
10 | © {date(new Date(), 'YYYY')}{' '} 11 | {config.author || config.title} 12 | {__('Powered by')} 13 | 14 | Hexo 15 | 16 | & 17 | 21 | Nexmoe 22 | 23 |
26 |
27 |
28 | ); 29 | } 30 | }; 31 | -------------------------------------------------------------------------------- /packages/theme/layout/_layout/xiaoshu/header.jsx: -------------------------------------------------------------------------------- 1 | const { Component, Fragment } = require('inferno'); 2 | 3 | module.exports = class extends Component { 4 | render() { 5 | const { config, date, theme, __ } = this.props; 6 | 7 | return ( 8 | 9 |
10 | © {date(new Date(), 'YYYY')}{' '} 11 | {config.author || config.title} 12 | {__('Powered by')} 13 | 14 | Hexo 15 | 16 | & 17 | 21 | Nexmoe 22 | 23 |
26 |
27 |
28 | ); 29 | } 30 | }; 31 | -------------------------------------------------------------------------------- /packages/theme/layout/_partial/_post/copyright.ejs: -------------------------------------------------------------------------------- 1 | <% if (page.hide_copyright !== true && theme.slotCopyright || page.copyright) { %> 2 |
3 | <%- __('copyright.author') %>:<%= config.author %>
4 | <%- __('copyright.permalink') %>:<%- link_to(page.permalink, page.permalink, {external: true}) %>
5 | <% if (page.copyright) { %> 6 | <%- page.copyright %> 7 | <% } else { %> 8 | <%- theme.slotCopyright %> 9 | <% } %> 10 |
11 | <% } %> 12 | -------------------------------------------------------------------------------- /packages/theme/layout/_partial/_post/meta.ejs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/theme/layout/_partial/_post/tag.ejs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/theme/layout/_partial/_post/word-count.ejs: -------------------------------------------------------------------------------- 1 | <% if (theme.function.wordCount){ %> 2 | 约<%- wordcount(post.content) %>字 3 | 预计需要<%- min2read(post.content, {cn: 300, en: 160}) %>分钟 4 | <% } %> -------------------------------------------------------------------------------- /packages/theme/layout/_partial/background.jsx: -------------------------------------------------------------------------------- 1 | const { Component } = require('inferno'); 2 | 3 | module.exports = class extends Component { 4 | render() { 5 | const { config, theme, url_for } = this.props; 6 | 7 | return ( 8 |
9 |
13 |
14 |
15 | 21 | 22 | 23 |
24 | 29 | {config.author 33 | 34 |
35 |
36 |
37 | ); 38 | } 39 | }; 40 | -------------------------------------------------------------------------------- /packages/theme/layout/_partial/head.ejs: -------------------------------------------------------------------------------- 1 | <% 2 | var title = page.title; 3 | 4 | if (is_archive()){ 5 | title = __('archive'); 6 | 7 | if (is_month()){ 8 | title += ':' + page.year + '/' + page.month; 9 | } else if (is_year()){ 10 | title += ':' + page.year; 11 | } 12 | } else if (is_category()){ 13 | title = __('count.categories') + ':' + page.category; 14 | } else if (is_tag()){ 15 | title = __('count.tags') + ':' + page.tag; 16 | } 17 | %> 18 | <% if (title){ %><%= title %> - <% } %><%= config.title %> 19 | 20 | 21 | 22 | 23 | 24 | <%- open_graph({twitter_id: theme.twitter, google_plus: theme.google_plus, fb_admins: theme.fb_admins, fb_app_id: theme.fb_app_id}) %> 25 | <%- css([ 26 | 'lib/fancybox/fancybox.css', 27 | 'lib/mdui_043tiny/mdui.css' 28 | ]) %> 29 | 30 | <%- css_auto_version('lib/iconfont/iconfont.css') %> 31 | <% if (theme.iconlib) { %> 32 | 33 | <% } %> 34 | <%- css_auto_version('css/style') %> 35 | 36 | <% if (theme.preset) { %> 37 | <%- css_auto_version(`preset/${theme.preset}`) %> 38 | <% } %> 39 | 40 | <% if (theme.customStyles) { %> 41 | <% theme.customStyles.forEach(function(custom){ %> 42 | <%- css_auto_version('custom.css') %> 43 | <% }) %> 44 | <% } %> 45 | 46 | <%- js([ 47 | { src:'lib/mdui_043tiny/mdui.js' , async: true}, 48 | { src:'lib/fancybox/fancybox.umd.js' , async: true}, 49 | { src:'lib/lax.min.js' , async: true} 50 | ]) %> 51 | 52 | <%- js_auto_version('js/app') %> 53 | 54 | <% if (theme.copyText) { %> 55 | 56 | <% } %> 57 | 58 | <%- theme.slotHead %> 59 | 60 | 61 | -------------------------------------------------------------------------------- /packages/theme/layout/_partial/paginator.jsx: -------------------------------------------------------------------------------- 1 | const { Component } = require('inferno'); 2 | 3 | module.exports = class extends Component { 4 | render() { 5 | const { paginator } = this.props; 6 | 7 | return ( 8 | 18 | ); 19 | } 20 | }; 21 | -------------------------------------------------------------------------------- /packages/theme/layout/_partial/right.ejs: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 | <% if (page.toc || theme.function.globalToc){ %> 5 | 6 | <% const toc_obj = toc(page.content, {list_number: true}); %> 7 | <% if (toc_obj.length > 0) { %> 8 | 14 | <% } %> 15 | 16 | <%} %> 17 | 18 | 19 |
20 |
21 | -------------------------------------------------------------------------------- /packages/theme/layout/_partial/searchbox.jsx: -------------------------------------------------------------------------------- 1 | const { Component } = require('inferno'); 2 | 3 | module.exports = class extends Component { 4 | render() { 5 | const { __ } = this.props; 6 | return ( 7 |
8 |
9 |
10 |
11 | 17 |
18 | 19 | × 20 | 21 |
22 |
23 |
24 |
25 | ); 26 | } 27 | }; 28 | -------------------------------------------------------------------------------- /packages/theme/layout/_widget/archive.ejs: -------------------------------------------------------------------------------- 1 | <% if (site.posts.length){ %> 2 |
3 |

<%= __('archive') %>

4 |
5 | <%- list_archives({show_count: options.widgetAchive.show_count, type: options.widgetAchive.archive_type}) %> 6 |
7 |
8 | <% } %> 9 | 10 | -------------------------------------------------------------------------------- /packages/theme/layout/_widget/category.ejs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theme-nexmoe/hexo-theme-nexmoe/1e415b5216df229d908cbc1e9cf5f7291e2d4cbb/packages/theme/layout/_widget/category.ejs -------------------------------------------------------------------------------- /packages/theme/layout/_widget/hitokoto.ejs: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | -------------------------------------------------------------------------------- /packages/theme/layout/_widget/link.ejs: -------------------------------------------------------------------------------- 1 |
2 | 15 |
16 | 27 | -------------------------------------------------------------------------------- /packages/theme/layout/_widget/recent_posts.ejs: -------------------------------------------------------------------------------- 1 | <% if (site.posts.length){ %> 2 |
3 |

<%= __('recent_posts') %>

4 |
5 | 12 |
13 |
14 | <% } %> -------------------------------------------------------------------------------- /packages/theme/layout/_widget/search.ejs: -------------------------------------------------------------------------------- 1 |
2 | 17 |
18 | 19 | <% if (options.search.type == 'local') { %> 20 | <%- js_auto_version('js/search') %> 21 | <% } %> 22 | 23 | <% if (options.search.type=='swiftype') { %> 24 | 33 | <% } %> -------------------------------------------------------------------------------- /packages/theme/layout/_widget/social.ejs: -------------------------------------------------------------------------------- 1 |
2 |
3 | <% for (name in options.social) { %> 13 | <% } %> 17 |
18 |
19 | -------------------------------------------------------------------------------- /packages/theme/layout/_widget/tag.ejs: -------------------------------------------------------------------------------- 1 | <% if (site.tags.length){ %> 2 |
3 |

<%= __('tags') %>

4 |
5 | <%- list_tags({show_count: theme.widgetAchive.show_count}) %> 6 |
7 |
8 | <% } %> 9 | -------------------------------------------------------------------------------- /packages/theme/layout/_widget/tagcloud.ejs: -------------------------------------------------------------------------------- 1 | <% if (site.tags.length){ %> 2 |
3 |
4 | <%- tagcloud() %> 5 |
6 | <% if (options.maxTagcloud){ %> 7 | 22 | <% } %> 23 |
24 | <% } %> -------------------------------------------------------------------------------- /packages/theme/layout/archives.ejs: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | <%- list_tags({ 5 | show_count: true, 6 | style: "unordered list", 7 | class: "mdui-ripple ", 8 | separator: "" 9 | }) %> 10 |
11 | 12 |
13 | <% site.categories.sort('name').map(function(category){ %> 14 | <% let coverx = "" %> 15 | <% category.posts.sort('-date').map(function(post){ %> 16 | 17 | <% if(post.cover!==undefined && coverx==""){ %> 18 | <% coverx = post.cover %> 19 | <% } %> 20 | <% }) %> 21 | 22 | 23 |
24 |

<%= category.name %>

25 |
26 | <% }) %> 27 |
28 | 29 |
30 | <% // 参考:https://github.com/SukkaW/hexo-theme-suka/blob/master/layout/_pages/archive.ejs %> 31 | <% function buildArchive(posts, year) { %> 32 |

<%= year %>

33 |
    34 | <% posts.sort('date',-1).each(post => { %> 35 |
  • <%= date(post.date, 'MM-DD') %><%- post.title %>
  • 36 | <% }) %> 37 |
38 | <% } %> 39 | 40 | <% 41 | if (!page.year) { 42 | let years = {}; 43 | let allpost = page.tag ? site.tags.findOne({name: page.tag}).posts : site.posts; 44 | allpost.each(post => years[post.date.year()] = null); 45 | for (let year of Object.keys(years).sort((a, b) => b - a)) { 46 | let posts = allpost.filter(p => p.date.year() == year); 47 | buildArchive(posts, year) 48 | } 49 | } else { 50 | let year = page.year; 51 | let posts = site.posts.filter(p => p.date.year() == year); 52 | buildArchive(posts, year) 53 | } 54 | %> 55 |
56 |
-------------------------------------------------------------------------------- /packages/theme/layout/index.jsx: -------------------------------------------------------------------------------- 1 | const Paginator = require('./_partial/paginator'); 2 | const { Component, Fragment } = require('inferno'); 3 | 4 | module.exports = class extends Component { 5 | render() { 6 | const { page, partial } = this.props; 7 | return ( 8 | 9 |
13 | {page.total > 1 ? : ''} 14 |
15 | ); 16 | } 17 | }; 18 | -------------------------------------------------------------------------------- /packages/theme/layout/layout.jsx: -------------------------------------------------------------------------------- 1 | const { Component } = require('inferno'); 2 | const Background = require('./_partial/background'); 3 | 4 | module.exports = class extends Component { 5 | render() { 6 | const { config, page, theme, partial } = this.props; 7 | const language = page.lang || page.language || config.language; 8 | const layout = 'nexmoe'; 9 | const bodyClass = layout === 'nexmoe' ? 'mdui-drawer-body-left' : ''; 10 | const Body = require(`./_layout/${layout}/body`); 11 | const SearchBox = require('./_partial/searchbox'); 12 | return ( 13 | 14 | 19 | 20 | 21 | 22 | 23 |
28 | 29 | 30 | ); 31 | } 32 | }; 33 | -------------------------------------------------------------------------------- /packages/theme/layout/post.ejs: -------------------------------------------------------------------------------- 1 |
2 |
3 | <% if (page.cover){ %> 4 |
5 | <%= page.title %> 6 |

<%= page.title %>

7 |
8 | <%} else{ %> 9 |
10 | <%= page.title %> 11 |

<%= page.title %>

12 |
13 | <% } %> 14 | 15 | <%- partial('_partial/_post/meta', {page: page}) %> 16 | 17 | <%- page.content %> 18 | <%- theme.slotArticleEnd %> 19 |
20 | 21 | <% if (!page.reprint){ %> 22 | <%- partial('_partial/_post/copyright') %> 23 | <% } %> 24 | 25 | <%- partial('_partial/_post/tag') %> 26 | 27 | <% if (theme.function.copyCode) { %> 28 | <%- js_auto_version('js/copy-codeblock') %> 29 | <% } %> 30 | 31 | <% if (page.comments){ %> 32 | 35 | <% } %> 36 |
-------------------------------------------------------------------------------- /packages/theme/layout/py.jsx: -------------------------------------------------------------------------------- 1 | const { Component } = require('inferno'); 2 | 3 | module.exports = class extends Component { 4 | render() { 5 | const { page, theme } = this.props; 6 | return ( 7 |
8 |
12 | {page.comments 13 | ? 17 | : '' 18 | } 19 |
20 | ); 21 | } 22 | }; 23 | -------------------------------------------------------------------------------- /packages/theme/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "hexo-theme-nexmoe", 3 | "version": "4.2.2", 4 | "description": "🔥 A special hexo theme.", 5 | "keywords": [ 6 | "hexo", 7 | "theme", 8 | "nexmoe" 9 | ], 10 | "author": "Nexmoe (https://github.com/nexmoe)", 11 | "license": "Apache-2.0", 12 | "main": "index.js", 13 | "scripts": { 14 | "lint": "eslint --ext .jsx --ext .json .", 15 | "lint:fix": "eslint --ext .jsx --ext .json . --fix" 16 | }, 17 | "repository": { 18 | "type": "git", 19 | "url": "git://github.com/theme-nexmoe/hexo-theme-nexmoe.git" 20 | }, 21 | "bugs": { 22 | "url": "https://github.com/theme-nexmoe/hexo-theme-nexmoe/issues" 23 | }, 24 | "homepage": "https://docs.nexmoe.com/", 25 | "devDependencies": { 26 | "eslint": "^8.6.0", 27 | "eslint-config-hexo": "^5.0.0", 28 | "eslint-plugin-json": "^3.0.0", 29 | "eslint-plugin-react": "^7.17.0" 30 | }, 31 | "dependencies": { 32 | "hexo": "^7.0.0", 33 | "hexo-component-inferno": "^3.0.0", 34 | "hexo-generator-json-content": "^4.2.3", 35 | "hexo-renderer-inferno": "^1.0.2", 36 | "hexo-renderer-stylus": "^3.0.0", 37 | "inferno": "^8.2.3", 38 | "inferno-create-element": "^8.2.3", 39 | "semver": "^7.5.4" 40 | }, 41 | "config": { 42 | "commitizen": { 43 | "path": "./node_modules/cz-conventional-changelog" 44 | } 45 | } 46 | } -------------------------------------------------------------------------------- /packages/theme/scripts/helper/css_auto_version.js: -------------------------------------------------------------------------------- 1 | 2 | function cssAutoVersionHelper(...args) { 3 | return args.reduce((result, path, i) => { 4 | if (i) result += '\n'; 5 | 6 | if (Array.isArray(path)) { 7 | return result + Reflect.apply(cssAutoVersionHelper, this, path); 8 | } 9 | if (!path.includes('?') && !path.endsWith('.css')) path += '.css'; 10 | const url_suffix = '?v=' + new Date().getTime(); 11 | const url = this.url_for(path) + url_suffix; 12 | return `${result}`; 13 | }, ''); 14 | } 15 | 16 | hexo.extend.helper.register('css_auto_version', cssAutoVersionHelper); 17 | -------------------------------------------------------------------------------- /packages/theme/scripts/helper/image_filter.js: -------------------------------------------------------------------------------- 1 | 2 | hexo.extend.filter.register('after_post_render', function(data) { 3 | const { config: themeCfg } = this.theme; 4 | 5 | data.content = data.content.replace( 6 | //gi, 7 | '$2' 8 | ); 9 | 10 | if (themeCfg.imageCDN.enable) { 11 | data.content = data.content.replace( 12 | new RegExp(themeCfg.imageCDN.origin, 'gm'), 13 | themeCfg.imageCDN.to 14 | ); 15 | } 16 | 17 | return data; 18 | }); 19 | -------------------------------------------------------------------------------- /packages/theme/scripts/helper/js_auto_version.js: -------------------------------------------------------------------------------- 1 | 2 | function jsAutoVersionHelper(...args) { 3 | return args.reduce((result, path, i) => { 4 | if (i) result += '\n'; 5 | 6 | if (Array.isArray(path)) { 7 | return result + Reflect.apply(jsAutoVersionHelper, this, path); 8 | } 9 | if (!path.includes('?') && !path.endsWith('.js')) path += '.js'; 10 | const url_suffix = '?v=' + new Date().getTime(); 11 | const url = this.url_for(path) + url_suffix; 12 | return `${result}`; 13 | }, ''); 14 | } 15 | 16 | hexo.extend.helper.register('js_auto_version', jsAutoVersionHelper); 17 | -------------------------------------------------------------------------------- /packages/theme/scripts/index.js: -------------------------------------------------------------------------------- 1 | /* global hexo */ 2 | 3 | /** 4 | * Print welcome message 5 | */ 6 | console.info(`=============================================== 7 | ███ ██ ███████ ██ ██ ███ ███ ██████ ███████ 8 | ████ ██ ██ ██ ██ ████ ████ ██ ██ ██ 9 | ██ ██ ██ █████ ███ ██ ████ ██ ██ ██ █████ 10 | ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ 11 | ██ ████ ███████ ██ ██ ██ ██ ██████ ███████ 12 | =====================================================`); 13 | 14 | /** 15 | * Check if all dependencies are installed 16 | */ 17 | require('../include/dependency')(hexo); 18 | 19 | /** 20 | * Configuration file checking and migration 21 | */ 22 | require('../include/config')(hexo); 23 | 24 | /** 25 | * Register Hexo extensions and remove Hexo filters that could cause OOM 26 | */ 27 | // require('../include/register')(hexo); 28 | -------------------------------------------------------------------------------- /packages/theme/scripts/tag/gallery.js: -------------------------------------------------------------------------------- 1 | const toObject = (args = 'height:160px') => { 2 | try { 3 | const arr = args.split(' '); 4 | const obj = {}; 5 | for (let i = 0; i < arr.length; i++) { 6 | const item = arr[i].split(':'); 7 | obj[item[0]] = item[1]; 8 | } 9 | return obj; 10 | } catch (e) { 11 | console.log(e); 12 | } 13 | }; 14 | 15 | hexo.extend.tag.register( 16 | 'gallery', 17 | (args, content) => { 18 | const params = toObject(args.join(' ')); 19 | const width = params.width || 200; 20 | return `

`; 29 | }, 30 | { ends: true } 31 | ); 32 | -------------------------------------------------------------------------------- /packages/theme/scripts/tag/links.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Shuffles array in place. ES6 version 4 | * @param {Array} a items An array containing the items. 5 | */ 6 | const shuffle = a => { 7 | for (let i = a.length - 1; i > 0; i--) { 8 | const j = Math.floor(Math.random() * (i + 1)); 9 | [a[i], a[j]] = [a[j], a[i]]; 10 | } 11 | return a; 12 | }; 13 | 14 | hexo.extend.tag.register( 15 | 'links', 16 | (args, content) => { 17 | let items = ''; 18 | let data = []; 19 | try { 20 | data = JSON.parse(content); 21 | } catch (e) { 22 | return e; 23 | } 24 | if (args.includes('shuffle')) { 25 | console.warn('[Nexmoe] Links tag is using shuffle mode'); 26 | data = shuffle(data); 27 | } 28 | 29 | let tooltip = ''; 30 | for (let i = 0; i < data.length; i++) { 31 | tooltip = data[i].des 32 | ? `mdui-tooltip="{content: '${data[i].des}'}"` 33 | : ''; 34 | items 35 | = items 36 | + ` 37 |
  • 38 | 39 | ${data[i].title} 40 | 41 |
  • `; 42 | } 43 | 44 | const html = `
      ${items}
    `; 45 | return html; 46 | }, 47 | { ends: true } 48 | ); 49 | -------------------------------------------------------------------------------- /packages/theme/source/css/_index/list.styl: -------------------------------------------------------------------------------- 1 | .nexmoe-posts { 2 | position: relative; 3 | 4 | .nexmoe-post { 5 | width: 100%; 6 | margin-bottom: 40px; 7 | 8 | article p:first-child { 9 | margin-top: 0; 10 | } 11 | 12 | article p:last-child { 13 | margin-bottom: 0; 14 | } 15 | } 16 | 17 | .nexmoe-post:last-child { 18 | margin-bottom: $gutter; 19 | } 20 | } 21 | 22 | .nexmoe-post { 23 | .nexmoe-post-cover { 24 | width: 100%; 25 | position: relative; 26 | overflow: hidden; 27 | border-radius: 16px; 28 | min-height: 95px; 29 | background-color: #eee; 30 | padding-top: 20%; 31 | 32 | img { 33 | display: block; 34 | position: absolute; 35 | left: 0; 36 | top: 0; 37 | object-fit: cover; 38 | width: 100%; 39 | height: 100%; 40 | } 41 | 42 | h1 { 43 | position: relative; 44 | color: #fff; 45 | font-size: 2.5rem; 46 | margin-top: 10px; 47 | width: 100%; 48 | box-sizing: border-box; 49 | text-transform: none; 50 | margin: 0; 51 | padding: $gutter; 52 | z-index: 1; 53 | text-shadow: 0 1px 3px #00000040; 54 | } 55 | 56 | h1:after { 57 | background-image: -moz-linear-gradient(to top, rgba(16, 16, 16, 0.35) 25%, rgba(16, 16, 16, 0) 100%); 58 | background-image: -webkit-linear-gradient(to top, rgba(16, 16, 16, 0.35) 25%, rgba(16, 16, 16, 0) 100%); 59 | background-image: -ms-linear-gradient(to top, rgba(16, 16, 16, 0.35) 25%, rgba(16, 16, 16, 0) 100%); 60 | background-image: linear-gradient(to top, rgba(16, 16, 16, 0.35) 25%, rgba(16, 16, 16, 0) 100%); 61 | -moz-pointer-events: none; 62 | -webkit-pointer-events: none; 63 | -ms-pointer-events: none; 64 | pointer-events: none; 65 | background-size: cover; 66 | content: ''; 67 | display: block; 68 | height: 100%; 69 | left: 0; 70 | position: absolute; 71 | bottom: 0; 72 | width: 100%; 73 | z-index: -1; 74 | } 75 | } 76 | 77 | .nexmoe-post-cover.absolute { 78 | h1 { 79 | position: absolute; 80 | bottom: 0; 81 | z-index: 1; 82 | } 83 | } 84 | 85 | .nexmoe-post-meta { 86 | margin: 10px 0px; 87 | font-size: 0; 88 | 89 | div { 90 | display: inline-block; 91 | } 92 | 93 | a { 94 | border-radius: 20px; 95 | padding: 10px 18px; 96 | font-size: 14px; 97 | display: inline-block; 98 | margin-bottom: 5px; 99 | margin-right: 10px; 100 | text-decoration: none; 101 | 102 | .nexmoefont { 103 | font-size: 14px; 104 | } 105 | } 106 | 107 | a:before { 108 | margin-right: 5px; 109 | } 110 | 111 | .wechat { 112 | background-color: rgba(42, 174, 103, 20%); 113 | color: #2aae67; 114 | } 115 | 116 | .zhihu { 117 | background-color: rgba(5, 109, 232, 20%); 118 | color: #056de8; 119 | } 120 | 121 | .bilibili { 122 | background-color: rgba(251, 114, 153, 20%); 123 | color: #fb7299; 124 | } 125 | 126 | .sspai { 127 | background-color: rgba(218, 40, 42, 20%); 128 | color: #da282a; 129 | } 130 | } 131 | 132 | .nexmoe-post-copyright { 133 | margin: 0 -25px; 134 | margin-bottom: 25px; 135 | padding: 25px; 136 | color: #191919; 137 | background-color: #fafafa; 138 | line-height: 1.5em; 139 | position: relative; 140 | overflow: hidden; 141 | 142 | a { 143 | color: var(--color-primary); 144 | } 145 | } 146 | 147 | .nexmoe-post-copyright:after { 148 | position: absolute; 149 | background: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 496 512'%3E%3Cpath fill='%234a4a4a' d='M245.8 214.9l-33.2 17.3c-9.4-19.6-25.2-20-27.4-20-22.2 0-33.3 14.6-33.3 43.9 0 23.5 9.2 43.8 33.3 43.8 14.4 0 24.6-7 30.5-21.3l30.6 15.5a73.2 73.2 0 01-65.1 39c-22.6 0-74-10.3-74-77 0-58.7 43-77 72.6-77 30.8-.1 52.7 11.9 66 35.8zm143 0l-32.7 17.3c-9.5-19.8-25.7-20-27.9-20-22.1 0-33.2 14.6-33.2 43.9 0 23.5 9.2 43.8 33.2 43.8 14.5 0 24.7-7 30.5-21.3l31 15.5c-2 3.8-21.3 39-65 39-22.7 0-74-9.9-74-77 0-58.7 43-77 72.6-77C354 179 376 191 389 214.8zM247.7 8C104.7 8 0 123 0 256c0 138.4 113.6 248 247.6 248C377.5 504 496 403 496 256 496 118 389.4 8 247.6 8zm.8 450.8c-112.5 0-203.7-93-203.7-202.8 0-105.5 85.5-203.3 203.8-203.3A201.7 201.7 0 01451.3 256c0 121.7-99.7 202.9-202.9 202.9z'/%3E%3C/svg%3E"); 150 | content: ' '; 151 | height: 160px; 152 | width: 160px; 153 | right: -30px; 154 | top: -45px; 155 | opacity: 0.1; 156 | } 157 | } 158 | 159 | .nexmoe-post-footer { 160 | background-color: #f5f6f5; 161 | padding: $gutter; 162 | margin: -($gutter); 163 | margin-top: 0; 164 | } -------------------------------------------------------------------------------- /packages/theme/source/css/_layout/nexmoe/content.styl: -------------------------------------------------------------------------------- 1 | 2 | #nexmoe-content { 3 | position: relative; 4 | 5 | .nexmoe-primary { 6 | box-shadow: 0 0 1rem var(--color-shadow); 7 | background-color: var(--color-card); 8 | float: left; 9 | width: 100%; 10 | padding: $gutter; 11 | position: absolute; 12 | min-height: 100vh; 13 | } 14 | } 15 | 16 | #nexmoe-content:after { 17 | clear: both; 18 | display: table; 19 | content: ' '; 20 | } 21 | 22 | @media screen and (max-width: 1024px) { 23 | #nexmoe-content { 24 | .nexmoe-primary { 25 | width: 100%; 26 | position: relative; 27 | min-height: 100vh; 28 | } 29 | 30 | .nexmoe-secondary { 31 | display: none; 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /packages/theme/source/css/_layout/nexmoe/header.styl: -------------------------------------------------------------------------------- 1 | #nexmoe-header { 2 | margin-left: -260px; 3 | 4 | .mdui-drawer { 5 | left: unset; 6 | scrollbar-width: none; 7 | } 8 | 9 | .mdui-drawer::-webkit-scrollbar { 10 | display: none; 11 | } 12 | 13 | .nexmoe-avatar, .nexmoe-avatar img { 14 | width: 100%; 15 | font-size: 0 0; 16 | border-radius: 80px; 17 | -webkit-border-radius: 80px; 18 | -moz-border-radius: 80px; 19 | box-shadow: inset 0 -1px 0 #333 sf; 20 | -webkit-transition: -webkit-transform 1.5s ease-out; 21 | -moz-transition: -moz-transform 1.5s ease-out; 22 | transition: transform 1.5s ease-out; 23 | } 24 | 25 | .nexmoe-avatar { 26 | margin: 45px; 27 | z-index: 4; 28 | position: relative; 29 | font-size: 0; 30 | width: calc(100% - 90px); 31 | overflow: hidden; 32 | border-radius: 100%; 33 | box-shadow: 0 0.3rem 2rem var(--color-shadow); 34 | 35 | a { 36 | padding-bottom: 100%; 37 | display: block; 38 | height: 0; 39 | } 40 | } 41 | 42 | .nexmoe-count { 43 | padding: 0 30px; 44 | margin-bottom: 30px; 45 | display: -webkit-box; 46 | display: -ms-flexbox; 47 | display: flex; 48 | 49 | div { 50 | -webkit-box-flex: 1; 51 | -ms-flex: 1; 52 | flex: 1; 53 | text-align: center; 54 | color: #a3a8ae; 55 | 56 | span { 57 | color: var(--color-text-2); 58 | display: block; 59 | } 60 | } 61 | } 62 | 63 | .nexmoe-list { 64 | padding: 8px 20px; 65 | 66 | .nexmoe-list-item { 67 | padding: 0 36px; 68 | color: #9ca2a8; 69 | border-radius: var(--radius); 70 | margin-bottom: 10px; 71 | text-align: center; 72 | transition: none !important; 73 | } 74 | 75 | .nexmoe-list-item.true, .nexmoe-list-item.true i { 76 | color: #fff; 77 | } 78 | 79 | .nexmoe-list-item.true { 80 | opacity: 0.9; 81 | background: var(--color-primary); 82 | box-shadow: 0 2px 12px var(--color-primary); 83 | } 84 | 85 | .nexmoe-list-item i { 86 | font-size: 22px; 87 | color: #9ca2a8; 88 | } 89 | 90 | .nexmoe-list-item .mdui-list-item-content { 91 | margin-left: 0px; 92 | } 93 | } 94 | 95 | .nexmoe-copyright { 96 | padding: 0 30px; 97 | text-align: center; 98 | color: #777; 99 | white-space: normal; 100 | margin-bottom: 20px; 101 | font-size: 12px; 102 | 103 | a { 104 | color: var(--color-primary); 105 | } 106 | } 107 | } 108 | 109 | @media screen and (max-width: 1024px) { 110 | #nexmoe-header { 111 | margin-left: 0; 112 | 113 | .mdui-drawer { 114 | left: 0; 115 | } 116 | } 117 | } 118 | 119 | @media screen and (min-width: 1024px) { 120 | body { 121 | padding-left: 0px; 122 | } 123 | 124 | #nexmoe-header .mdui-drawer-close { 125 | display: none; 126 | 127 | .nexmoe-avatar { 128 | padding: 16px; 129 | width: 80px; 130 | margin-left: 160px; 131 | margin-top: 8px; 132 | } 133 | 134 | .nexmoe-count { 135 | padding: 16px; 136 | width: 80px; 137 | margin-left: 160px; 138 | display: block; 139 | } 140 | 141 | .nexmoe-count div { 142 | display: block; 143 | margin-bottom: 10px; 144 | } 145 | 146 | .nexmoe-count div:last-child { 147 | margin-bottom: 0; 148 | } 149 | 150 | .mdui-list { 151 | margin-left: 160px; 152 | } 153 | 154 | .nexmoe-list-item { 155 | padding: 0 17px; 156 | color: #9ca2a8; 157 | } 158 | 159 | .mdui-list-item-icon~.mdui-list-item-content { 160 | margin-left: 32px; 161 | } 162 | 163 | .nexmoe-list { 164 | padding: 8px 10px; 165 | } 166 | } 167 | } -------------------------------------------------------------------------------- /packages/theme/source/css/_layout/xiaoshu/content.styl: -------------------------------------------------------------------------------- 1 | .nexmoe-container { 2 | max-width: 800px; 3 | margin: auto; 4 | padding: 0 20px; 5 | } 6 | 7 | #nexmoe-content { 8 | width: 100%; 9 | padding: var(--gutter); 10 | margin: 0; 11 | background: var(--color-card); 12 | box-shadow: 0 0 1rem var(--color-shadow) 13 | } -------------------------------------------------------------------------------- /packages/theme/source/css/_layout/xiaoshu/footer.styl: -------------------------------------------------------------------------------- 1 | #nexmoe-footer { 2 | padding: var(--gutter); 3 | text-align: center; 4 | color: #777; 5 | white-space: normal; 6 | margin-bottom: 20px; 7 | font-size: 12px; 8 | } -------------------------------------------------------------------------------- /packages/theme/source/css/_layout/xiaoshu/header.styl: -------------------------------------------------------------------------------- 1 | #nexmoe-header { 2 | height: 4em; 3 | background-color: transparent; 4 | line-height: 4em; 5 | margin-bottom: 10rem; 6 | } 7 | 8 | #nexmoe-header .nexmoe-container { 9 | display: flex; 10 | flex-direction: row; 11 | } 12 | 13 | #nexmoe-header .logo { 14 | font-weight: 700; 15 | white-space: nowrap; 16 | overflow: hidden; 17 | text-overflow: ellipsis; 18 | max-width: 10em; 19 | } 20 | 21 | #nexmoe-header .nav { 22 | display: flex; 23 | flex-direction: row; 24 | list-style: none; 25 | margin: 0; 26 | margin-left: auto; 27 | } 28 | 29 | #nexmoe-header .nav .nav-item { 30 | margin-left: 1.5em; 31 | } -------------------------------------------------------------------------------- /packages/theme/source/css/_partial/archives.styl: -------------------------------------------------------------------------------- 1 | .nexmoe-archives .tagcloud { 2 | margin-bottom: 13px; 3 | font-size: 0; 4 | } 5 | 6 | .nexmoe-archives .categories { 7 | margin-bottom: 12px; 8 | font-size: 0; 9 | } 10 | 11 | .nexmoe-archives .tagcloud a { 12 | border-radius: 15px; 13 | padding: 6px 12px; 14 | font-size: 15px !important; 15 | display: inline-block; 16 | margin-bottom: 7px; 17 | margin-right: 7px; 18 | } 19 | 20 | .nexmoe-archives .tagcloud a:before { 21 | content: '# '; 22 | } 23 | 24 | .nexmoe-archives .tagcloud a span:before { 25 | content: ' '; 26 | } 27 | 28 | .nexmoe-archives .categories a { 29 | border-radius: 12px; 30 | padding: 12px; 31 | font-size: 16px; 32 | display: inline-block; 33 | margin-bottom: 12px; 34 | margin-right: 12px; 35 | height: 156px; 36 | width: calc(33.333333333% - 8px); 37 | position: relative; 38 | } 39 | 40 | .nexmoe-archives .categories a:nth-child(3n+3) { 41 | margin-right: 0; 42 | } 43 | 44 | .nexmoe-archives .categories a .bg { 45 | background-size: cover; 46 | background-position: center center; 47 | top: 0; 48 | left: 0; 49 | width: 100%; 50 | height: 100%; 51 | position: absolute; 52 | opacity: 0.8; 53 | } 54 | 55 | .nexmoe-archives .categories a:before { 56 | top: 0; 57 | left: 0; 58 | content: ''; 59 | background-color: rgba(0, 0, 0, 0.15); 60 | width: 100%; 61 | height: 100%; 62 | position: absolute; 63 | z-index: 1; 64 | } 65 | 66 | .nexmoe-archives .categories a h1 { 67 | margin: 20px; 68 | position: absolute; 69 | bottom: 0; 70 | left: 0; 71 | z-index: 2; 72 | } 73 | 74 | @media screen and (max-width: 768px) { 75 | .nexmoe-archives .categories a { 76 | width: calc(50% - 6px); 77 | } 78 | 79 | .nexmoe-archives .categories a:nth-child(3n+3) { 80 | margin-right: 12px; 81 | } 82 | 83 | .nexmoe-archives .categories a:nth-child(2n+2) { 84 | margin-right: 0; 85 | } 86 | } 87 | 88 | .nexmoe-archives .categories a span { 89 | margin-top: 5px; 90 | display: block; 91 | } 92 | 93 | .nexmoe-archives .categories a span:after { 94 | content: ' Articles'; 95 | } 96 | 97 | .nexmoe-archives article > *:first-child { 98 | margin-top: 0; 99 | } 100 | 101 | .nexmoe-archives article > *:last-child { 102 | margin-bottom: 0; 103 | } 104 | 105 | .nexmoe-archives ul { 106 | list-style: none; 107 | padding-left: 0 !important; 108 | } 109 | 110 | .nexmoe-archives li { 111 | position: relative; 112 | padding: 10px 0; 113 | padding-left: 25px; 114 | } 115 | 116 | .nexmoe-archives li::before { 117 | content: ''; 118 | width: 14px; 119 | height: 14px; 120 | background: var(--color-primary); 121 | display: inline-block; 122 | vertical-align: middle; 123 | margin-top: -2px; 124 | margin-right: 11px; 125 | margin-left: -25px; 126 | border-radius: 100%; 127 | border: 3px solid #fff; 128 | z-index: 100; 129 | position: relative; 130 | } 131 | 132 | .nexmoe-archives li::after { 133 | content: ''; 134 | height: 100%; 135 | width: 2px; 136 | background: var(--color-primary-bg); 137 | position: absolute; 138 | left: 6px; 139 | top: 20px; 140 | } 141 | 142 | .nexmoe-archives li:last-child:after { 143 | display: none; 144 | } 145 | 146 | .nexmoe-archives ul span { 147 | margin-right: 15px; 148 | } 149 | -------------------------------------------------------------------------------- /packages/theme/source/css/_partial/background.styl: -------------------------------------------------------------------------------- 1 | #nexmoe-background { 2 | .nexmoe-bg { 3 | opacity: 0.2; 4 | background-size: cover; 5 | filter: blur(30px); 6 | height: 100vh; 7 | width: 100%; 8 | position: fixed; 9 | top: 0; 10 | left: 0; 11 | z-index: -1; 12 | } 13 | 14 | .mdui-appbar { 15 | padding: 10px; 16 | display: none; 17 | 18 | img { 19 | width: 100%; 20 | } 21 | } 22 | } 23 | @media screen and (max-width: 1023px) { 24 | #nexmoe-background { 25 | .mdui-appbar { 26 | display: block !important; 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /packages/theme/source/css/_partial/copy-codeblock.styl: -------------------------------------------------------------------------------- 1 | article figure.highlight { 2 | position: relative; 3 | 4 | & > .codeblock-copy-wrapper { 5 | position: absolute; 6 | width: 30px; 7 | height: 30px; 8 | right: 12px; 9 | top: 12px; 10 | border-radius: 4px; 11 | z-index: 10; 12 | background-color: #1e1e20; 13 | background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' height='20' width='20' stroke='rgba(128,128,128,1)' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M9 5H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-2M9 5a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2M9 5a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2'/%3E%3C/svg%3E"); 14 | background-position: 50%; 15 | background-size: 20px; 16 | background-repeat: no-repeat; 17 | cursor: pointer; 18 | opacity: 0; 19 | transition: opacity 0.25s; 20 | 21 | &-copied { 22 | opacity: 1; 23 | border-radius: 0 4px 4px 0; 24 | background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' height='20' width='20' stroke='rgba(128,128,128,1)' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M9 5H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-2M9 5a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2M9 5a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2m-6 9 2 2 4-4'/%3E%3C/svg%3E"); 25 | 26 | &::before { 27 | position: relative; 28 | left: -64px; 29 | display: flex; 30 | justify-content: center; 31 | align-items: center; 32 | border-radius: 4px 0 0 4px; 33 | width: 64px; 34 | height: 30px; 35 | padding-right: -15px; 36 | text-align: center; 37 | font-size: 12px; 38 | font-weight: 500; 39 | color: rgba(235, 235, 245, 0.6); 40 | background-color: #1e1e20; 41 | white-space: nowrap; 42 | content: 'Copied'; 43 | } 44 | } 45 | } 46 | 47 | &:hover > .codeblock-copy-wrapper { 48 | opacity: 1; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /packages/theme/source/css/_partial/pagination.styl: -------------------------------------------------------------------------------- 1 | 2 | .nexmoe-page-nav > * { 3 | margin-right: 8px; 4 | float: left; 5 | color: #999; 6 | border-radius: 50%; 7 | width: 36px; 8 | height: 36px; 9 | line-height: 36px; 10 | background: #f5f6f5; 11 | } 12 | 13 | .nexmoe-page-nav { 14 | list-style: none; 15 | color: #ddd; 16 | text-align: center; 17 | margin-top: 48px; 18 | display: flex; 19 | 20 | .prev { 21 | margin-left: 8px; 22 | } 23 | 24 | .current { 25 | color: #fff; 26 | background: var(--color-primary); 27 | opacity: 0.9; 28 | box-shadow: 0 2px 12px var(--color-primary); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /packages/theme/source/css/_partial/py.styl: -------------------------------------------------------------------------------- 1 | article.nexmoe-py > *:first-child { 2 | margin-top: 0 !important; 3 | } 4 | 5 | article.nexmoe-py ul { 6 | list-style-type: none; 7 | padding: 0; 8 | display: flex; 9 | flex-direction: row; 10 | flex-wrap: wrap; 11 | margin: -5px; 12 | } 13 | 14 | article.nexmoe-py ul li { 15 | transition: all 0.03s; 16 | width: calc(14.285714285714286% - 10px); 17 | margin: 5px; 18 | border-radius: 10px; 19 | box-shadow: 0 0 0 1px #eee; 20 | font-size: 0; 21 | overflow: hidden; 22 | padding: 0 !important; 23 | } 24 | 25 | article.nexmoe-py ul li:before, article.nexmoe-py ul li:after { 26 | display: none; 27 | } 28 | 29 | article.nexmoe-py ul li > a { 30 | padding-top: 100%; 31 | display: block; 32 | position: relative; 33 | } 34 | 35 | article.nexmoe-py ul li > a:before { 36 | background-image: -moz-linear-gradient(to top, rgba(16, 16, 16, 0.35) 25%, rgba(16, 16, 16, 0) 100%); 37 | background-image: -webkit-linear-gradient(to top, rgba(16, 16, 16, 0.35) 25%, rgba(16, 16, 16, 0) 100%); 38 | background-image: -ms-linear-gradient(to top, rgba(16, 16, 16, 0.35) 25%, rgba(16, 16, 16, 0) 100%); 39 | background-image: linear-gradient(to top, rgba(16, 16, 16, 0.35) 25%, rgba(16, 16, 16, 0) 100%); 40 | -moz-pointer-events: none; 41 | -webkit-pointer-events: none; 42 | -ms-pointer-events: none; 43 | pointer-events: none; 44 | background-size: cover; 45 | content: ''; 46 | display: block; 47 | height: 36px; 48 | left: 0; 49 | position: absolute; 50 | bottom: 0; 51 | width: 100%; 52 | z-index: 1; 53 | opacity: 0.8; 54 | } 55 | 56 | article.nexmoe-py ul li > a::after { 57 | font-size: 13px; 58 | color: #fff; 59 | -webkit-transition: none; 60 | transition: none; 61 | content: attr(title); 62 | display: block; 63 | width: 100%; 64 | border: none; 65 | padding: 8px 10px; 66 | text-align: center; 67 | overflow: hidden; 68 | text-overflow: ellipsis; 69 | white-space: nowrap; 70 | position: absolute; 71 | bottom: 0; 72 | z-index: 2; 73 | } 74 | 75 | article.nexmoe-py ul li img { 76 | width: 100%; 77 | border-radius: 0; 78 | border: none; 79 | display: block; 80 | position: absolute; 81 | width: 100%; 82 | top: 0; 83 | pointer-events: none; 84 | } 85 | 86 | @media screen and (max-width: 768px) { 87 | article.nexmoe-py ul li { 88 | width: calc(33.3333333333% - 10px); 89 | } 90 | } -------------------------------------------------------------------------------- /packages/theme/source/css/_partial/searchbox.styl: -------------------------------------------------------------------------------- 1 | #nexmoe-search-space { 2 | top: 0; 3 | left: 0; 4 | width: 100%; 5 | height: 100%; 6 | z-index: 6000; 7 | font-size: 1rem; 8 | background: rgba(10, 10, 10, 0.86); 9 | position: fixed; 10 | align-items: center; 11 | flex-direction: column; 12 | line-height: 1.25em; 13 | display: none; 14 | 15 | .search-container { 16 | width: 540px; 17 | overflow: auto; 18 | z-index: 6001; 19 | top: 100px; 20 | bottom: 100px; 21 | flex-direction: column; 22 | position: fixed; 23 | display: flex; 24 | 25 | .search-header { 26 | display: flex; 27 | flex-direction: row; 28 | line-height: 1.5em; 29 | font-weight: normal; 30 | border-radius: 13px; 31 | background-color: #ffffff; 32 | min-height: 3rem; 33 | 34 | .search-input-container { 35 | width: 90%; 36 | height: 100%; 37 | padding-left: 16px; 38 | 39 | .search-input { 40 | width: 100%; 41 | height: 100%; 42 | outline-style: none; 43 | border: 0px; 44 | font-size: 20px; 45 | font-weight: bold; 46 | font-family: initial; 47 | } 48 | } 49 | 50 | .search-close { 51 | font-family: initial; 52 | font-size: 1.4em; 53 | padding: 0.6em 0.75em; 54 | } 55 | } 56 | 57 | .search-body { 58 | .search-result { 59 | background-color: #fff; 60 | border-radius: 13px; 61 | 62 | a { 63 | color: #b5b5b5; 64 | font-family: initial; 65 | 66 | h3 { 67 | color: black; 68 | padding: 18px; 69 | margin-bottom: 0px; 70 | padding-bottom: 10px; 71 | } 72 | 73 | .content { 74 | padding-left: 17px; 75 | bottom: 10px; 76 | margin-top: 10px; 77 | word-wrap: break-word; 78 | } 79 | 80 | .keyword { 81 | color: var(--color-primary); 82 | } 83 | } 84 | } 85 | } 86 | } 87 | } 88 | 89 | @media screen and (max-width: 1023px) { 90 | .search-container { 91 | align-items: center; 92 | 93 | .search-header, .search-body { 94 | width: 330px; 95 | } 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /packages/theme/source/css/_widget/hitokoto.styl: -------------------------------------------------------------------------------- 1 | .nexmoe-widget-wrap { 2 | .nexmoe-widget { 3 | // 文字滚动,从 https://juejin.cn/post/6844904165446156302 复制 4 | .hitokoto-box { 5 | margin: 0 auto; 6 | overflow: hidden; 7 | } 8 | 9 | .hitokoto-text { 10 | display: inline-block; 11 | white-space: nowrap; 12 | animation: 10s wordsLoop linear infinite normal; 13 | } 14 | 15 | @keyframes wordsLoop { 16 | 0% { 17 | transform: translateX(200px); 18 | -webkit-transform: translateX(200px); 19 | } 20 | 21 | 100% { 22 | transform: translateX(-100%); 23 | -webkit-transform: translateX(-100%); 24 | } 25 | } 26 | 27 | @keyframes wordsLoop { 28 | 0% { 29 | transform: translateX(200px); 30 | -webkit-transform: translateX(200px); 31 | } 32 | 33 | 100% { 34 | transform: translateX(-100%); 35 | -webkit-transform: translateX(-100%); 36 | } 37 | } 38 | } 39 | } -------------------------------------------------------------------------------- /packages/theme/source/css/_widget/index.styl: -------------------------------------------------------------------------------- 1 | .nexmoe-widget-wrap { 2 | box-shadow: 0 0 1rem var(--color-shadow); 3 | background-color: var(--color-card); 4 | margin: 20px; 5 | border-radius: var(--radius); 6 | overflow: hidden; 7 | white-space: normal; 8 | 9 | .nexmoe-widget-title { 10 | font-size: 1em; 11 | font-weight: 400; 12 | padding: 24px 18px 12px; 13 | margin: 0; 14 | color: var(--color-primary); 15 | } 16 | 17 | .nexmoe-widget { 18 | ul { 19 | list-style-type: none; 20 | padding: 0; 21 | margin: 0; 22 | 23 | li { 24 | overflow: hidden; 25 | text-overflow: ellipsis; 26 | white-space: nowrap; 27 | position: relative; 28 | padding: 12px 18px; 29 | 30 | a { 31 | color: #606266; 32 | } 33 | } 34 | 35 | li:last-child { 36 | border-bottom: none; 37 | padding-bottom: 24px; 38 | } 39 | } 40 | 41 | .category-list-count, .archive-list-count { 42 | background-color: var(--color-primary-bg); 43 | display: inline-block; 44 | width: 26px; 45 | height: 26px; 46 | line-height: 26px; 47 | text-align: center; 48 | border-radius: 100%; 49 | color: var(--color-primary); 50 | position: absolute; 51 | right: 18px; 52 | top: 10px; 53 | } 54 | } 55 | 56 | .tagcloud { 57 | padding: 10px; 58 | padding-bottom: 6px; 59 | padding-top: 11px; 60 | 61 | a { 62 | border-radius: var(--radius); 63 | padding: 5px 10px; 64 | font-size: 12px !important; 65 | display: inline-block; 66 | margin-bottom: 5px; 67 | } 68 | 69 | a:before { 70 | content: '# '; 71 | } 72 | } 73 | 74 | .nexmoe-search { 75 | input { 76 | border: none !important; 77 | background-color: transparent; 78 | padding: 20px; 79 | box-sizing: border-box; 80 | outline: none; 81 | } 82 | } 83 | 84 | input::-webkit-search-decoration, input::-webkit-search-cancel-button { 85 | display: none !important; 86 | } 87 | 88 | .nexmoe-social { 89 | padding: 12px; 90 | font-size: 0; 91 | 92 | a { 93 | width: 41px; 94 | height: 41px; 95 | line-height: 41px; 96 | margin: 4px; 97 | border-radius: 100%; 98 | display: inline-block; 99 | text-align: center; 100 | color: #606266; 101 | } 102 | } 103 | } 104 | 105 | .nexmoe-widget-wrap:first-child { 106 | margin-top: 0; 107 | } 108 | @media screen and (max-width: 1024px) { 109 | #nexmoe-header .nexmoe-social a { 110 | margin: 5px; 111 | width: 44px; 112 | height: 44px; 113 | line-height: 44px; 114 | } 115 | } -------------------------------------------------------------------------------- /packages/theme/source/js/app.js: -------------------------------------------------------------------------------- 1 | // tabble gallery 2 | document.querySelectorAll('table:has(img)').forEach(item => { 3 | item.classList.add('nexmoe-album'); 4 | }); 5 | 6 | // search 7 | function search() { 8 | window.open( 9 | document.querySelector('#search_form').getAttribute('action_e') 10 | + ' ' 11 | + document.querySelector('#search_value').value 12 | ); 13 | return false; 14 | } 15 | 16 | // catalog 17 | document.querySelectorAll('a.toc-link').forEach(item => { 18 | item.addEventListener('click', function(ev) { 19 | ev.preventDefault(); 20 | const title = this.getAttribute('href'); 21 | window.scroll({ 22 | top: document.querySelector(decodeURI(title)).offsetTop - 24, 23 | behavior: 'smooth' 24 | }); 25 | }); 26 | }); 27 | 28 | document.addEventListener('copy', () => { 29 | if (!window.copyTip) { 30 | return; 31 | } 32 | const sel = document.getSelection(); 33 | const ele = document.createElement('div'); 34 | ele.innerHTML 35 | = '
    ' 36 | + sel 37 | + '\n\n' 38 | + window.copyTip.replaceAll('%url', document.location.href) 39 | + '
    '; 40 | document.body.appendChild(ele); 41 | sel.selectAllChildren(ele); 42 | setTimeout(() => { 43 | document.body.removeChild(ele); 44 | }); 45 | }); 46 | 47 | function imgOnError(_this) { 48 | _this.src = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMIAAADDCAYAAADQvc6UAAABRWlDQ1BJQ0MgUHJvZmlsZQAAKJFjYGASSSwoyGFhYGDIzSspCnJ3UoiIjFJgf8LAwSDCIMogwMCcmFxc4BgQ4ANUwgCjUcG3awyMIPqyLsis7PPOq3QdDFcvjV3jOD1boQVTPQrgSkktTgbSf4A4LbmgqISBgTEFyFYuLykAsTuAbJEioKOA7DkgdjqEvQHEToKwj4DVhAQ5A9k3gGyB5IxEoBmML4BsnSQk8XQkNtReEOBxcfXxUQg1Mjc0dyHgXNJBSWpFCYh2zi+oLMpMzyhRcASGUqqCZ16yno6CkYGRAQMDKMwhqj/fAIcloxgHQqxAjIHBEugw5sUIsSQpBobtQPdLciLEVJYzMPBHMDBsayhILEqEO4DxG0txmrERhM29nYGBddr//5/DGRjYNRkY/l7////39v///y4Dmn+LgeHANwDrkl1AuO+pmgAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAwqADAAQAAAABAAAAwwAAAAD9b/HnAAAHlklEQVR4Ae3dP3PTWBSGcbGzM6GCKqlIBRV0dHRJFarQ0eUT8LH4BnRU0NHR0UEFVdIlFRV7TzRksomPY8uykTk/zewQfKw/9znv4yvJynLv4uLiV2dBoDiBf4qP3/ARuCRABEFAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghgg0Aj8i0JO4OzsrPv69Wv+hi2qPHr0qNvf39+iI97soRIh4f3z58/u7du3SXX7Xt7Z2enevHmzfQe+oSN2apSAPj09TSrb+XKI/f379+08+A0cNRE2ANkupk+ACNPvkSPcAAEibACyXUyfABGm3yNHuAECRNgAZLuYPgEirKlHu7u7XdyytGwHAd8jjNyng4OD7vnz51dbPT8/7z58+NB9+/bt6jU/TI+AGWHEnrx48eJ/EsSmHzx40L18+fLyzxF3ZVMjEyDCiEDjMYZZS5wiPXnyZFbJaxMhQIQRGzHvWR7XCyOCXsOmiDAi1HmPMMQjDpbpEiDCiL358eNHurW/5SnWdIBbXiDCiA38/Pnzrce2YyZ4//59F3ePLNMl4PbpiL2J0L979+7yDtHDhw8vtzzvdGnEXdvUigSIsCLAWavHp/+qM0BcXMd/q25n1vF57TYBp0a3mUzilePj4+7k5KSLb6gt6ydAhPUzXnoPR0dHl79WGTNCfBnn1uvSCJdegQhLI1vvCk+fPu2ePXt2tZOYEV6/fn31dz+shwAR1sP1cqvLntbEN9MxA9xcYjsxS1jWR4AIa2Ibzx0tc44fYX/16lV6NDFLXH+YL32jwiACRBiEbf5KcXoTIsQSpzXx4N28Ja4BQoK7rgXiydbHjx/P25TaQAJEGAguWy0+2Q8PD6/Ki4R8EVl+bzBOnZY95fq9rj9zAkTI2SxdidBHqG9+skdw43borCXO/ZcJdraPWdv22uIEiLA4q7nvvCug8WTqzQveOH26fodo7g6uFe/a17W3+nFBAkRYENRdb1vkkz1CH9cPsVy/jrhr27PqMYvENYNlHAIesRiBYwRy0V+8iXP8+/fvX11Mr7L7ECueb/r48eMqm7FuI2BGWDEG8cm+7G3NEOfmdcTQw4h9/55lhm7DekRYKQPZF2ArbXTAyu4kDYB2YxUzwg0gi/41ztHnfQG26HbGel/crVrm7tNY+/1btkOEAZ2M05r4FB7r9GbAIdxaZYrHdOsgJ/wCEQY0J74TmOKnbxxT9n3FgGGWWsVdowHtjt9Nnvf7yQM2aZU/TIAIAxrw6dOnAWtZZcoEnBpNuTuObWMEiLAx1HY0ZQJEmHJ3HNvGCBBhY6jtaMoEiJB0Z29vL6ls58vxPcO8/zfrdo5qvKO+d3Fx8Wu8zf1dW4p/cPzLly/dtv9Ts/EbcvGAHhHyfBIhZ6NSiIBTo0LNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiEC/wGgKKC4YMA4TAAAAABJRU5ErkJggg=='; 49 | _this.onerror = null; 50 | } 51 | 52 | document 53 | .querySelectorAll('.nexmoe-post-cover.absolute') 54 | .forEach(item => { 55 | item.style.minHeight = item.childNodes[3].clientHeight + 'px'; 56 | }); 57 | 58 | window.onload = function() { 59 | lax.init(); 60 | 61 | // Add a driver that we use to control our animations 62 | lax.addDriver('scrollY', () => { 63 | return window.scrollY; 64 | }); 65 | 66 | // Add animation bindings to elements 67 | lax.addElements('.backtop', { 68 | scrollY: { 69 | opacity: [ 70 | ['screenHeight', 'screenHeight+300', 'screenHeight+600'], 71 | [0, 0, 1] 72 | ] 73 | } 74 | }); 75 | 76 | lax.addElements('.nexmoe-post-cover', { 77 | scrollY: { 78 | opacity: [ 79 | ['elInY', 'elInY+200'], 80 | [0, 1] 81 | ] 82 | } 83 | }); 84 | }; 85 | -------------------------------------------------------------------------------- /packages/theme/source/js/copy-codeblock.js: -------------------------------------------------------------------------------- 1 | window.addEventListener('load', () => { 2 | const codeBlocks = document.querySelectorAll('figure.highlight'); 3 | if (!codeBlocks.length) return; 4 | 5 | const addCopyButton = codeBlock => { 6 | const copyWrapper = document.createElement('div'); 7 | copyWrapper.setAttribute('class', 'codeblock-copy-wrapper'); 8 | 9 | let copiedTimeout = null; 10 | 11 | copyWrapper.addEventListener('click', ev => { 12 | const highlightDom = ev.target.parentElement; 13 | const code = highlightDom.querySelector('code'); 14 | 15 | let copiedCode = ''; 16 | 17 | (function traverseChildNodes(node) { 18 | const childNodes = node.childNodes; 19 | childNodes.forEach(child => { 20 | switch (child.nodeName) { 21 | case '#text': // 文本节点 22 | copiedCode += child.nodeValue; 23 | break; 24 | case 'BR': //
    25 | copiedCode += '\n'; 26 | break; 27 | default: 28 | traverseChildNodes(child); 29 | } 30 | }); 31 | }(code)); 32 | 33 | navigator.clipboard.writeText( 34 | 35 | /* 去掉最后的换行 */ 36 | copiedCode.slice(0, -1) 37 | ).then(() => { 38 | if (copiedTimeout) clearTimeout(copiedTimeout); 39 | 40 | copyWrapper.classList.add('codeblock-copy-wrapper-copied'); 41 | copiedTimeout = setTimeout(() => { 42 | copyWrapper.classList.remove('codeblock-copy-wrapper-copied'); 43 | copiedTimeout = null; 44 | }, 1500); 45 | }); 46 | }); 47 | codeBlock.appendChild(copyWrapper); 48 | }; 49 | 50 | codeBlocks.forEach(addCopyButton); 51 | }); 52 | -------------------------------------------------------------------------------- /packages/theme/source/js/search.js: -------------------------------------------------------------------------------- 1 | // 参考 https://chaooo.github.io/article/20161109.html 2 | let searchData; 3 | function loadData(arg) { 4 | if (!searchData) { 5 | const xhr = new XMLHttpRequest(); 6 | xhr.open('GET', '/content.json', true); 7 | xhr.onload = function() { 8 | if (this.status >= 200 && this.status < 300) { 9 | const res = JSON.parse(this.response || this.responseText); 10 | searchData = res instanceof Array ? res : res.posts; 11 | searchkey(arg); 12 | } else { 13 | console.error(statusText); 14 | } 15 | }; 16 | xhr.onerror = function() { 17 | console.error(statusText); 18 | }; 19 | xhr.send(); 20 | } else { 21 | searchkey(arg); 22 | } 23 | } 24 | 25 | function searchkey(keyword) { 26 | keyword.forEach(word => { 27 | searchData.forEach(post => { 28 | const rend = {}; 29 | const reg = new RegExp(word, 'g'); 30 | let flag = false; 31 | if (post.title.search(reg) !== -1) { 32 | rend.title = post.title.replace(reg, `${word}`); 33 | flag = true; 34 | } 35 | const textpos = post.text.search(reg); 36 | if (textpos !== -1) { 37 | rend.text = `…${post.text.substring(textpos, textpos + 18)}…`; 38 | rend.text = rend.text.replace(reg, `${word}`); 39 | flag = true; 40 | } 41 | if (flag) { 42 | rend.title = !rend.title ? post.title : rend.title; 43 | rend.text = !rend.text ? post.text : rend.text; 44 | rend.href = `/${post.path}`; 45 | render(rend); 46 | } 47 | }); 48 | }); 49 | } 50 | 51 | function render(data) { 52 | const ele = document.createElement('div'); 53 | ele.className = 'search-result'; 54 | ele.innerHTML = `

    ${data.title}

    55 | ${data.text}
     
    `; 56 | document.getElementsByClassName('search-body')[0].appendChild(ele); 57 | } 58 | 59 | // 主程序 60 | const key = decodeURI(location.search.split('?q=')[1]); 61 | if (key !== undefined && key !== 'undefined') { 62 | document.getElementsByClassName('search-input')[0].value = key; 63 | loadData(format(key)); 64 | document.getElementById('nexmoe-search-space').style.display = 'flex'; 65 | } 66 | 67 | // 事件 68 | function sclose() { 69 | document.getElementById('nexmoe-search-space').style.display = 'none'; 70 | } 71 | 72 | function sinput() { 73 | document.getElementsByClassName('search-body')[0].innerHTML = ''; 74 | loadData(format(document.getElementsByClassName('search-input')[0].value)); 75 | } 76 | 77 | // 搜索词格式化 78 | function format(word) { 79 | return word.replace(/[ ]/g, '').split(' '); 80 | } 81 | -------------------------------------------------------------------------------- /packages/theme/source/lib/iconfont/iconfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theme-nexmoe/hexo-theme-nexmoe/1e415b5216df229d908cbc1e9cf5f7291e2d4cbb/packages/theme/source/lib/iconfont/iconfont.eot -------------------------------------------------------------------------------- /packages/theme/source/lib/iconfont/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theme-nexmoe/hexo-theme-nexmoe/1e415b5216df229d908cbc1e9cf5f7291e2d4cbb/packages/theme/source/lib/iconfont/iconfont.ttf -------------------------------------------------------------------------------- /packages/theme/source/lib/iconfont/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theme-nexmoe/hexo-theme-nexmoe/1e415b5216df229d908cbc1e9cf5f7291e2d4cbb/packages/theme/source/lib/iconfont/iconfont.woff -------------------------------------------------------------------------------- /packages/theme/source/lib/iconfont/iconfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theme-nexmoe/hexo-theme-nexmoe/1e415b5216df229d908cbc1e9cf5f7291e2d4cbb/packages/theme/source/lib/iconfont/iconfont.woff2 -------------------------------------------------------------------------------- /packages/theme/source/preset/plain.styl: -------------------------------------------------------------------------------- 1 | :root { 2 | --gutter: 24px; 3 | --radius: 13px; 4 | --color-primary: #000; 5 | --color2: #000; 6 | --color3: #000; 7 | --color4: #000; 8 | --color5: #000; 9 | --color6: #000; 10 | --color7: #000; 11 | --color-primary-bg: #eee; 12 | --color2-bg: #eee; 13 | --color3-bg: #eee; 14 | --color4-bg: #eee; 15 | --color5-bg: #eee; 16 | --color6-bg: #eee; 17 | --color7-bg: #eee; 18 | --color-shadow: #eee; 19 | } -------------------------------------------------------------------------------- /pnpm-workspace.yaml: -------------------------------------------------------------------------------- 1 | packages: 2 | - packages/** 3 | -------------------------------------------------------------------------------- /renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://docs.renovatebot.com/renovate-schema.json", 3 | "extends": [ 4 | "config:base", 5 | "default:automergeMinor", 6 | "default:rebaseStalePrs", 7 | "group:allNonMajor" 8 | ] 9 | } --------------------------------------------------------------------------------