利用ガイド

インストール

PyPIからインストール可能です。

pipを使ったインストール例
pip install atsphinx-goto-top

使い方

``conf.py``に登録するだけで使用可能になります。

conf.py
extensions = [
    ..., # Other your extensions
    "atsphinx.goto_top",
]

ドキュメントのビルド時に、ページ下部へボタンが追加されるようになります。

設定

goto_top_design
Type: string
Default: ""

Select design type of navigation button. If this value is not None, builder auto detect or use "text" preset.

Preset types:

  • "text": Simple text.

  • "image": Use SVG (arrow-up-to-line).

When this value is neither None or preset types, builder will raises error.

goto_top_text
Type: string or None
Default: None

This value is used as text value of built-in button.

  • goto_top_design == "text": Body text of button.

  • goto_top_design == "image": Alternation texts of button.

If this value is not set, extension will render "Back to top" or translated text.

goto_top_side
Type: string
Default: "right"

This value is used as CSS property. You muse set "left" or "right"

goto_top_scroll_behavior
Type: string
Default: "auto"

Behavior value of window.scrollTop() method when button is clicked.

See it: https://developer.mozilla.org/en-US/docs/Web/API/Window/scrollTo#options

goto_top_template_id
Type: string
Default: "tmpl_gotoTop"

This value is used for id <template> element.

You need not set it other than ID id conflicted.

goto_top_content_id
Type: string
Default: "gotoTop"

You need not set it other than ID id conflicted.