Skip to content

sforzando/sfz.dev

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sfz.dev

Netlify Status Last Commit Commitizen friendly License: MIT

PC SP
PC SP

Official Corporate Web site of sforzando LLC. and Inc.

Prerequisites

How to

$ task --list
task: Available tasks for this project:
* build:                     構築 - 本番用静的サイトをビルド
* build-css:                 構築 - TailwindCSSをビルド
* clean:                     掃除 - テスト結果を削除
* default:                   常用 - 開発サーバー起動
* deploy:                    配備 - Netlifyへデプロイ
* format:                    整形 - コードフォーマット実行
* generate-dummy:            生成 - テスト用ダミーコンテンツを生成
* install:                   導入 - 依存パッケージをインストール
* install-ci:                導入 - CI環境用依存パッケージをインストール
* lighthouse:                試験 - Lighthouseパフォーマンス計測(本番ビルドで実行、スコアアサーション付き)
* lint-markdown:             検査 - Markdownlintでマークダウンを検査
* ngrok:                     転送 - ngrokでローカルサーバーを公開
* open:                      閲覧 - ブラウザで開く
* outdated:                  点検 - 依存パッケージの更新を確認
* setup:                     初回 - 初期セットアップ
* start:                     開始 - Hugo開発サーバー起動      (aliases: dev)
* stop:                      停止 - Hugo開発サーバーを全て停止
* test:                      試験 - ローカルサーバーでPlaywrightテスト実行
* test-ci:                   試験 - CI環境でPlaywrightテスト実行
* test-prod:                 試験 - 本番サーバーでPlaywrightテスト実行
* update-changelog:          記録 - CHANGELOGを更新
* update-dependencies:       追随 - 依存パッケージを更新
* update-theme:              追随 - Congoテーマを更新
* gs:hide:                   秘匿 - git-secretで秘密情報を暗号化
* gs:reveal:                 暴露 - git-secretで秘密情報を復号化

First time preparation

Prepare .envrc like this,

export MAPBOX_ACCESS_TOKEN="xxxx"
export GITHUB_TOKEN="xxxx"

Then, run task setup.

Introduce Congo

Congo theme is managed as a Git submodule at themes/congo/.

The theme is automatically initialized when you run task setup, which executes:

git submodule update --init --recursive
npm install --prefix themes/congo

TailwindCSS Build: Congo uses TailwindCSS, which must be built from source to support custom utility classes used in this project. The build process is automatically triggered when you run task start.

The build uses tailwind.config.js at the project root, which extends Congo's own themes/congo/tailwind.config.js via require() without modifying the submodule. This allows project-level customizations (e.g. font family) to be layered on top of Congo's defaults while keeping themes/ clean.

Current customizations in tailwind.config.js:

  • Font: Noto Sans JP (loaded via Google Fonts in layouts/partials/extend-head.html) set as fontFamily.sans, with fontFeatureSettings: '"palt"' for proportional spacing of Japanese characters

To manually build TailwindCSS:

task build-css

This compiles themes/congo/assets/css/main.css using tailwind.config.js and outputs to assets/css/compiled/main.css, which Hugo automatically uses instead of the theme's pre-compiled CSS.

Start

task start

Then, web server is available at http://0.0.0.0:1313/. To open it, task open.

Transfer by ngrok is convenient for checking on a smartphone, use task ngrok.

Dummy Articles

Generate dummy articles for testing.

task generate-dummy

All dummy photos from Unsplash.

Test

E2E tests is available, task test.

Deploy

To deploy this to Netlify manually, task deploy.

Update

Dependencies

task update-dependencies

Congo

To update the Congo theme to the latest stable version:

task update-theme

This executes:

git submodule update --remote --merge themes/congo
npm install --prefix themes/congo

After updating, rebuild TailwindCSS with task build-css or restart the dev server with task start.

Document

CHANGELOG

To install git-cliff via Homebrew manually, brew install git-cliff.

To update CHANGELOG.md, run:

task update-changelog

Clean

To clean up miscellaneous files, task clean.

Misc

Notes

This repository is Commitizen friendly, following GitHub flow.

LICENSE

See LICENSE.

Contributors

About

Official Web of sforzando LLC. and Inc.

Topics

Resources

License

Stars

Watchers

Forks

Contributors