Comments (9)
这种情况下需要手动设置created_at
from hexo-theme-icarus.
这种情况下需要手动设置
created_at
能否在文档里详细写下
from hexo-theme-icarus.
这种情况下需要手动设置
created_at
实际效果与文档描述不同也可以算非预期行为吧
from hexo-theme-icarus.
关键是很难自动的保存你的“书写完成时间”。对操作系统来说是知道文件修改时间的,但是这是文件系统的属性,上传到CI后还有没有是一个问题,CI的时区和作者的时区在不在一起也是一个问题。我曾用过一个主题,它用了CI的时区为当前时区。。。。结果是我刚刚更新的文章也给我显示多少小时前更新。。。这种情况最好还是自己手动去填写一下created_at
比较好,即使有些主题这个时区问题一言难尽。
from hexo-theme-icarus.
关键是很难自动的保存你的“书写完成时间”。对操作系统来说是知道文件修改时间的,但是这是文件系统的属性,上传到CI后还有没有是一个问题,CI的时区和作者的时区在不在一起也是一个问题。我曾用过一个主题,它用了CI的时区为当前时区。。。。结果是我刚刚更新的文章也给我显示多少小时前更新。。。这种情况最好还是自己手动去填写一下
created_at
比较好,即使有些主题这个时区问题一言难尽。
可是我按照文档写了time
和updated
这两个字段
from hexo-theme-icarus.
这个问题挺烦的,每篇文章手动指定date
和updated
,但构建出来页面的更新时间还是构建的时间,希望可以修复下
@ppoffice
from hexo-theme-icarus.
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.
您可尝试用 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.
您可尝试用 Actions 生成文件后再用 cf 部署,同时您可能需要将 fetch 深度设置为 0 再尝试恢复文件时间:
好的,谢谢!
from hexo-theme-icarus.
Related Issues (20)
- 能否添加:调用google翻译的语种选择框?
- easy dark theme support with Bulma plugin HOT 2
- FontAwesome之外的图标支持(如 Tabler Icons 等) HOT 1
- 【已解决】主题与[email protected]不兼容。请不要手贱乱更新依赖。
- 文章比较多的时候首页边栏加载很慢 HOT 3
- YAML files in source folder make icarus crash HOT 4
- Supporting sub-menus
- add multi author support HOT 1
- two columns index gallery layout HOT 2
- option to disable all widgets HOT 1
- make container-inner-max-width configurable HOT 2
- Numbers show different in multiline codeblock snippet HOT 3
- 使用自定义字体时首页文章发布时间栏出现滑动条 HOT 4
- Comment Plugin is render-blocking
- [建议]优化主题性能 HOT 16
- 使用源码安装主题报错 HOT 2
- 文章头部是一张照片的效果是怎么弄的? HOT 3
- 引入 Pjax 以加速网页切换速度
- 源码使用 6.0.0 异常 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hexo-theme-icarus.