前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >jekyll中URL的设置

jekyll中URL的设置

作者头像
码客说
发布2019-10-22 14:01:26
2.1K0
发布2019-10-22 14:01:26
举报
文章被收录于专栏:码客码客

配置文件为_config.yml

在配置文件中添加配置类似于 permalink: /:categories/:year-:month-:day-:title.html

可用的参数值

  • year 文章的年份:如2014
  • short_year 文章的年份,不包含世纪,如:14
  • month 文章的月份
  • i_month 文章的月份,去掉前置的0
  • day 文章的日期
  • i_day 文章的日期,去掉前置的0
  • categories 文章的分类,如果文章没分类,生成url时会将其忽略

内置搭配

date/:categories/:year/:month/:day/:title.html

pretty/:categories/:year/:month/:day/:title/

none/:categories/:title.html

使用方式

permalink: date permalink: pretty permalink: none

自定义搭配

  • /:categories/:year/:month/:day/:title.html 默认的搭配
  • /:categories/:title.html 最精简的配置
  • /:categories/:year-:month-:day-:title.html 我的配置
  • /:year-:month-:day/:title 也可以不跟html
本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2014-07-05,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 配置文件为_config.yml
  • 内置搭配
    • 使用方式
    • 自定义搭配
    领券
    问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档