Article path problem #5414
-
I have a _config: # 网站
title: "Testi"
subtitle: ""
description: "Testi"
keywords: Testi
author: SharpIce
language: zh-CN
timezone: "Asia/Shanghai"
# 网址
url: http://127.0.0.1/wiki
root: /wiki/
permalink: :title/
permalink_defaults:
pretty_urls:
trailing_index: false
trailing_html: false
# 目录
source_dir: public
public_dir: ../../build/wiki
tag_dir: tags
archive_dir: archives
category_dir: categories
code_dir: downloads/code
i18n_dir: :lang
skip_render:
# 文章
new_post_name: :title.md
default_layout: post
auto_spacing: true
titlecase: false
external_link:
enable: true
field: 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
prismjs:
enable: true
preprocess: true
line_number: true
line_threshold: 0
tab_replace: ""
# 分类 & 标签
default_category: 未分类
category_map:
tag_map:
# 日期 / 时间格式
date_format: YYYY-MM-DD
time_format: HH:mm:ss
updated_option: "mtime"
# 分页
per_page: 10
pagination_dir: page
# 扩展
theme: StellarRealmWikiTheme
theme_config:
deploy:
type: ""
meta_generator: true
# 包括或不包括目录和文件
include:
exclude:
ignore:
# hexo-browsersync 插件
browsersync:
ui: false
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
It looks like hexo doesn't have such a feature. You can consider placing the folder in |
Beta Was this translation helpful? Give feedback.
-
Thank you for your answer but I have actually written a script to meet my needs XD "use strict";
var hexo = hexo || {};
hexo.extend.filter.register("post_permalink", function (data) {
const parts = data.split("/").filter((part) => part !== "");
if (parts.length > 1) {
parts.pop();
return parts.join("/") + "/";
} else {
return "/";
}
}); |
Beta Was this translation helpful? Give feedback.
Thank you for your answer but I have actually written a script to meet my needs XD