diff --git a/aio/tools/transforms/templates/api/base.template.html b/aio/tools/transforms/templates/api/base.template.html index 9921669f26..9c0631811a 100644 --- a/aio/tools/transforms/templates/api/base.template.html +++ b/aio/tools/transforms/templates/api/base.template.html @@ -1,4 +1,4 @@ -{% import "../githubLinks.html" as github -%} +{% import "../lib/githubLinks.html" as github -%} {% set comma = joiner(',') %} {% set breadcrumbDelimiter = joiner('>') %}
diff --git a/aio/tools/transforms/templates/api/includes/info-bar.html b/aio/tools/transforms/templates/api/includes/info-bar.html index e915cee065..304426324a 100644 --- a/aio/tools/transforms/templates/api/includes/info-bar.html +++ b/aio/tools/transforms/templates/api/includes/info-bar.html @@ -1,4 +1,4 @@ -{% import "../../githubLinks.html" as github -%} +{% import "../../lib/githubLinks.html" as github -%}
diff --git a/aio/tools/transforms/templates/content.template.html b/aio/tools/transforms/templates/content.template.html index d6681359ce..b610eb43e1 100644 --- a/aio/tools/transforms/templates/content.template.html +++ b/aio/tools/transforms/templates/content.template.html @@ -1,12 +1,12 @@ -{% import "githubLinks.html" as github -%} +{% import "lib/githubLinks.html" as github -%} {% set relativePath = doc.fileInfo.relativePath %} {% if doc.title %}{$ ('# ' + doc.title.trim()) | marked $}{% endif %} {% if 'guide/' in relativePath or 'tutorial/' in relativePath or 'docs.md' in relativePath %} -
- + {% endif %}
{$ doc.description | marked $} -
\ No newline at end of file +
diff --git a/aio/tools/transforms/templates/githubLinks.html b/aio/tools/transforms/templates/githubLinks.html deleted file mode 100644 index dc5e7092bc..0000000000 --- a/aio/tools/transforms/templates/githubLinks.html +++ /dev/null @@ -1,23 +0,0 @@ -{% macro projectRelativePath(fileInfo) -%} -{$ fileInfo.realProjectRelativePath if fileInfo.realProjectRelativePath else fileInfo.projectRelativePath $} -{%- endmacro %} - -{% macro githubViewHref(doc, versionInfo) -%} -https://github.com/{$ versionInfo.gitRepoInfo.owner $}/{$ versionInfo.gitRepoInfo.repo $}/tree/{$ versionInfo.currentVersion.isSnapshot and versionInfo.currentVersion.SHA or versionInfo.currentVersion.raw $}/packages/{$ doc.fileInfo.realProjectRelativePath or doc.fileInfo.relativePath $}#L{$ doc.startingLine + 1 $}-L{$ doc.endingLine + 1 $} -{%- endmacro -%} - -{% macro githubEditHref(doc, versionInfo) -%} -https://github.com/{$ versionInfo.gitRepoInfo.owner $}/{$ versionInfo.gitRepoInfo.repo $}/edit/master{$ '/packages' if doc.docType !== 'content' $}/{$ projectRelativePath(doc.fileInfo) $}?message=docs( - {%- if doc.moduleDoc %}{$ doc.moduleDoc.id.split('/')[0] $} - {%- elseif doc.docType === 'package' %}{$ doc.id.split('/')[0] $} - {%- elseif doc.docType === 'content' %}aio - {%- else %}...{%- endif -%} -)%3A%20describe%20your%20change...{% if doc.docType !== 'content' %}#L{$ doc.startingLine + 1 $}-L{$ doc.endingLine + 1 $}{% endif %} -{%- endmacro -%} - -{% macro githubLinks(doc, versionInfo) -%} - -{%- endmacro -%} diff --git a/aio/tools/transforms/templates/lib/githubLinks.html b/aio/tools/transforms/templates/lib/githubLinks.html new file mode 100644 index 0000000000..b2ff267efd --- /dev/null +++ b/aio/tools/transforms/templates/lib/githubLinks.html @@ -0,0 +1,31 @@ +{% macro projectRelativePath(fileInfo) -%} +{$ fileInfo.realProjectRelativePath if fileInfo.realProjectRelativePath else fileInfo.projectRelativePath $} +{%- endmacro %} + +{% macro githubViewHref(doc, versionInfo) -%} +https://github.com/{$ versionInfo.gitRepoInfo.owner $}/{$ versionInfo.gitRepoInfo.repo $}/tree/{$ versionInfo.currentVersion.isSnapshot and versionInfo.currentVersion.SHA or versionInfo.currentVersion.raw $}/packages/{$ doc.fileInfo.realProjectRelativePath $}#L{$ doc.startingLine + 1 $}-L{$ doc.endingLine + 1 $} +{%- endmacro %} + +{% macro githubEditHref(doc, versionInfo) -%} +https://github.com/{$ versionInfo.gitRepoInfo.owner $}/{$ versionInfo.gitRepoInfo.repo $}/edit/master{$ '/packages' if doc.docType !== 'content' $}/{$ projectRelativePath(doc.fileInfo) $}?message=docs + {%- if doc.moduleDoc %}({$ doc.moduleDoc.id.split('/')[0] $}) + {%- elseif doc.docType === 'module' %}({$ doc.id.split('/')[0] $}) + {%- elseif doc.docType === 'content' %} + {%- else %}(...){%- endif -%} +%3A%20describe%20your%20change...{% if doc.docType !== 'content' %}#L{$ doc.startingLine + 1 $}-L{$ doc.endingLine + 1 $}{% endif %} +{%- endmacro %} + +{% macro githubEditLink(doc, versionInfo) -%} + +{%- endmacro %} + +{% macro githubViewLink(doc, versionInfo) -%} + +{%- endmacro %} + +{% macro githubLinks(doc, versionInfo) -%} + +{%- endmacro -%} diff --git a/aio/tools/transforms/templates/overview-dump.template.html b/aio/tools/transforms/templates/overview-dump.template.html index c51538a6cc..41b383efd4 100644 --- a/aio/tools/transforms/templates/overview-dump.template.html +++ b/aio/tools/transforms/templates/overview-dump.template.html @@ -1,4 +1,4 @@ -{% import "githubLinks.html" as github -%} +{% import "lib/githubLinks.html" as github -%} {% import "api/lib/memberHelpers.html" as members -%} {% macro goToCode(doc) %}{% endmacro %} {% macro label(test, class, text) %}{% if test %}{% endif %}{% endmacro %}