url - 本地 jekyll 无法加载 unicode url
问题描述
我的本地 Jekyll 的版本是 4.0.0。操作系统是 Windows 10
我想访问' http://localhost:4000/문제풀이/문제풀이/ ',但我不能。只显示404页。 另一方面,可以访问 github pages 的博客 url ' https://neomindstd.github.io/문제풀이/문제풀이/ ' 。
以下是 '2020-02-11-문제풀이.md' 的 Yaml Front Matter
---
title: "문제풀이 테스트"
excerpt: "테스트다"
categories:
- 문제풀이
tags:
- Blog
date: 2020-02-09 KST 04:34 +0900
toc: true
toc_sticky: true
toc_label: "목차"
published: true
---
_config.yml 的一部分
# Outputting
permalink: /:categories/:title/
paginate: 5 # amount of posts to show
paginate_path: /page:num/
timezone: Asia/Seoul # https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
因此,创建:.site/문제풀이/문제풀이/index.html
我试过解决方案。添加 _plugins/post.rb。
# https://github.com/jekyll/jekyll-help/issues/129#issuecomment-61255284
# https://stackoverflow.com/questions/41941320/jekyll-encoding-name-of-category-special-characters
# _plugins/post.rb
module Jekyll
class Post
# override post method in order to return categories names as slug
# instead of strings
#
# An url for a post with category "category with space" will be in
# slugified form : /category-with-space
# instead of url encoded form : /category%20with%20space
#
# @see utils.slugify
def url_placeholders
{
:year => date.strftime("%Y"),
:month => date.strftime("%m"),
:day => date.strftime("%d"),
:title => slug,
:i_day => date.strftime("%-d"),
:i_month => date.strftime("%-m"),
:categories => (categories || []).map { |c| Utils.slugify(c) }.join('/'),
:short_month => date.strftime("%b"),
:short_year => date.strftime("%y"),
:y_day => date.strftime("%j"),
:output_ext => output_ext
}
end
end
end
但它不起作用。
那么,如何在本地访问 unicode url?
解决方案
推荐阅读
- python - 如何遍历excel列
- vue.js - Vuejs 使用带有哈希变量的 v-if
- matlab - 单项中多次连续除法运算的计算顺序
- screen-scraping - 无法使用 Puppeteer 单击元素
- javascript - Firestore/Javascript:如何获取以日期命名的文档?
- reactjs - 从 formik-material-ui 1.0 迁移到 2.0
- tensorflow - 颤振包括 tflite 版本显示错误
- ffmpeg - 编译的 FFmpeg 不接受 -c:v 和 -c:a
- ruby-on-rails - 如何使用 minimagick 在 Rails 中调整图像大小和显示图像?
- python - 如何查找元素是否存在?