Git Product home page Git Product logo

Comments (9)

ppoffice avatar ppoffice commented on June 2, 2024

这种情况下需要手动设置created_at

from hexo-theme-icarus.

stydxm avatar stydxm commented on June 2, 2024

这种情况下需要手动设置created_at

能否在文档里详细写下

from hexo-theme-icarus.

stydxm avatar stydxm commented on June 2, 2024

这种情况下需要手动设置created_at

实际效果与文档描述不同也可以算非预期行为吧

from hexo-theme-icarus.

rinscr3003 avatar rinscr3003 commented on June 2, 2024

关键是很难自动的保存你的“书写完成时间”。对操作系统来说是知道文件修改时间的,但是这是文件系统的属性,上传到CI后还有没有是一个问题,CI的时区和作者的时区在不在一起也是一个问题。我曾用过一个主题,它用了CI的时区为当前时区。。。。结果是我刚刚更新的文章也给我显示多少小时前更新。。。这种情况最好还是自己手动去填写一下created_at比较好,即使有些主题这个时区问题一言难尽。

from hexo-theme-icarus.

stydxm avatar stydxm commented on June 2, 2024

关键是很难自动的保存你的“书写完成时间”。对操作系统来说是知道文件修改时间的,但是这是文件系统的属性,上传到CI后还有没有是一个问题,CI的时区和作者的时区在不在一起也是一个问题。我曾用过一个主题,它用了CI的时区为当前时区。。。。结果是我刚刚更新的文章也给我显示多少小时前更新。。。这种情况最好还是自己手动去填写一下created_at比较好,即使有些主题这个时区问题一言难尽。

可是我按照文档写了timeupdated这两个字段

from hexo-theme-icarus.

stydxm avatar stydxm commented on June 2, 2024

这个问题挺烦的,每篇文章手动指定dateupdated,但构建出来页面的更新时间还是构建的时间,希望可以修复下
@ppoffice

from hexo-theme-icarus.

stale avatar stale commented on June 2, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

from hexo-theme-icarus.

PJ-568 avatar PJ-568 commented on June 2, 2024

您可尝试用 Actions 生成文件后再用 cf 部署,同时您可能需要将 fetch 深度设置为 0 再尝试恢复文件时间:

# 以上省略
    steps:
    - name: Checkout source
      uses: actions/checkout@v4
      with:
        fetch-depth: 0
        submodules: true

    - name: Setup Node.js
      uses: actions/setup-node@v3
      with:
        node-version: '14.17.0'

    - name: Restore file modification time
      run: |
        git ls-files -z | while read -d '' path; do touch -d "$(git log -1 --format="@%ct" "$path")" "$path"; done

    - name: Install dependencies & Generate static files
      run: |
        node -v
        npm i -g hexo-cli
        npm i
        hexo clean
        hexo g
        hexo d

# 以下忽略,部署到 cf

from hexo-theme-icarus.

stydxm avatar stydxm commented on June 2, 2024

您可尝试用 Actions 生成文件后再用 cf 部署,同时您可能需要将 fetch 深度设置为 0 再尝试恢复文件时间:

好的,谢谢!

from hexo-theme-icarus.

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.