Template:Repo link: Difference between revisions

Jump to navigation Jump to search
Full GitLab repository link support, including paths, branches, tags, commits, different views, and line numbers or ranges.
(The text '/~' is no longer appended to the tag parameter for SourceForge git repositories.)
(Full GitLab repository link support, including paths, branches, tags, commits, different views, and line numbers or ranges.)
Line 275: Line 275:
     -->{{#switch: {{{type|git web}}} <!--                          The URL type. -->
     -->{{#switch: {{{type|git web}}} <!--                          The URL type. -->
         | git = .git<!--                                          Append '.git' to the base repository URL. -->
         | git = .git<!--                                          Append '.git' to the base repository URL. -->
         | git web = /<!--                                         TODO: The rest of the URL. -->
         | git web = <!--
      -->{{#if: {{{view|{{{commit|{{{tag|{{{branch|{{{path|}}}}}}}}}}}}}}}
          | /<!--
        -->{{{view|blob}}}/<!--                                    The repository view.
        -->{{{commit|{{{tag|{{{branch|master}}}}}}}}}<!--          The branch or commit.
        -->{{#if: {{{path|}}} | /{{{path}}}}}<!--                  The file or directory path.
        -->{{#if: {{{line|}}} | &#35;L{{{line}}} }} <!--            The optional line number(s). -->
        }}
         | zip = /repository/archive.zip<!--                        The base zip file URL.
         | zip = /repository/archive.zip<!--                        The base zip file URL.
         -->{{#if: {{{commit|{{{tag|{{{branch|master}}}}}}}}}
         -->{{#if: {{{commit|{{{tag|{{{branch|master}}}}}}}}}

Navigation menu