Template:CrateLink

From Rust Community Wiki
Jump to navigation Jump to search

Description[edit source]

This template provides a standard way to link to crates. It will follow user preferences, site standards, and any data mining we might want to do some day.

The first parameter is the name of the crate; make sure you use its exact package name (no accents, utf8 characters, ect), so that we can generate a link from it. The second, optional, parameter allows you to link to a custom home page that will be put on the side of the crate link. By default, the crate link itself is prioritized since it can almost never point to a dead link, however users might change this preference for themselves and put the homepage to replace entirely the crate link.

Usage[edit source]

With the default URL: {{CrateLink|mediawiki_parser}}. With a custom home URL: {{CrateLink|rocket|https://rocket.rs}}

With the default URL: Cargo vec.svgmediawiki_parser .

With a custom home URL: Cargo vec.svgrocket (home)

Non-ascii crate names[edit source]

If you have a crate with an identifier that is not its official name, you an use this template like so:

{{CrateLink|marked}} (märkəd)

Cargo vec.svgmarked (märkəd)

Provides a standard way to link to crates.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Crate name1

The name of the crate on crates.io

Stringoptional
Homepage (optional)2

The full URL of the crate's homepage

Stringoptional