自动链接bug跟踪器引用。
pelican-link-bugs的Python项目详细描述
自动将内容中的错误/问题引用链接到跟踪器。
默认情况下,它将链接github的pull请求和问题 采用以下格式:
* I should reiview PR mozilla/bedrock#1. * Don't forget to watch issue twbs/bootstrap#2.
它还将链接到mozilla的bugzilla实例:
Need a laugh? Read bug 765645.
您可以很容易地用设置替换或添加这些设置:
BUG_TRACKERS={# key is the regexr'issue +(?P<bug_repo>[a-z1-9-_/]+)#(?P<bug_id>\d+)':# value is URL template with keywoard substitutions'https://github.com/{bug_repo}/issue/{bug_id}',}
您还可以从pelican_bugs导入BUG_TRACKERS并对其进行修改。 如果需要更改链接的外观,可以设置BUG_LINK_TEMPLATE。 链接模板可以使用bug_url和bug_text关键字:
# default templateBUG_LINK_TEMPLATE='<a href="{bug_url}">{bug_text}</a>'