Last edited 3 years ago

DocSource


1. Usage[edit source]

The DocSource template is used to indicate the URL of any Linux® kernel, Yocto Project, and AWS IoT Greengrass document used in this wiki.

Usage: {{DocSource | domain=<domain> | path=<path> | text=<link text> | version=<version>}}
Where:
  • <domain> is the mandatory string that identifies the domain of the document. The possible values are:
    • Linux kernel: the document belongs to the Linux kernel domain.
    • Yocto Project: the document belongs to the Yocto Project domain.
    • AWS Greengrass: the document belongs to the AWS IoT Greengrass domain.
    • U-Boot: the document belongs to U-Boot domain
  • <link text> is an optional link text (text that is displayed instead of the URL).
  • <version> is an optional version number (branch or tag) if the default one doesn't fit. Per default, the URL points to:
    • the v5.10 branch of the Linux kernel
    • the 3.1.11 branch of the Yocto Project
    • the latest branch of the AWS IoT Greengrass
    • the v2020.10 branch of the U-Boot Documentation

2. Basic examples[edit source]

You type You get
Linux kernel
1- {{DocSource | domain=Linux kernel | path=crypto/index.html}}<br />
2- {{DocSource | domain=Linux kernel | path=gpu/drm-uapi.html}}

1- crypto/index.html
2- gpu/drm-uapi.html

Yocto Project
1- {{DocSource | domain=Yocto Project | path=overview-manual/overview-manual.html}}<br />
2- {{DocSource | domain=Yocto Project | path=brief-yoctoprojectqs/brief-yoctoprojectqs.html}}

1- overview-manual/overview-manual.html
2- brief-yoctoprojectqs/brief-yoctoprojectqs.html

AWS IoT Greengrass
1- {{DocSource | domain=AWS Greengrass | path=developerguide/what-is-gg.html}}<br />
2- {{DocSource | domain=AWS Greengrass | path=developerguide/device-config-setup.html}}

1- developerguide/what-is-gg.html
2- developerguide/device-config-setup.html

U-Boot
1- {{DocSource | domain=U-Boot | path=index.html}}<br />
2- {{DocSource | domain=U-Boot | path=build/index.html}}

1- index.html
2- build/index.html

3. More examples[edit source]

You type You get
Linux kernel
1- {{DocSource | domain=Linux kernel | path=crypto/index.html}}<br />
2- {{DocSource | domain=Linux kernel | path=crypto/index.html | text=Linux Kernel Crypto API}}<br />
3- {{DocSource | domain=Linux kernel | path=crypto/index.html | version=4.19}}<br />
4- {{DocSource | domain=Linux kernel | path=crypto/index.html | text=Linux Kernel Crypto API | version=4.19}}

1- crypto/index.html
2- Linux Kernel Crypto API
3- crypto/index.html (v4.19)
4- Linux Kernel Crypto API (v4.19)

Yocto Project
1- {{DocSource | domain=Yocto Project | path=overview-manual/overview-manual.html}}<br />
2- {{DocSource | domain=Yocto Project | path=overview-manual/overview-manual.html | text=Yocto Project Overview and Concepts Manual}}<br />
3- {{DocSource | domain=Yocto Project | path=overview-manual/overview-manual.html | version=3.0}}<br />
4- {{DocSource | domain=Yocto Project | path=overview-manual/overview-manual.html | text=Yocto Project Overview and Concepts Manual | version=3.0}}

1- overview-manual/overview-manual.html
2- Yocto Project Overview and Concepts Manual
3- overview-manual/overview-manual.html (v3.0)
4- Yocto Project Overview and Concepts Manual (v3.0)

AWS IoT Greengrass
1- {{DocSource | domain=AWS Greengrass | path=developerguide/what-is-gg.html}}<br />
2- {{DocSource | domain=AWS Greengrass | path=developerguide/what-is-gg.html | text=What is AWS IoT Greengrass?}}<br />
3- {{DocSource | domain=AWS Greengrass | path=developerguide/what-is-gg.html | version=2.0}}<br />
4- {{DocSource | domain=AWS Greengrass | path=developerguide/what-is-gg.html | text=What is AWS IoT Greengrass? | version=2.0}}

1- developerguide/what-is-gg.html
2- What is AWS IoT Greengrass?
3- developerguide/what-is-gg.html (v2.0)
4- What is AWS IoT Greengrass? (v2.0)

U-Boot
1- {{DocSource | domain=U-Boot | path=build/index.html}}<br />
2- {{DocSource | domain=U-Boot | path=build/index.html | text=How to build U-Boot?}}<br />
3- {{DocSource | domain=U-Boot | path=build/index.html | version=2021.01}}<br />
4- {{DocSource | domain=U-Boot | path=build/index.html | text=How to build U-Boot? | version=2021.01}}

1- build/index.html
2- How to build U-Boot?
3- build/index.html (v2021.01)
4- How to build U-Boot? (v2021.01)

Check that there's no space before and after the text
1- BEFORE{{DocSource | domain=Linux kernel | path=crypto/index.html}}AFTER<br />
2- BEFORE{{DocSource | domain=Linux kernel | path=crypto/index.html | text=Linux Kernel Crypto API}}AFTER<br />
3- BEFORE{{DocSource | domain=Linux kernel | path=crypto/index.html | version=4.19}}AFTER<br />
4- BEFORE{{DocSource | domain=Linux kernel | path=crypto/index.html | text=Linux Kernel Crypto API | version=4.19}}AFTER

1- BEFOREcrypto/index.htmlAFTER
2- BEFORELinux Kernel Crypto APIAFTER
3- BEFOREcrypto/index.html (v4.19)AFTER
4- BEFORELinux Kernel Crypto API (v4.19)AFTER

Unsupported domain
{{DocSource | domain=Unsupported domain | path=Document}}

Unsupported domain!

4. Code[edit source]

Linux kernel: [https://www.kernel.org/doc/html/{{#if: {{{version|}}}|v{{#replace:{{{version|}}}| |}}|v5.10}}/{{#replace:{{{path|}}}| |}} {{#if: {{{text|}}}|{{{text}}}|{{{path}}}}}{{#if: {{{version|}}}| (v{{#replace:{{{version|}}}| |}})}}]

Yocto Project: [https://docs.yoctoproject.org/{{#if: {{{version|}}}|{{#replace:{{{version|}}}| |}}|3.1.11}}/{{#replace:{{{path|}}}| |}} {{#if: {{{text|}}}|{{{text}}}|{{{path}}}}}{{#if: {{{version|}}}| (v{{#replace:{{{version|}}}| |}})}}]

AWS IoT Greengrass [https://docs.aws.amazon.com/greengrass/{{#if: {{{version|}}}|{{#replace:{{{version|}}}| |}}|latest}}/{{#replace:{{{path|}}}| |}} {{#if: {{{text|}}}|{{{text}}}|{{{path}}}}}{{#if: {{{version|}}}| v({{#replace:{{{version|}}}| |}})}}]

U-Boot: [https://u-boot.readthedocs.io/en/{{#if: {{{version|}}}|{{#replace:{{{version|}}}| |}}|v2020.10}}/{{#replace:{{{path|}}}| |}} {{#if: {{{text|}}}|{{{text}}}|{{{path}}}}}{{#if: {{{version|}}}| (v{{#replace:{{{version|}}}| |}})}}]

Unsupported domain!

No categories assignedEdit