How to use links in docs
This section describes how to use links from pages hosted at docs.superoffice.com
.
We differentiate between links to content on the same page, links to neighboring pages, and links to external websites and URLs.
Format
Type the link text in square brackets directly followed by the URL in parentheses.
Format: [Link text](url)
Example:
[link to Google!](http://google.com)
Link text
Use either the title of the page you are linking to or a friendly, descriptive label.
Note
Don't use "click here". It is bad for SEO and blinds the reader.
Links from one page to another
- Use file links when linking within the repository.
- Use forward-slash (
/
) in paths.
Link to another page in the same folder:
[link text](page.md)
Link to a page in the parent folder:
[link text](../page.md)
Link to a page in a sub-folder:
[link text](folder/page.md)
Link to a page in a subfolder of the parent folder:
[link text](../folder/page.md)
Link to an absolute path beginning at the root of the repository:
[link text](/folder/page.md)
Reference-style links
We use reference-style links to make the source content easier to read and maintain. You move the (long) URLs to the end of the file and reference them by labels in square brackets.
Before:
[link to Google!](http://google.com)
After:
Inline text:
[link to Google!][1]
Link references at the end of the file:
<!-- Referenced links -->
[1]: http://google.com/
Make sure that you include the space after the colon, before the link. Otherwise, the link will be broken.
Bookmark links (anchors)
Bookmark links go to a specific heading on the current or another page.
Link to heading in the current file:
- Use a hash symbol (#) followed by the lowercase words of the heading.
- Remove any punctuation and replace spaces with dashes.
[Integer datatype](#integer-datatype)
Link to a heading on another page:
- Use a relative link plus a hash symbol (#), followed by the lowercase words of the heading.
- Remove any punctuation and replace spaces with dashes.
[Integer datatype](../datatypes.md#integer-datatype)
Add anchor:
You can use either the id or name attribute on the <a>
tag. The anchor label must be lowercase and not contain spaces. Do not use a self-closing tag.
## <a id="anchor-label"></a>Heading text
or
## <a name="anchor-label"></a>Heading text
Note
Add explicit anchors only when the heading is long, hard to write/remember, or expected to change. By default, rely on the bookmark links generated by DocFx.
Link to download a file
Place the file to be downloaded to the assets/downloads folder.
Format the link like this:
<a href="RELATIVEPATH/assets/downloads/FILE" download>LINKTEXT</a>
Don't use reference-style links for downloads.
Note
Certain file types don't play well when the user tries to download from a browser. Please ZIP files available for download to ensure they can be downloaded.
xref (cross reference) links
Currently not supported for SuperOfficeDocs.