跳转到主要内容

巧妙命名的alabaster子主题,适用于git-pull项目

项目描述

Sphinx子主题,为Alabaster,用于git-pull项目。

alagitpull为Alabaster添加了什么

https://www.git-pull.comhttps://tmuxp.git-pull.com等网站上查看主题的实时效果。

  • 表格CSS调整

  • <pre>和代码块CSS调整

  • 针对类似..note的警告等提醒的额外主题调整

  • 新的侧边栏模板,包含项目链接

    • 自动取消链接当前文档中的项目

    • 支持子项目(括号内)

  • 侧边栏CSS调整

配置选项

主题变量

要查看可传递给HTML模板的完整选项列表,请参阅theme.conf。并非所有这些选项都在主题本身中使用,但为了让html_theme_options传递它们,如果您想的话。

配置,请参考conf.py

html_theme_options 示例

html_theme_options = {
    'logo': 'img/logo.svg',
    'github_user': 'git-pull',
    'github_repo': 'alagitpull',
    'github_type': 'star',
    'github_banner': True,
    'projects': {},
    'project_name': 'my project name',
}

关于 html_theme_options['projects'] 的示例,请查看 alagitpull/__init__.py 文件。

使用可选变量(如 theme_show_meta_app_icons_tags)的示例

html_theme_options = {
    # ...usual stuff, as above, and
    'project_description': 'description of project'
}
{%- if theme_show_meta_app_icon_tags == true %}
<meta name="theme-color" content="#ffffff">
<meta name="application-name" content="{{ theme_project_description }}">

<link rel="shortcut icon" href="/_static/favicon.ico">
<link rel="icon" type="image/png" sizes="512x512" href="/_static/img/icons/icon-512x512.png">
<link rel="icon" type="image/png" sizes="192x192" href="/_static/img/icons/icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="/_static/img/icons/icon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="/_static/img/icons/icon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="/_static/img/icons/icon-16x16.png">

<!-- Apple -->
<meta name="apple-mobile-web-app-title" content="{{ theme_project_name }}">

<link rel="apple-touch-icon" sizes="192x192" href="/_static/img/icons/icon-192x192.png">
<link rel="mask-icon" href="/_static/img/{{ theme_project_name }}.svg" color="grey">

<!-- Microsoft -->
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="/_static/img/icons/ms-icon-144x144.png">
{% endif -%}

变量

alagitpull_external_hosts_new_window(布尔值,默认:False):检查链接是否为外部域名/IP。如果是,则在新的窗口中打开。

alagitpull_external_hosts_new_window = True

alagitpull_internal_hosts(列表)- 允许在相同标签页中打开的白名单域名,无需 target="_blank"。仅在启用 alagitpull_external_hosts_new_window 时使用。

示例

alagitpull_internal_hosts = [
   'libtmux.git-pull.com',
   '0.0.0.0',
]

主题选项

sphinx的 conf.py 中的 html_theme_options

  • projects(字典)- 侧边栏链接。

  • project_name(字符串)- 您的项目名称(有助于取消链接

项目详情


下载文件

下载适用于您平台的文件。如果您不确定选择哪个,请了解更多关于 安装包 的信息。

源分发

alagitpull-0.1.0.tar.gz (7.5 kB 查看哈希值

上传时间:

构建分发

alagitpull-0.1.0-py2.py3-none-any.whl (8.2 kB 查看哈希值

上传时间: Python 2 Python 3

由以下支持

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误日志 StatusPage StatusPage 状态页面