Skip to content

CLI option --style does not serve CSS when --viewer is specified #755

@MurakamiShinyu

Description

@MurakamiShinyu

--viewerオプションでViewerのURLを指定したとき、--style オプションで指定するCSSが有効になりません。

例:

$ echo '# Hello' > sample.md
$ echo 'h1 { color: green; }' > style.css
$ vivliostyle build --viewer https://vivliostyle.vercel.app --style style.css sample.md 

INFO Start preview
INFO [vite] Port 13000 is in use, trying another one...

Vivliostyle CLI v10.3.1
║ 📕 Up and running (press Ctrl+C to quit)
╙─ Preview URL: https://vivliostyle.vercel.app/#src=http://localhost:13001/vivliostyle/.vs-1773106377760.publication.json&bookMode=true&renderAllPages=true&style=/vivliostyle/style.css

この「Preview URL」を見ると、style=/vivliostyle/style.css のようにViewerへのstyleパラメーターが渡されており、このURLは https://vivliostyle.vercel.app/vivliostyle/style.css を指すことになり、ファイルが見つからない(404エラー)となってます。

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions