• 请不要在回答技术问题时复制粘贴 AI 生成的内容
stdying
V2EX  ›  程序员

hexo 文章生成时间问题

  •  
  •   stdying · Oct 27, 2015 · 9033 views
    This topic created in 3932 days ago, the information mentioned may be changed or developed.
    初次使用 hexo 写博客,文章写作时间是文本生成时的系统时间,如果文章拷贝到其他目录生成时间就会改变。

    以后要是换台电脑,文章岂不是都是最新生成。

    有没有什么可以修改的方法
    5 replies    2015-10-28 22:15:27 +08:00
    guchengf
        1
    guchengf  
       Oct 27, 2015
    guoer
        2
    guoer  
       Oct 27, 2015
    可以在.md 中定义时间吧
    date: 2015-01-19 00:34:14
    类似这种
    stdying
        3
    stdying  
    OP
       Oct 28, 2015
    @guoer 好的,谢谢。
    stdying
        4
    stdying  
    OP
       Oct 28, 2015
    @guchengf 谢谢,文档看到过,只是没明白什么意思
    i36lib
        5
    i36lib  
       Oct 28, 2015
    @guoer 说的对,就是在文章的 md 文档前面加 date: ,这个时间的格式可以在你 blog 目录下的_config.yml 中通过 date_format: YYYY-MM-DD HH:mm:ss 来指定。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5971 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 02:29 · PVG 10:29 · LAX 19:29 · JFK 22:29
    ♥ Do have faith in what you're doing.