Skip to content

sforzando/sfz.dev

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

86 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:                     構築 - 本番用静的サイトをビルド
* clean:                     掃除 - テスト結果を削除
* default:                   一覧 - タスクの一覧を表示
* deploy:                    配備 - Netlifyへデプロイ
* format:                    整形 - コードフォーマット実行
* install:                   導入 - 依存パッケージをインストール
* lighthouse:                試験 - Lighthouseパフォーマンス計測(本番ビルドで実行、スコアアサーション付き)
* open:                      閲覧 - ブラウザで開く
* outdated:                  点検 - 依存パッケージの更新を確認
* restart:                   再起 - Hugo開発サーバーを再起動
* setup:                     初回 - 初期セットアップ
* start:                     開始 - Hugo開発サーバー起動(LAN内スマホからもアクセス可)      (aliases: dev)
* stop:                      停止 - Hugo開発サーバーを全て停止
* test:                      試験 - ローカルサーバーでPlaywrightテスト実行
* build:css:                 構築 - TailwindCSSをビルド
* check:layouts:             点検 - Congoテーマのレイアウトオーバーライドを確認
* generate:dummy:            生成 - テスト用ダミーコンテンツを生成(ex. task generate:dummy -- works 5)
* gs:hide:                   秘匿 - git-secretで秘密情報を暗号化
* gs:reveal:                 暴露 - git-secretで秘密情報を復号化
* install:ci:                導入 - CI環境用依存パッケージをインストール
* lint:markdown:             検査 - Markdownlintでマークダウンを検査
* outdated:versions:         点検 - ツール(Congo/Hugo/Go)のバージョンを確認
* test:ci:                   試験 - CI環境でPlaywrightテスト実行
* test:headless:             試験 - ローカルサーバーでPlaywrightテスト実行(ヘッドレスモード)
* test:prod:                 試験 - 本番サーバーでPlaywrightテスト実行
* update:changelog:          記録 - CHANGELOGを更新
* update:dependencies:       追随 - 依存パッケージを更新
* update:theme:              追随 - Congoテーマを更新

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.

Generate Dummy Content

Generate dummy content for testing layouts and snapshots.

task generate:dummy -- works 5
task generate:dummy -- posts 3

Use --force to overwrite existing files.

task generate:dummy -- works 5 --force

Warning: --force overwrites existing dummy files without confirmation.

Dummy photos for works are automatically downloaded from Lorem Picsum.

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 --checkout 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