Template:Repo link: Difference between revisions

Jump to navigation Jump to search
The GitHub URL text is now being generated for 'type=git' as well.
(Improvements, fixes and simplifications for the GitHub URL and text generation. The 'type=git' option now appends '.git', and the 'view=raw' option was simplified as the URL raw.githubusercontent.com is the result of a redirect from a github.com URL.)
(The GitHub URL text is now being generated for 'type=git' as well.)
Line 147: Line 147:
   }}/<!--
   }}/<!--
-->{{{repo|flightgear}}}<!--                                        The version control repository.
-->{{{repo|flightgear}}}<!--                                        The version control repository.
-->{{#switch: {{{type|git web}}} <!--                              Web interface or base URL. -->
-->{{#switch: {{{type|git web}}} <!--                              The URL type. -->
     | git = .git<!--                                               Append '.git' to the base repository URL. -->
     | git
    | git web = /<!--
    | git web =
    -->{{{view|tree}}}/<!--                                       The repository view.
      {{#switch: {{{type|git web}}}
    -->{{{commit|{{{branch|master}}}}}}<!--                       The branch or commit.
        | git = .git<!--                                           Append '.git' to the base repository URL. -->
    -->{{#if: {{{path|}}} | /{{{path}}}}}<!--                     The file or directory path.
        | git web = /<!--
    -->{{#if: {{{line|}}} | &#35;L{{{line}}} }} <!--               The optional line number(s).
        -->{{{view|tree}}}/<!--                                     The repository view.
    -->{{#if: {{{text|}}}
        -->{{{commit|{{{branch|master}}}}}}<!--                     The branch or commit.
        -->{{#if: {{{path|}}} | /{{{path}}}}}<!--                   The file or directory path.
        -->{{#if: {{{line|}}} | &#35;L{{{line}}} }} <!--           The optional line number(s). -->
      }} <!--
    -->{{#if: {{{text|}}}
           | {{{text}}} <!--                                        The text description for the link. -->
           | {{{text}}} <!--                                        The text description for the link. -->
           | {{#if: {{{full|}}}
           | {{#if: {{{full|}}}
Line 170: Line 174:
             -->{{#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).
             -->{{#ifeq: {{{type|}}} | zip
             -->{{#switch: {{{view|tree}}} <!--                     The view description. -->
                  | <nowiki></nowiki> zip file<!--                  The link description. -->
                  | blob =
                  | {{#switch: {{{view|tree}}} <!--                 The view description. -->
                  | blame = <nowiki></nowiki> blame view
                      | blob =
                  | commit = <nowiki></nowiki> commit view
                      | blame = <nowiki></nowiki> blame view
                  | commits = <nowiki></nowiki> history view
                      | commit = <nowiki></nowiki> commit view
                  | raw = <nowiki></nowiki> raw view
                      | commits = <nowiki></nowiki> history view
                  | tree =
                      | raw = <nowiki></nowiki> raw view
                      | tree =
                    }}
                 }}
                 }}
             }}
             }}

Navigation menu