This commit is contained in:
何夕2077
2025-06-27 11:50:56 +00:00
parent 6998e8a1a1
commit c09265c711
7 changed files with 45 additions and 12 deletions

View File

@@ -304,7 +304,8 @@ jobs:
if date_file_match: if date_file_match:
year, month, day = date_file_match.groups() # Capture year, month, and day year, month, day = date_file_match.groups() # Capture year, month, and day
print(f" - Applying 'MM-DD-Daily' title rule for date file: {base_fn}") print(f" - Applying 'MM-DD-Daily' title rule for date file: {base_fn}")
parsed_fm['title'] = f"{month}-{day}-Daily" # Use month and day parsed_fm['title'] = f"{month}-{day}-Daily AI Daily" # Use month and day
parsed_fm['linkTitle'] = f"{month}-{day}-Daily"
# NEW: Update 'next' field for _index.md # NEW: Update 'next' field for _index.md
if base_fn == "_index.md": if base_fn == "_index.md":

View File

@@ -276,7 +276,8 @@ jobs:
if date_file_match: if date_file_match:
year, month, day = date_file_match.groups() # Capture year, month, and day year, month, day = date_file_match.groups() # Capture year, month, and day
print(f" - Applying 'MM-DD-Daily' title rule for date file: {base_fn}") print(f" - Applying 'MM-DD-Daily' title rule for date file: {base_fn}")
parsed_fm['title'] = f"{month}-{day}-Daily" # Use month and day parsed_fm['title'] = f"{month}-{day}-Daily AI Daily" # Use month and day
parsed_fm['linkTitle'] = f"{month}-{day}-Daily"
# NEW: Update 'next' field for _index.md # NEW: Update 'next' field for _index.md
if base_fn == "_index.md": if base_fn == "_index.md":

View File

@@ -300,7 +300,8 @@ jobs:
if date_file_match: if date_file_match:
year, month, day = date_file_match.groups() # Capture year, month, and day year, month, day = date_file_match.groups() # Capture year, month, and day
print(f" - Applying 'MM-DD-Daily' title rule for date file: {base_fn}") print(f" - Applying 'MM-DD-Daily' title rule for date file: {base_fn}")
parsed_fm['title'] = f"{month}-{day}-Daily" # Use month and day parsed_fm['title'] = f"{month}-{day}-Daily AI Daily" # Use month and day
parsed_fm['linkTitle'] = f"{month}-{day}-Daily"
# NEW: Update 'next' field for _index.md # NEW: Update 'next' field for _index.md
if base_fn == "_index.md": if base_fn == "_index.md":

View File

@@ -178,8 +178,8 @@ jobs:
( (
printf -- "---\ntitle: %s-%s-日刊\nweight: %d\nbreadcrumbs: false\ncomments: true\ndescription: \"%s\"\n---\n\n" \ printf -- "---\nlinkTitle: %s-%s-日刊\ntitle: %s-%s-日刊-AI日报\nweight: %d\nbreadcrumbs: false\ncomments: true\ndescription: \"%s\"\n---\n\n" \
"$MONTH" "$DAY" "$weight" "$local_description" "$MONTH" "$DAY" "$MONTH" "$DAY" "$weight" "$local_description"
cat "$source_file" cat "$source_file"
) > "$TARGET_FILE" ) > "$TARGET_FILE"
echo "已归档到 $TARGET_FILE (或已更新)" echo "已归档到 $TARGET_FILE (或已更新)"
@@ -239,7 +239,7 @@ jobs:
echo "--- 步骤 4: 更新主索引页面 (content/cn/_index.md) ---" echo "--- 步骤 4: 更新主索引页面 (content/cn/_index.md) ---"
TARGET_INDEX="$TARGET_CONTENT_DIR/_index.md" TARGET_INDEX="$TARGET_CONTENT_DIR/_index.md"
FRONTMATTER="---\ntitle: Today's Daily\nbreadcrumbs: false\n" FRONTMATTER="---\nlinkTitle: Today's Daily\ntitle: Today's Daily-AI日报\nbreadcrumbs: false\n"
# The 'next' link should point to the second latest note, which is now an archived page. # The 'next' link should point to the second latest note, which is now an archived page.
if [ -n "$SECOND_LATEST_NOTE" ] && [ "$LATEST_NOTE" != "$SECOND_LATEST_NOTE" ]; then # Ensure there IS a second latest note if [ -n "$SECOND_LATEST_NOTE" ] && [ "$LATEST_NOTE" != "$SECOND_LATEST_NOTE" ]; then # Ensure there IS a second latest note
FILENAME_SECOND_LATEST=$(basename "$SECOND_LATEST_NOTE" .md) FILENAME_SECOND_LATEST=$(basename "$SECOND_LATEST_NOTE" .md)
@@ -262,4 +262,4 @@ jobs:
commit_message: "chore(content): 自动同步每日文章及更新主页" commit_message: "chore(content): 自动同步每日文章及更新主页"
file_pattern: 'content/*' # Only commit changes in content directory file_pattern: 'content/*' # Only commit changes in content directory
commit_user_name: "GitHub Actions Bot" commit_user_name: "GitHub Actions Bot"
commit_user_email: "actions@github.com" commit_user_email: "actions@github.com"

View File

@@ -1,6 +1,32 @@
/* h1:first-of-type {
给这个hugo模板代码生成css要全局水平居中不要设置最大宽度限制 display: none;
*/ }
.content :where(img):not(:where([class~=not-prose],[class~=not-prose] *)) {
margin-left: auto;
margin-right: auto;
margin-top: 0.5rem;
margin-bottom: 0.5rem;
border-radius: .375rem;
max-width: 100%;
min-width: 100%;
}
video {
margin-left: auto;
margin-right: auto;
margin-top: 1rem;
margin-bottom: 1rem;
border-radius: .375rem;
max-width: 100%;
min-width: 100%;
}
br {
display: block;
content: "";
margin-top: 20px;
}
footer .hx-max-w-screen-xl{ footer .hx-max-w-screen-xl{
max-width: 100%; max-width: 100%;

View File

@@ -1,5 +1,5 @@
# Hugo configuration file # Hugo configuration file
title: 何夕2077的 AI 日报 / Hex2077's AI Daily AI信息一网打尽每天3分钟洞悉行业新动向 title: 何夕2077的AI日报 AI Daily AI信息一网打尽洞悉行业新动向
timezone: Asia/Shanghai timezone: Asia/Shanghai
enableRobotsTXT: true enableRobotsTXT: true
@@ -138,4 +138,4 @@ languages:
ja: ja:
contentDir: content/ja contentDir: content/ja
languageName: 日本語 languageName: 日本語
weight: 4 weight: 4

View File

@@ -1,3 +1,7 @@
<meta name="twitter:site" content="@justlikemaki">
<meta name="twitter:image" content="{{ .Site.BaseURL }}/images/logo-dark.png">
<meta name="og:image" content="{{ .Site.BaseURL }}/images/logo-dark.png">
{{ if .IsTranslated }} {{ if .IsTranslated }}
{{ range .AllTranslations }} {{ range .AllTranslations }}
<link rel="alternate" hreflang="{{ .Language.Lang }}" href="{{ .Permalink }}" /> <link rel="alternate" hreflang="{{ .Language.Lang }}" href="{{ .Permalink }}" />