This commit is contained in:
何夕2077
2025-06-24 08:00:11 +00:00
parent 5b549d64af
commit 1d6a83e8d4
2 changed files with 43 additions and 56 deletions

View File

@@ -9,7 +9,7 @@ on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
schedule:
- cron: '35 0 * * *' # 每天 UTC 时间 0 点运行 (北京时间16点)
- cron: '0 */2 * * *' # Runs every 2 hours
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:

View File

@@ -1,83 +1,70 @@
# Hextra Starter Template
# Hextra AI Insight Daily 每日 AI 新闻站AI洞察日报前端 🤖
[![Deploy Hugo site to Pages](https://github.com/imfing/hextra-starter-template/actions/workflows/pages.yaml/badge.svg)](https://github.com/imfing/hextra-starter-template/actions/workflows/pages.yaml)
[![Netlify Status](https://api.netlify.com/api/v1/badges/6e83fd88-5ffe-4808-9689-c0f3b100bfe3/deploy-status)](https://app.netlify.com/sites/hextra-starter-template/deploys)
![Vercel Deployment Status](https://img.shields.io/github/deployments/imfing/hextra-starter-template/production?logo=vercel&logoColor=white&label=vercel&labelColor=black&link=https%3A%2F%2Fhextra-starter-template.vercel.app%2F)
一个基于 [Hextra Starter Template](https://github.com/imfing/hextra-starter-template) 和 [CloudFlare-AI-Insight-Daily](https://github.com/justlovemaki/CloudFlare-AI-Insight-Daily) 的全自动化 AI 新闻发布项目。
> ✨ **项目愿景**:每日清晨,自动为您抓取、汇总并发布最新的 AI 行业动态,让您轻松掌握前沿资讯。
🐣 Minimal template for getting started with [Hextra](https://github.com/imfing/hextra)
---
![hextra-template](https://github.com/imfing/hextra-starter-template/assets/5097752/c403b9a9-a76c-47a6-8466-513d772ef0b7)
### 💡 项目简介
[🌐 Demo ↗](https://imfing.github.io/hextra-starter-template/)
本项目结合了强大的后端自动化脚本与优雅的前端展示模板,旨在打造一个零成本、免维护的个人 AI 新闻聚合站。
## Quick Start
* **后端驱动**:核心逻辑由 [CloudFlare-AI-Insight-Daily](https://github.com/justlovemaki/CloudFlare-AI-Insight-Daily) 提供,利用 Cloudflare Workers 和 AI 实现新闻内容的自动化处理。
* **前端呈现**:网站基于 [Hextra](https://imfing.github.io/hextra/) 主题构建,风格现代、响应式,并针对阅读进行了优化。
Use this template to create your own repository:
### ✨ 主要特性
<img src="https://docs.github.com/assets/cb-77734/mw-1440/images/help/repository/use-this-template-button.webp" width=400 />
* 🤖 **全自动化**:每日定时抓取、生成并发布 AI 新闻,无需人工干预。
* ☁️ **零成本部署**:完美支持 GitHub Pages、Vercel、Netlify 等免费静态托管平台。
* 🎨 **精美主题**:基于优雅、现代的 Hextra 主题,提供卓越的阅读体验。更有暗嘿模式,看新闻也能有点小刺激。
* 🚀 **快速启动**:提供一键部署模板,几分钟内即可拥有自己的新闻站。
You can also quickly start developing using the following online development environment:
[![默认主题](docs/images/light.png)]
[![暗黑主题](docs/images/dark.png)]
- [GitHub Codespaces](https://github.com/codespaces)
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/imfing/hextra-starter-template)
### 🚀 快速开始与部署
Create a new codespace and follow the [Local Development](#local-development) to launch the preview
您可以选择以下任一平台,轻松将此项目部署上线。
- [Gitpod](https://gitpod.io)
---
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/imfing/hextra-starter-template)
#### 🐙 部署到 GitHub Pages
项目内置了 GitHub Actions 工作流,可以自动构建和发布网站到 GitHub Pages。
## Deployment
1. **Fork 本项目** 到您自己的 GitHub 账户。
2. **启动工作流**:工作流通常会在您 Fork 后自动触发。如果未能自动运行,您可以前往仓库的 `Actions` 标签页,手动触发 `pages.yaml` 工作流。
### GitHub Pages
> **⚠️ 重要提示**
> 请务必在您的仓库 `Settings` -> `Pages` 设置中将部署源Source更改为 **GitHub Actions**。
>
> <img src="https://github.com/imfing/hextra-starter-template/assets/5097752/99676430-884e-42ab-b901-f6534a0d6eee" width="600" alt="GitHub Pages Source Setting" />
A GitHub Actions workflow is provided in [`.github/workflows/pages.yaml`](./.github/workflows/pages.yaml) to [publish to GitHub Pages](https://github.blog/changelog/2022-07-27-github-pages-custom-github-actions-workflows-beta/) for free.
---
For details, see [Publishing with a custom GitHub Actions workflow](https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site#publishing-with-a-custom-github-actions-workflow).
#### ⚡️ 部署到 Netlify
Note: in the settings, make sure to set the Pages deployment source to **GitHub Actions**:
点击下方按钮,一键将项目部署到 Netlify
<img src="https://github.com/imfing/hextra-starter-template/assets/5097752/99676430-884e-42ab-b901-f6534a0d6eee" width=600 />
[![部署到 Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/justlovemaki/Hextra-AI-Insight-Daily)
[Run the workflow manually](https://docs.github.com/en/actions/using-workflows/manually-running-a-workflow) if it's not triggered automatically.
---
### Netlify
#### ▲ 部署到 Vercel
[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/imfing/hextra-starter-template)
点击下方按钮,一键将项目克隆并部署到 Vercel
### Vercel
[![部署到 Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fjustlovemaki%2FHextra-AI-Insight-Daily&env=HUGO_VERSION)
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fimfing%2Fhextra-starter-template&env=HUGO_VERSION)
> **⚙️ 配置覆盖**
> 部署时,您可能需要覆盖默认的构建配置,以确保 Hugo 正常工作。请在 Vercel 的项目设置中,按下图所示进行配置:
>
> <img src="https://github.com/imfing/hextra-starter-template/assets/5097752/e2e3cecd-c884-47ec-b064-14f896fee08d" width="600" alt="Vercel Configuration Override" />
Override the configuration:
### 🤝 欢迎贡献
<img src="https://github.com/imfing/hextra-starter-template/assets/5097752/e2e3cecd-c884-47ec-b064-14f896fee08d" width=600 />
## Local Development
Pre-requisites: [Hugo](https://gohugo.io/getting-started/installing/), [Go](https://golang.org/doc/install) and [Git](https://git-scm.com)
```shell
# Clone the repo
git clone https://github.com/imfing/hextra-starter-template.git
# Change directory
cd hextra-starter-template
# Start the server
hugo mod tidy
hugo server --logLevel debug --disableFastRender -p 1313
```
### Update theme
```shell
hugo mod get -u
hugo mod tidy
```
See [Update modules](https://gohugo.io/hugo-modules/use-modules/#update-modules) for more details.
我们欢迎任何形式的贡献!如果您有好的想法或发现了 Bug请随时
* 提交一个 [Issue](https://github.com/justlovemaki/Hextra-AI-Insight-Daily/issues)
* 或者创建一个 [Pull Request](https://github.com/justlovemaki/Hextra-AI-Insight-Daily/pulls)