vivliostyle-cli icon indicating copy to clipboard operation
vivliostyle-cli copied to clipboard

CLI option `--style` does not serve CSS correctly

Open u1f992 opened this issue 5 months ago • 0 comments

from: https://x.com/sierra2501/status/1950188020323197134

原稿HTMLがカレントディレクトリ以外にある場合、ビルド時にCSSの読み込みに失敗します。

> vivliostyle --version
cli: 9.4.0
core: 2.33.2

> wsl tree
.
└── content
    ├── index.html
    └── theme
        └── theme.css

3 directories, 2 files

> vivliostyle build content/index.html --style content/theme/theme.css
INFO Start building
INFO Launching PDF build environment
INFO Building pages
ERROR 404 http://localhost:13000/vivliostyle/content/theme/theme.css
INFO Building PDF
INFO Processing PDF
SUCCESS Finished building output.pdf
📗 Built successfully!

プレビュー時にはCSSを読み込んでいます。

カレントディレクトリをHTMLのディレクトリに移した場合もCSSを読み込みます。

詳細
> cd content
content> vivliostyle build index.html --style theme/theme.css
INFO Start building
INFO Launching PDF build environment
INFO Building pages
INFO Building PDF
INFO Processing PDF
SUCCESS Finished building output.pdf
📙 Built successfully!

u1f992 avatar Jul 31 '25 05:07 u1f992