fn: faviconinclude
[contents]

Contents

Syntax

The syntax for faviconinclude calls is:

f++:  
faviconinclude{options}(absolute-path)

n++:  
@faviconinclude{options}(absolute-path)

Description

The faviconinclude function takes a single absolute path as input and returns the code below to insert the path as a favicon in html using the relative path:

<link rel="icon" type="image/png" href="relative-path" options>

The faviconinclude function also throws a warning if the favicon file does not exist.

Note: Another good way to include a favicon file, where an error is thrown if the file does not exist, is:

<link rel="icon" type="image/png" href="@pathtofile(absolute-path)">

Options

Anything added as an option to a faviconinclude call will be added to the code to insert the path as a favicon as outlined in the Description section.

f++ example

Example of faviconinclude being used with f++:

faviconinclude("site/assets/images/favicon.png")

n++ example

Example of faviconinclude being used with n++:

@faviconinclude("site/assets/images/favicon.png")