Jump to content

Module:ExternalLinks/doc: Difference between revisions

From BadWolfMC Wiki
Created page with "== Module:ExternalLinks == This module defines a centralized table of commonly used external URLs for BadWolfMC. It is invoked via the template Template:Ext-link using: <syntaxhighlight lang="wikitext"> {{ext-link|key|optional display text}} </syntaxhighlight> == How to add a new link == 1. Edit Module:ExternalLinks 2. Add a new entry to the <code>links</code> table in this format: <syntaxhighlight lang="lua"> key = { url = "https://example.com/...", l..."
 
 
Line 9: Line 9:


== How to add a new link ==
== How to add a new link ==
1. Edit [[Module:ExternalLinks]]
# Edit [[Module:ExternalLinks]]
2. Add a new entry to the <code>links</code> table in this format:
# Add a new entry (preferably in alphabetical order) to the <code>links</code> table in this format:
<syntaxhighlight lang="lua">
#;<syntaxhighlight lang="lua">
key = {
key = {
     url = "https://example.com/...",
     url = "https://example.com/...",
Line 17: Line 17:
}
}
</syntaxhighlight>
</syntaxhighlight>
 
# Use it in the wiki like <code><nowiki>{{ext-link|key}}</nowiki></code>
3. Use it in the wiki like <code><nowiki>{{ext-link|key}}</nowiki></code>


== See also ==
== See also ==
* [[Template:Ext-link]]
* [[Template:Ext-link]]

Latest revision as of 00:12, 8 May 2025

This module defines a centralized table of commonly used external URLs for BadWolfMC.

It is invoked via the template Template:Ext-link using:

{{ext-link|key|optional display text}}
  1. Edit Module:ExternalLinks
  2. Add a new entry (preferably in alphabetical order) to the links table in this format:
    key = {
        url = "https://example.com/...",
        label = "Default Label"
    }
    
  3. Use it in the wiki like {{ext-link|key}}

See also