利用ガイド¶
インストール¶
PyPIからインストール可能です。
pip install atsphinx-goto-top
使い方¶
``conf.py``に登録するだけで使用可能になります。
extensions = [
..., # Other your extensions
"atsphinx.goto_top",
]
ドキュメントのビルド時に、ページ下部へボタンが追加されるようになります。
設定¶
- goto_top_design¶
- Type: stringDefault:
""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
Noneor preset types, builder will raises error.
- goto_top_text¶
- Type: string or NoneDefault:
NoneThis 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: stringDefault:
"right"This value is used as CSS property. You muse set
"left"or"right"
- goto_top_scroll_behavior¶
- Type: stringDefault:
"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: stringDefault:
"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: stringDefault:
"gotoTop"You need not set it other than ID id conflicted.