Skip to content

ZhgChgLi/tripezgo.github.io

Repository files navigation

Tripezgo

一頁式旅遊商品導購網站,以每月優惠快報形式展示商品與延伸文章。網站使用 Jekyll,可部署到 GitHub Pages。

本機開發

bin/setup
bin/dev

開啟 http://127.0.0.1:4000bin/dev 會啟動 Jekyll live reload,修改 markdown、layout、CSS 或 JS 後會自動重新產生。

可用環境變數調整 host 與 port:

PORT=4100 bin/dev
HOST=0.0.0.0 PORT=4100 bin/dev
LIVERELOAD_PORT=35731 bin/dev

本地測試與 Debug

bin/doctor
bin/test
  • bin/doctor:確認 Ruby、Bundler、gems 與範例快報狀態。
  • bin/test:用 production 環境執行 jekyll build --strict_front_matter --trace,再檢查首頁、月報頁、商品 CTA、倒數 ISO 時間與文章欄目。
  • make devmake testmake build 也可以使用。

清除 Jekyll 輸出:

make clean

部署到 GitHub Pages

此專案已包含 GitHub Actions workflow:.github/workflows/pages.yml

  1. 到 GitHub repo 的 SettingsPages
  2. Build and deploymentSourceGitHub Actions
  3. 確認 default branch 是 main
  4. Push 到 main 後,GitHub Actions 會執行 bin/test,成功後部署 _site 到 GitHub Pages。

自訂網域使用根目錄 CNAME

tripezgo.com

DNS 需要指到 GitHub Pages。若使用 apex domain tripezgo.com,在 DNS 設定 A records 到 GitHub Pages IP;若使用 www.tripezgo.com,用 CNAME 指到 ZhgChgLi.github.io

新增每月快報

_reports 新增 YYYY-MM.md,並用 YAML front matter 維護商品與文章資料。首頁會自動依 month 取最新月份。

商品欄位:

  • name
  • image
  • description
  • tags
  • price
  • sale_price
  • url
  • offer_ends_at,選填,ISO 時間字串
  • category,選填,用來分組顯示商品
  • category_en,選填,分類英文短標
  • category_hint,選填,分類說明文字

文章欄位:

  • title
  • image
  • url
  • source,選填

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors