update edit repository
This commit is contained in:
@@ -95,7 +95,7 @@ def make_github_link(app, project, path, line=None, mode="blob"):
|
||||
urlpath = f"/{app.config.github_user}/{project}/{mode}/{branch}/{path}"
|
||||
return werkzeug.urls.url_unparse((
|
||||
'https',
|
||||
'github.com',
|
||||
'git.nextzenos.com',
|
||||
urlpath,
|
||||
'',
|
||||
'' if line is None else 'L%d' % line
|
||||
@@ -112,5 +112,5 @@ def add_doc_link(app, pagename, templatename, context, doctree):
|
||||
# may be useful in the future
|
||||
source_suffix = app.config.source_suffix
|
||||
source_suffix = next(iter(source_suffix))
|
||||
context['github_link'] = lambda mode='edit': make_github_link(
|
||||
context['github_link'] = lambda mode='_edit': make_github_link(
|
||||
app, project=app.config.github_project, path=f'content/{pagename}{source_suffix}', mode=mode)
|
||||
|
||||
@@ -116,9 +116,9 @@
|
||||
{%- block body %} {%- endblock %}
|
||||
</div>
|
||||
{%- if github_link and pagename != 'search' and not pagename.startswith('legal') %}
|
||||
<a href="{{ github_link(mode='edit') }}"
|
||||
<a href="{{ github_link(mode='_edit') }}"
|
||||
class="o_git_link d-none d-lg-inline-block">
|
||||
<i class="i-edit"></i> Edit on GitHub
|
||||
<i class="i-edit"></i> Edit on Repository
|
||||
</a>
|
||||
{%- endif %}
|
||||
</article>
|
||||
|
||||
Reference in New Issue
Block a user