Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add variable in _config.yml for favicon path #8

Open
Agent-E11 opened this issue May 7, 2024 · 0 comments
Open

Add variable in _config.yml for favicon path #8

Agent-E11 opened this issue May 7, 2024 · 0 comments

Comments

@Agent-E11
Copy link
Member

Currently, the only way to set a custom favicon is to overwrite the head.html include, like this:

<head>
    <!-- The rest of _include/head.html ... -->

    <!-- Add a favicon -->
    <link rel="shortcut icon" href="/my-favicon.ico"  type="image/x-icon" />   
</head>

It should be pretty easy to just add a favicon if the variable is set:

<head>
    <!-- The rest of _include/head.html ... -->

    <!-- Add a favicon if present -->
    {% if site.favicon %}
    <link rel="shortcut icon" href="{{ site.favicon }}"  type="image/x-icon" />   
    {% endif %}
</head>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant