Skip to content

Instantly share code, notes, and snippets.

@TaylanUB
Created May 30, 2019 18:20
Show Gist options
  • Save TaylanUB/739fd03337973d98e8865b8ccc72b8da to your computer and use it in GitHub Desktop.
Save TaylanUB/739fd03337973d98e8865b8ccc72b8da to your computer and use it in GitHub Desktop.
<includeonly><!--
-->{{#if: {{{last|}}} <!--
If lastname given:
-->|{{{last}}}, {{{first| {{error|First name missing}} }}}{{#if: {{{date|}}} |&nbsp;({{{date}}})}}.&nbsp;<!--
Else if author given:
-->|{{#if: {{{author|}}} <!--
-->|{{{author}}}{{#if: {{{date|}}} |&nbsp;({{{date}}})}}.&nbsp;<!--
-->}}<!--
-->}}<!--
-->{{#if: {{{url|}}}
|[{{{url}}} {{{title| {{error|No Title provided in cite web template}} }}}].
|{{error|No URL provided in cite web template.}} }}<!--
--> {{#if: {{{website|}}} | ''{{{website}}}''. }}<!--
--> {{#if: {{{publisher|}}} | {{{publisher}}}. }}<!--
--> {{#ifeq: {{{last|X}}} {{{author|Y}}} | X Y | {{#if: {{{date|}}} | {{{date}}}. }} }}<!--
--> {{#if: {{{quote|}}} | "{{{quote}}}" }}<!--
--></includeonly><noinclude>
Examples of usage follow.
==== No URL ====
{{cite web |title=Test }}
==== No title ====
{{cite web |url=https://example.org/ }}
==== Only URL and title ====
{{cite web |url=https://example.org/ |title=Example }}
==== Date ====
{{cite web |url=https://example.org/ |title=Example |date=May 4th, 2019 }}
==== Lastname, firstname ====
{{cite web |url=https://example.org/ |title=Example |last=Surname |first=Name }}
==== Lastname, firstname, date ====
{{cite web |url=https://example.org/ |title=Example |last=Surname |first=Name |date=May 4th, 2019 }}
==== Author ====
{{cite web |url=https://example.org/ |title=Example |author=Jane Doe }}
==== Author, date ====
{{cite web |url=https://example.org/ |title=Example |author=Jane Doe |date=May 4th, 2019 }}
==== All kinds of tags ====
{{cite web |url=https://example.org/ |title=Example |last=Surname |first=Name |date=May 4th, 2019 |website=example.org |publisher=Example Publishing }}
==== All kinds of tags, and quote ====
{{cite web |url=https://example.org/ |title=Example |last=Surname |first=Name |date=May 4th, 2019 |website=example.org |publisher=Example Publishing |quote=Blah blah, blah blah! }}
</noinclude>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment