Giter Club home page Giter Club logo

Comments (5)

zuoer96 avatar zuoer96 commented on July 16, 2024

这里的.Lastmod是文件中手动设置的吧?如果可以自动取文件属性的修改时间就太棒了。

from hugo-theme-next.

gldsly avatar gldsly commented on July 16, 2024

这里的.Lastmod是文件中手动设置的吧?如果可以自动取文件属性的修改时间就太棒了。

是的,这是 md 文件开头元数据信息,自己手动写的。每次更新完随手改个时间也还行 :)

from hugo-theme-next.

elkan1788 avatar elkan1788 commented on July 16, 2024

这里的.Lastmod是文件中手动设置的吧?如果可以自动取文件属性的修改时间就太棒了。

这里还是直接读取文件属性会更好一些,扫描文件的属性,后期文章量上来会增加生成网站的时长,影响到性能。

from hugo-theme-next.

elkan1788 avatar elkan1788 commented on July 16, 2024

@gldsly 可以将你的修改提交个PR上来

from hugo-theme-next.

pplmx avatar pplmx commented on July 16, 2024

这里的.Lastmod是文件中手动设置的吧?如果可以自动取文件属性的修改时间就太棒了。

这里还是直接读取文件属性会更好一些,扫描文件的属性,后期文章量上来会增加生成网站的时长,影响到性能。

读取文件属性, 好像是有问题的

  • 第一次通过git log获取的时间, 进行更新是ok的
  • 从第二次开始, 每次更新都会被更新为上一次git的时间, 而且接下来的每一次这些文件的最后更新时间都会被更新

from hugo-theme-next.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.