• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

myyasuda/sphinx_materialdesign_theme: Material Design Html Theme for Sphinx.

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

myyasuda/sphinx_materialdesign_theme

开源软件地址(OpenSource Url):

https://github.com/myyasuda/sphinx_materialdesign_theme

开源编程语言(OpenSource Language):

CSS 71.0%

开源软件介绍(OpenSource Introduction):

Material Design HTML Theme for Sphinx

PyPI version CircleCI

Demo Document

Requirements

  • python
    • Sphinx

Quick Start

Install the latest version of sphinx_materialdesign_theme with pip.

pip install sphinx_materialdesign_theme

Add the following line to conf.py.

html_theme = 'sphinx_materialdesign_theme'

Html theme options

The following is a description of the options that can be specified in html_theme_options in your project's conf.py.

html_theme_options = {
    # Specify a list of menu in Header.
    # Tuples forms:
    #  ('Name', 'external url or path of pages in the document', boolean, 'icon name')
    #
    # Third argument:
    # True indicates an external link.
    # False indicates path of pages in the document.
    #
    # Fourth argument:
    # Specify the icon name.
    # For details see link.
    # https://material.io/icons/
    'header_links' : [
        ('Home', 'index', False, 'home'),
        ("ExternalLink", "http://example.com", True, 'launch'),
        ("NoIconLink", "http://example.com", True, ''),
        ("GitHub", "https://github.com/myyasuda/sphinx_materialdesign_theme", True, 'link')
    ],

    # Customize css colors.
    # For details see link.
    # https://getmdl.io/customize/index.html
    #
    # Values: amber, blue, brown, cyan deep_orange, deep_purple, green, grey, indigo, light_blue,
    #         light_green, lime, orange, pink, purple, red, teal, yellow(Default: indigo)
    'primary_color': 'indigo',
    # Values: Same as primary_color. (Default: pink)
    'accent_color': 'pink',

    # Customize layout.
    # For details see link.
    # https://getmdl.io/components/index.html#layout-section
    'fixed_drawer': True,
    'fixed_header': True,
    'header_waterfall': True,
    'header_scroll': False,

    # Render title in header.
    # Values: True, False (Default: False)
    'show_header_title': False,
    # Render title in drawer.
    # Values: True, False (Default: True)
    'show_drawer_title': True,
    # Render footer.
    # Values: True, False (Default: True)
    'show_footer': True
}

Developer's Tips

packaging

python setup.py sdist

install

pip install dist/sphinx_materialdesign_theme-${version}.tar.gz

Resister PyPI

python setup.py register sdist upload

Build Example's Document

sphinx-build -b html ./example ./_build -c ./example

License

thirdparty version license URL
Material Design Lite 1.3.0 Apache 2.0 https://github.com/google/material-design-lite/blob/mdl-1.x/LICENSE
Material design icons 3.0.1 Apache 2.0 https://github.com/google/material-design-icons/blob/master/LICENSE



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap