Closed ghost closed 4 years ago
分类:使用遇到问题(主题未经修改)
下载文档源码,然后下载主题源码到 themes/volantis ,执行 npm install 安装依赖包,执行 hexo s 运行,查看结果是否存在相同的问题。
npm install
hexo s
A. 如果正常,请一步一步将配置文件修改为您原来的设定,直至找到出问题的地方。
B. 如果依然存在异常,请检查 Hexo 环境配置,或者重新安装 Hexo。
[x] 我已完成上述操作,结果是:A,我已找出问题,详情在下方
如题,点击导航栏的标题没有作用,鼠标在扫过的时候样式也没有变换。我发现原因是我关闭了 nodewaves 这个插件(即在主题的configuration里把css和js的cdn链接都注释掉),当我取消注释时,标题可以点击了,很奇怪 ( •̀ ω •́ )y。我不想用这个插件,因为我想优化网站加载速度
我认为我的环境没有问题,应该是 nodewaves 和主题不兼容
这是我网站的链接: https://tian-ti.net/ 可在线测试,我把nodewave关了的
网站可测试
chrome, windows10
# Hexo Configuration ## Docs: https://hexo.io/docs/configuration.html ## Source: https://github.com/hexojs/hexo/ # Site title: 天梯 subtitle: '仙山琼阁' description: '会当凌绝顶,一览众山小' keywords: 博客, 技术, 数学, 物理 author: 明明 language: zh-CN timezone: 'America/Los_Angeles' # URL ## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/' url: https://tian-ti.net/ root: / permalink: :title/ permalink_defaults: pretty_urls: trailing_index: false # Set to false to remove trailing 'index.html' from permalinks trailing_html: false # Set to false to remove trailing '.html' from permalinks # Directory source_dir: source public_dir: public tag_dir: tags archive_dir: archives category_dir: categories code_dir: downloads/code i18n_dir: :lang skip_render: - "images/**/*" - "css/**/*" - "js/**/*" - "CNAME" - "manifest.json" - "README.md" # Writing new_post_name: :title.md # File name of new posts default_layout: post titlecase: false # Transform title into titlecase external_link: enable: true # Open external links in new tab field: site # Apply to the whole site exclude: '' filename_case: 0 render_drafts: false post_asset_folder: false relative_link: false future: true highlight: enable: false line_number: true auto_detect: false tab_replace: '' wrap: true hljs: false # Home page setting # path: Root path for your blogs index page. (default = '') # per_page: Posts displayed per page. (0 = disable pagination) # order_by: Posts order. (Order by date descending by default) index_generator: path: '' per_page: 10 order_by: -updated # Category & Tag default_category: uncategorized category_map: tag_map: # Metadata elements ## https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta meta_generator: true # Date / Time format ## Hexo uses Moment.js to parse and display date ## You can customize the date format as defined in ## http://momentjs.com/docs/#/displaying/format/ date_format: YYYY-MM-DD time_format: HH:mm:ss ## Use post's date for updated date unless set in front-matter use_date_for_updated: false # Pagination ## Set per_page to 0 to disable pagination per_page: 10 pagination_dir: page # Include / Exclude file(s) ## include:/exclude: options only apply to the 'source/' folder include: exclude: ignore: import: meta: link: ## CDN服务 #- '<link rel="stylesheet" href="/css/custom.css" />' - '<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/MerrickCai/Tian-Ti-CN@latest/css/custom.min.css" />' ## ----------------- - '<link rel="manifest" href="/manifest.json" />' script: ## 使用CDN use_cdn: true ## 谷歌分析 google_analytics_key: UA-164488896-2 # Extensions ## Plugins: https://hexo.io/plugins/ ## Themes: https://hexo.io/themes/ theme: volantis ## CDN服务 favicon: https://cdn.jsdelivr.net/gh/MerrickCai/Tian-Ti-CN@latest/images/Plane.svg ##插件 all_minifier: true live2d: enable: true scriptFrom: jsdelivr model: use: https://cdn.jsdelivr.net/npm/live2d-widget-model-wanko@1.0.5/assets/wanko.model.json scale: 1.5 display: superSample: 2 width: 70 height: 70 position: left hOffset: 0 vOffset: 0 mobile: show: true scale: 1 react: opacity: 1 dialog: enable: false hitokoto: false # offline config passed to sw-precache. offline: maximumFileSizeToCacheInBytes: 5242880 staticFileGlobs: - public/**/*.{js,html,css,png,jpg,gif,svg,eot,ttf,woff,woff2} stripPrefix: public verbose: true runtimeCaching: - urlPattern: /* handler: cacheFirst options: ##CDN服务 origin: cdn.jsdelivr.net hexo_external_link: enable: true enable_base64_encode: true url_param_name: 'u' html_file_name: 'go.html' target_blank: false link_rel: 'external nofollow noopener noreferrer' domain: 'tian-ti.net' # 如果开启了防盗链 safety_chain: true lazyload: enable: true onlypost: false # optional loadingImg: # optional eg ./images/loading.gif isSPA: false # optional sitemap: path: sitemap.xml template: rel: true # Deployment ## Docs: https://hexo.io/docs/deployment.html deploy: type: 'git' repo: github: git@github.com:MerrickCai/Tian-Ti-CN.git,master coding: git@e.coding.net:tian-ti/Tian-Ti-CN.git,master
############################### Style ############################### style: font_smoothing: true # font-smoothing for webkit max_width: 1100px # Sum of body width and sidebar width (This limit will be exceeded when the device width is greater than 2000px, reaching 75% of the total width) scrollbar: size: 5px border: 0px color: '#2196f3' hover: '#ff5722' navbar: height: 60px width: auto # auto, max effect: [shadow, floatable, blur] # [shadow, floatable, blur] sidebar: effect: [shadow, floatable] # [shadow, floatable, blur] body: effect: [shadow, floatable] # [shadow, floatable, blur] highlight: language: true # show language of codeblock copy_btn: true text_align: # left, right, justify, center h1: left h2: left h3: left h4: left p: justify note: # style for default note: {% note text %} icon: '\f054' color: 'gray' checkbox: enable: true # enable for user color: '' # color for default checkbox gap: h2: 48px # Spacing above H2 (only px unit) h3: 24px # Spacing above H3 (only px unit) h4: 16px # Spacing above H4 (only px unit) paragraph: 1rem # Paragraph spacing between paragraphs row: .5rem # Paragraph spacing between other elements line_height: 1.65 # normal, 1.5, 1.75, 2 ... border_radius: card: 8px codeblock: 4px searchbar: 8px button: 4px fontsize: root: 16px h1: 1.625rem h2: 1.375rem h3: 1.25rem h4: 1.125rem h5: 1rem h6: 1rem body: 1rem list: .9375rem meta: .875rem code: .8125rem footnote: .75rem fontfamily: logofont: fontfamily: '"Microsoft Yahei",-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji' #fontfamily: '"Varela Round", "PingFang SC", "Microsoft YaHei", Helvetica, Arial' #name: 'Varela Round' #url: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-fonts/VarelaRound/VarelaRound-Regular.ttf weight: normal style: normal bodyfont: fontfamily: '"Microsoft Yahei",-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji' #fontfamily: 'UbuntuMono, "PingFang SC", "Microsoft YaHei", Helvetica, Arial' #name: 'UbuntuMono' #url: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-fonts/UbuntuMono/UbuntuMono-Regular.ttf weight: normal style: normal offset: 0.1rem # Correct baseline for zh-CN codefont: fontfamily: '"Microsoft Yahei",-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji' #fontfamily: 'Menlo, UbuntuMono, Monaco' # name: 'Monaco' # url: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-fonts/Monaco/Monaco.ttf weight: normal style: normal # color: # site: '#21232F' # Website background color # site_inner: '#fff' # Text color inside the website background # site_footer: '#666' # Footer text color inside the website background # card: '#444' # Card background color # text: '#fff' # The color of the text on the card. # theme: '#ff9800' # Main color # link: '#1BCDFC' # Link color # hover: '#ff5722' # Link highlight color # inner: '#333' # Text color inside the button # block: '#555' # Block color # inlinecode: '#555' # Inline code color # codeblock: '#555' # Codeblock color # p: '#ccc' # Paragraph color ############################### Layout ############################### cover: scheme: docs # docs, blog display: home: true archive: true others: true # can be written in front-matter 'cover: true' logo: title: 天梯 subtitle: '会当凌绝顶,一览众山小' search: 搜索 # search bar placeholder features: - name: 首页 icon: fas fa-home url: / - name: 关于 icon: fas fa-info-circle url: /about/ - name: 友链 icon: fas fa-link url: /friends/ - name: English icon: fas fa-language url: https://en.tian-ti.net/ target: _self # Navigation Bar navbar: logo: # choose [img] or [icon + title] img: icon: fas fa-paper-plane title: 天梯 menu: # # The following can be written in `blog/source/_data/menu.yml` # - name: 博客 # icon: fas fa-rss # url: / search: 搜索 # Search bar placeholder layout: # # The following can be written in `blog/source/_data/layout.yml` # meta library meta: # 文章标题 title: # 暂无配置 # 默认文章作者(可在front-matter中覆盖) author: ##CDN服务 avatar: https://cdn.jsdelivr.net/gh/MerrickCai/Tian-Ti-CN@latest/images/Avatar.jpg name: 明明 url: https://tian-ti.net/ # 文章创建日期 date: icon: fas fa-calendar-alt title: '发布于 ' format: 'll' # 日期格式 http://momentjs.com/docs/ # 文章更新日期 updated: icon: fas fa-edit title: '更新于 ' format: 'll' # 日期格式 http://momentjs.com/docs/ # 文章分类 category: icon: fas fa-folder-open # 文章置顶 top: icon: fas fa-angle-double-up # 文章浏览计数 counter: icon: fas fa-eye # 文章字数和阅读时长 wordcount: icon_wordcount: fas fa-keyboard icon_duration: fas fa-hourglass-half # 文章标签 tags: icon: fas fa-tags # 分享 share: # - id: qrcode # 当id为qrcode时需要安装插件 npm i -S hexo-helper-qrcode # img: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/logo/128/wechat.png # - id: qq # img: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/logo/128/qq.png # - id: qzone # img: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/logo/128/qzone.png # - id: weibo # img: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-assets/logo/128/weibo.png # 链接 btns: edit: icon: fas fa-edit title: 在GitHub上编辑此页 color: '#888' repo: # 源码链接 icon: fas fa-file-code title: 源码 color: '#508EF2' bug: # BUG反馈链接 icon: fas fa-bug title: BUG color: '#FE5F58' doubt: # 疑问链接 icon: fas fa-question-circle title: 疑问 color: '#FFBD2B' idea: # 建议链接 icon: fas fa-lightbulb title: 建议 color: '#3DC550' faq: # FAQ链接 icon: fas fa-comments title: FAQ color: '#29B1C9' feedback: # 反馈链接 icon: fas fa-comment-dots title: 反馈 color: '#1BCDFC' # widget library widget: # The following can be written in `blog/source/_data/widget.yml` # --------------------------------------- # blogger info widget blogger: class: blogger display: [desktop, mobile] # [desktop, mobile] ## CDN服务 avatar: https://cdn.jsdelivr.net/gh/MerrickCai/Tian-Ti-CN@latest/images/Avatar.jpg shape: rectangle # circle, rectangle url: /about/ title: 明明 subtitle: 一个渴望改变世界的普通人 jinrishici: false # Poetry Today. You can set a string, and it will be displayed when loading fails. social: true # --------------------------------------- # toc widget (valid only in articles) toc: class: toc display: [desktop, mobile] # [desktop, mobile] header: icon: fas fa-list title: 目录 list_number: true min_depth: 2 max_depth: 6 # --------------------------------------- # category widget category: class: category display: [desktop, mobile] # [desktop, mobile] header: icon: fas fa-folder-open title: 分类 url: /categories/ # --------------------------------------- # tagcloud widget tagcloud: class: tagcloud display: [desktop, mobile] # [desktop, mobile] header: icon: fas fa-tags title: 标签 url: /tags/ min_font: 15 max_font: 20 color: true start_color: 'rgba(50,0,0,1)' end_color: 'rgba(0,0,0,1)' # --------------------------------------- # related posts widget related_posts: class: related_posts # npm i -S hexo-related-popular-posts display: [desktop, mobile] # [desktop, mobile] header: icon: fas fa-bookmark title: 相关 max_count: 5 # --------------------------------------- # copyright widget (valid only in articles) copyright: class: copyright display: [desktop, mobile] # [desktop, mobile] blockquote: true permalink: '本文永久链接是 ' content: - '本文遵循 **署名-非商业性使用-相同方式共享 4.0 国际 (CC BY-NC-SA 4.0) 协议**' - permalink # --------------------------------------- # qrcode widget donate: class: qrcode display: [desktop, mobile] # [desktop, mobile] height: 200px # Automatic height if not set fancybox: true images: ##CDN服务 - https://cdn.jsdelivr.net/gh/MerrickCai/Tian-Ti-CN@latest/images/WeChatPay.png # --------------------------------------- # references widget references: class: references # is subclass of list display: [desktop, mobile] # [desktop, mobile] header: icon: fas fa-quote-left title: 参考 related_repos: class: references # is subclass of list display: [desktop, mobile] # [desktop, mobile] header: icon: fab fa-github title: 源码 # You can add your own widget here or 'blog/source/_data/widget.yml' # class: text, list, grid, qrcode, page, ... see more at https://volantis.js.org/ footer: # layout of footer: [aplayer, social, license, info, copyright] layout: [social, copyright] social: # - icon: fas fa-rss # url: atom.xml # - icon: fas fa-envelope # url: mailto:me@xaoxuu.com - icon: fab fa-github url: https://github.com/MerrickCai/ # - icon: fas fa-headphones-alt # url: https://music.163.com/#/user/home?id=63035382 copyright: '[Copyright © 2020 明明](https://tian-ti.net/)' # You can add your own property here. (Support markdown, for example: br: '<br>') br: '<br>' ############################### SEO ############################### seo: # When there are no keywords in the article's front-matter, use tags as keywords. use_tags_as_keywords: true # When there is no description in the article's front-matter, use excerpt as the description. use_excerpt_as_description: true robots: home_first_page: index,follow home_other_pages: noindex,follow archive: noindex,follow category: noindex,follow tag: noindex,follow # robots can be written in front-matter ############################### Plugins ############################### plugins: ######## Plugins to improve loading speed: # Preload (The menu's url must end with ‘/’) instant_page: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-volantis@2/js/instant_page.js ######## Plugins to optimize the experience: # highlight.js highlightjs: js: https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@10.0.2/build/highlight.min.js css: https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@10.0.2/build/styles/tomorrow-night-eighties.min.css # more: https://www.jsdelivr.com/package/npm/highlight.js?path=styles # https://scrollrevealjs.org/api/reveal.html scrollreveal: js: https://cdn.jsdelivr.net/npm/scrollreveal@4.0.6/dist/scrollreveal.min.js distance: 8px duration: 800 # ms interval: 100 # ms scale: 1 # 0.1~1 # Codeblock Copy Button clipboard: https://cdn.jsdelivr.net/npm/clipboard@2/dist/clipboard.min.js # mathjax mathjax: https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js ######## Plugins for SEO: # Traffic statistics (very slow loading) #busuanzi: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-busuanzi@2.3/js/busuanzi.pure.mini.js # npm i --save hexo-wordcount wordcount: false #true ######## Plugins for ... # Button Ripple Effect nodewaves: css: https://cdn.jsdelivr.net/npm/node-waves@0.7.6/dist/waves.min.css js: https://cdn.jsdelivr.net/npm/node-waves@0.7.6/dist/waves.min.js # Typing Effects #comment_typing: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-volantis@2/js/comment_typing.js # Slide Background backstretch: enable: false js: https://cdn.jsdelivr.net/npm/jquery-backstretch@2.1.18/jquery.backstretch.min.js position: cover # cover: sticky on the cover. fixed: Fixed as background for the site. shuffle: true # shuffle playlist duration: 4000 # Duration (ms) fade: 1000 # fade duration (ms) (Not more than 1500) images: # For personal use only. At your own risk if used for commercial purposes !!! # APlayer is only available in mainland China. # APlayer config: https://github.com/metowolf/MetingJS aplayer: enable: false js: - https://cdn.jsdelivr.net/npm/aplayer@1.10/dist/APlayer.min.js - https://cdn.jsdelivr.net/npm/meting@2.0/dist/Meting.min.js # Required server: netease # netease, tencent, kugou, xiami, baidu type: playlist # song, playlist, album, search, artist id: 943448728 # song id / playlist id / album id / search keyword # Optional fixed: false # enable fixed mode theme: '#1BCDFC' # main color autoplay: false # audio autoplay order: random # player play order, values: 'list', 'random' loop: all # player loop play, values: 'all', 'one', 'none' volume: 0.5 # default volume, notice that player will remember user setting, default volume will not work after user set volume themselves list_max_height: 350px # list max height list_folded: true ############################### Comments ############################### comments: title: <i class="fas fa-comment-dots"></i> 评论 subtitle: - 在虚拟且无边无际的互联网世界留下你的踪迹吧 <i class="fas fa-shoe-prints"></i> service: valine # valine, minivaline, disqus, gitalk, livere # Valine # https://valine.js.org/ valine: appId: Ng82toRXhLwjx8jQOVc0QNOF-MdYXbMMI # your appId appKey: vcdwMo3TY6OSWJPRrNf5Eq7p # your appKey js: https://cdn.jsdelivr.net/npm/valine@1.4/dist/Valine.min.js path: # All pages use the same path (share the same comments data) meta: nick,mail,link # valine comment header info requiredFields: # ['nick','mail'] enableQQ: true # Unstable avatar link placeholder: 欢迎留言哦 ^_^ # valine comment input placeholder(like: Please leave your footprints ) avatar: wavatar # gravatar style https://valine.js.org/avatar pageSize: 10 # comment list page size lang: zh-cn highlight: true visitor: true mathJax: true # MiniValine # https://github.com/MiniValine/MiniValine minivaline: appId: # Your leancloud application appid appKey: # Your leancloud application appkey js: https://unpkg.com/minivaline@latest/dist/MiniValine.min.js placeholder: Write a Comment # Comment box placeholder path: # All pages use the same path (share the same comments data) adminEmailMd5: # The MD5 of Admin Email to show Admin Flag. math: true # Support MathJax. md: true # Support Markdown. # MiniValine's display language depends on user's browser or system environment # If you want everyone visiting your site to see a uniform language, you can set a force language value # Available values: en | zh-CN | (and many more) # More i18n info: https://github.com/MiniValine/minivaline-i18n lang: NoRecordIP: false # Do not record commenter IP. maxNest: 6 # Sub-comment maximum nesting depth. pageSize: 6 # Pagination size. # Expression Url. # https://github.com/MiniValine/MiniValine/blob/master/.github/FAQ.md#how-to-customize-emoticons emoticonUrl: - https://cdn.jsdelivr.net/gh/MiniValine/Bilibilis@master - https://cdn.jsdelivr.net/npm/alus # Disqus # https://disqus.com disqus: shortname: # Gitalk # https://gitalk.github.io/ gitalk: clientID: clientSecret: repo: owner: admin: # [] # Vssue # https://vssue.js.org/zh/ vssue: owner: repo: clientId: clientSecret: # LiveRe # https://www.livere.com livere: uid: ############################### Search ############################### # To use hexo search, you need to install the following plugins: # npm i -S hexo-generator-search hexo-generator-json-content search: enable: true service: hexo # hexo, google, algolia, azure, baidu js: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-volantis@2.6.5/js/search.js google: apiKey: engineId: algolia: applicationID: apiKey: indexName: azure: serviceName: indexName: queryKey: baidu: apiId: ############################### Theme Information ############################### info: name: Volantis # This is theme's name. version: '2.6.6' # This is theme's version. docs: https://volantis.js.org/ # This is theme's URL. cdn: js: https://cdn.jsdelivr.net/gh/xaoxuu/cdn-volantis@2.6.5/js/app.js ## CDN服务 css: https://cdn.jsdelivr.net/gh/MerrickCai/Tian-Ti-CN@latest/css/style.css
node 版本 v12.16.3 npm 版本 6.14.5
+-- UNMET PEER DEPENDENCY hexo@4.2.0 +-- hexo-all-minifier@0.5.3 +-- hexo-autonofollow@1.0.1 +-- hexo-deployer-git@2.1.0 +-- hexo-external-link@1.0.7 +-- hexo-filter-emoji@2.2.1 +-- hexo-fs@3.0.1 +-- hexo-generator-archive@1.0.0 +-- hexo-generator-category@1.0.0 +-- hexo-generator-index@1.0.0 +-- hexo-generator-json-content@4.2.3 +-- hexo-generator-search@2.4.0 +-- hexo-generator-sitemap@2.0.0 +-- hexo-generator-tag@1.0.0 +-- hexo-helper-live2d@3.1.1 +-- hexo-lazyload-image@1.0.9 +-- hexo-offline@1.0.0 +-- hexo-renderer-ejs@1.0.0 +-- hexo-renderer-marked@2.0.0 +-- hexo-renderer-pandoc@0.3.0 +-- hexo-renderer-stylus@1.1.0 `-- hexo-server@1.0.0
点击天梯无效
由于nodewave对速度影响不大,我决定重新开启,这个问题我关闭了吧
你更新一下看看
OK,正常了
自检报告
分类:使用遇到问题(主题未经修改)
第一步
第二步
下载文档源码,然后下载主题源码到 themes/volantis ,执行
npm install
安装依赖包,执行hexo s
运行,查看结果是否存在相同的问题。A. 如果正常,请一步一步将配置文件修改为您原来的设定,直至找到出问题的地方。
B. 如果依然存在异常,请检查 Hexo 环境配置,或者重新安装 Hexo。
[x] 我已完成上述操作,结果是:A,我已找出问题,详情在下方
第三步
问题描述
如题,点击导航栏的标题没有作用,鼠标在扫过的时候样式也没有变换。我发现原因是我关闭了 nodewaves 这个插件(即在主题的configuration里把css和js的cdn链接都注释掉),当我取消注释时,标题可以点击了,很奇怪 ( •̀ ω •́ )y。我不想用这个插件,因为我想优化网站加载速度
环境信息
我认为我的环境没有问题,应该是 nodewaves 和主题不兼容
复现地址:
这是我网站的链接: https://tian-ti.net/ 可在线测试,我把nodewave关了的
截图:
网站可测试
浏览器、操作系统
chrome, windows10
站点配置文件
主题配置文件
更多信息
node.js & npm
package.json