Skip to content

The hash anchor to a parameter in page might be wrong #230

@YDX-2147483647

Description

@YDX-2147483647

対象ドキュメント

Hi! I met this issue when I was misusing your project, but I believe it also affects ordinary readers of the website. Therefore, I come here to raise an issue.

Sorry I can't understand Japanese…

問題

The typst-docs crate generates links to other pages with hash anchors. For example, $text.top-edge becomes /docs/reference/text/text/#parameters-top-edge, in which #parameters-top-edge locates the top-edge field in that page.

However, website/ in this project sets IDs in another pattern. The top-edge field in Text is actually #text-text-parameters-top-edge, making links to $text.top-edge broken.

Example

In Paragraph – Typstドキュメント日本語版:

https://github.com/typst-jp/typst-jp.github.io/blob/fb3a73693e35fa3a78955ce53d7207654f2f56c6/crates/typst-library/src/model/par.rs#L101

leadingは、 ある行の下端と次の行の上端との間隔を

where 上端 is https://typst-jp.github.io/docs/reference/text/text/#parameters-top-edge.

In Text – Typstドキュメント日本語版:

https://typst-jp.github.io/docs/reference/text/text/#text-text-parameters-top-edge

改善案

In Text – Typstドキュメント日本語版, change the id from #text-text-parameters-top-edge to #parameters-top-edge.

https://github.com/typst-jp/typst-jp.github.io/blob/fb3a73693e35fa3a78955ce53d7207654f2f56c6/website/src/components/ui/FunctionParameters.tsx#L26

貢献意思

  • (Done) このIssueを解決するPull Requestの作成を自身で希望する場合はチェックしてください。

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtranslationTranslation additions or improvements

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions