Template:Repo link: Difference between revisions

Jump to navigation Jump to search
Base GitHub repository URL support, if only the user/proj and repo parameters are supplied.
(Added support for the tag parameter for SourceForge SVN repositories.)
(Base GitHub repository URL support, if only the user/proj and repo parameters are supplied.)
Line 213: Line 213:
     -->{{#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 = /<!--
         | git web = <!--
      -->{{#if: {{{view|{{{commit|{{{tag|{{{branch|{{{path|}}}}}}}}}}}}}}}
          | /<!--
         -->{{{view|tree}}}/<!--                                    The repository view.
         -->{{{view|tree}}}/<!--                                    The repository view.
         -->{{{commit|{{{tag|{{{branch|master}}}}}}}}}<!--          The branch or commit.
         -->{{{commit|{{{tag|{{{branch|master}}}}}}}}}<!--          The branch or commit.
         -->{{#if: {{{path|}}} | /{{{path}}}}}<!--                  The file or directory path.
         -->{{#if: {{{path|}}} | /{{{path}}}}}<!--                  The file or directory path.
         -->{{#if: {{{line|}}} | &#35;L{{{line}}} }} <!--            The optional line number(s). -->
         -->{{#if: {{{line|}}} | &#35;L{{{line}}} }} <!--            The optional line number(s). -->
        }}
         | zip = /archive/<!--                                      The base zip file URL.
         | zip = /archive/<!--                                      The base zip file URL.
         -->{{{commit|{{{tag|{{{branch|master}}}}}}}}}.zip<!--      Download for a specific commit, tag, or branch (defaulting to master). -->
         -->{{{commit|{{{tag|{{{branch|master}}}}}}}}}.zip<!--      Download for a specific commit, tag, or branch (defaulting to master). -->
Line 233: Line 236:
                         | <!--                                    No project, repository or branch. -->
                         | <!--                                    No project, repository or branch. -->
                         | github/<!--                              Site advertising.
                         | github/<!--                              Site advertising.
                         -->{{{user|{{{proj|}}}}}}/<!--             The user or project name.
                         -->{{{user|{{{proj|}}}}}}<!--               The user or project name.
                         -->{{{repo|}}}/<!--                        The repository name.
                         -->/{{{repo|}}}<!--                        The repository name.
                         -->{{{commit|{{{tag|{{{branch|master}}}}}}}}}<!-- The repository commit, tag or branch.-->
                         -->{{#if: {{{view|{{{commit|{{{tag|{{{branch|}}}}}}}}}}}}
                            | /{{{commit|{{{tag|{{{branch|master}}}}}}}}}<!-- The repository commit, tag or branch.-->
                          }}
                       }}
                       }}
                   }}<!--
                   }}<!--

Navigation menu