borkdude / quickblog

Light-weight static blog engine for Clojure and babashka
https://blog.michielborkent.nl/
MIT License
173 stars 29 forks source link

Support favicon #7

Closed jmglov closed 2 years ago

jmglov commented 2 years ago

quickblog templates should include a favicon (the little image that appears in the browser tab title). This could be achieved by adding a variable to templates/base.html:

<!DOCTYPE html>
<html lang="en">
  <head>
    <title>{{title}}</title>
    ...
    {% if favicon %}
    {{favicon | safe}}
    {% endif %}
  </head>

When the user includes a :favicon-template key in the quickblog opts, quickblog will set the value of the :favicon variable to the result of rendering the template.

quickblog should also ship with a default templates/favicon.html:

    <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
    <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
    <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
    <link rel="manifest" href="/site.webmanifest">
    <link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5">
    <meta name="msapplication-TileColor" content="#da532c">
    <meta name="theme-color" content="#ffffff">

Instructions on adding the favicon assets should be added to the README.

borkdude commented 2 years ago

Seems good to me.

jmglov commented 2 years ago

Fixed by #9

jmglov commented 2 years ago

@borkdude This can now be closed. 🙂