为什么点击hexo博客的标签(tags)按钮进入到/tags页面,
再点击标签按钮会进入到/tags/tags页面报错这样子?
错误如图
用的主题是next
next文件夹内的_config.yml文件中关于menue的代码如下
# ---------------------------------------------------------------
# Menu Settings
# ---------------------------------------------------------------
# When running the site in a subdirectory (e.g. domain.tld/blog), remove the leading slash from link value (/archives -> archives).
# Usage: `Key: /link/ || icon`
# Key is the name of menu item. If the translation for this item is available, the translated text will be loaded, otherwise the Key name will be used. Key is case-senstive.
# Value before `||` delimeter is the target link.
# Value after `||` delimeter is the name of FontAwesome icon. If icon (with or without delimeter) is not specified, question icon will be loaded.
# External url should start with http:// or https://
menu:
home: http://www.zintown.top/ || home
about: about/ || user
tags: tags/ || tags
categories: categories/ || th
archives: archives/ || archive
schedule: schedule/ || calendar
reading: books/ || book
#sitemap: /sitemap.xml || sitemap
#commonweal: /404/ || heartbeat
# Enable / Disable menu icons / item badges.
menu_settings:
icons: true
badges: true
根目录的_config.yml代码如下
# Site
title: Zintown
subtitle: Stay hungry.Stay foolish.
description:
keywords:
author: tong ouyang
language:
timezone:
# URL
## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
url: https://zintown.top/
root: /
permalink: posts/:category/:year-:month-:day-:title.html
permalink_defaults:
# 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:
# Writing
new_post_name: :title.md # File name of new posts
default_layout: post
titlecase: false # Transform title into titlecase
external_link: true # Open external links in new tab
filename_case: 0
render_drafts: false
post_asset_folder: false
relative_link: true
future: true
highlight:
enable: true
line_number: true
auto_detect: false
tab_replace:
# 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: -date
# Category & Tag
default_category: categorized
category_map:
tag_map:
# 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
# Pagination
## Set per_page to 0 to disable pagination
per_page: 10
pagination_dir: page
# Extensions
## Plugins: https://hexo.io/plugins/
## Themes: https://hexo.io/themes/
theme: next
# Deployment
## Docs: https://hexo.io/docs/deployment.html
deploy:
type: git
repository: https://github.com/zintown/zintown.github.io.git
branch: master
已经hexo new page tags & categores
tags&categores文件夹内的index.md也均设置过了
检查了tags大小写是一致的
tags文件夹的index.md 代码如下
title: tags
date: 2019-04-17 23:04:53
type: "tags"
搞了一晚上实在是没招了,希望老哥们能帮忙解答一下。。。
虽然好像不是这个问题,但是你试试把next的主题配置文件
_config.yml
中做以下修改?把这种前面都加上个
/
变成下面这样: