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

As a page-writer I want to have favicon so I can easily distinguish my page among many open tabs #1574

Closed
LIttleAncientForestKami opened this issue Nov 14, 2015 · 14 comments
Assignees
Milestone

Comments

@LIttleAncientForestKami

Hi there. I'm using Asciidoctor for documentation. I really like it for number of reasons and I'm thankful for your work. I'd like to ask if it would be possible to have an easy way to set up favicon. I've browsed number of docs but found nothing.

So far I'm adding it by hand after AD finishes processing (adding a line in resulting HTML). Which is then overwritten and requires re-adding. When I'm writing docs I'm using the browser often and I may have 50 open tabs and would like to easily go back to my doc page - favicon helps here.

WDYT?

@mojavelinux
Copy link
Member

That's a nice idea. The current way to do this would be to add the favicon in a docinfo (head) file. Though I'm definitely open to being able to declare a favicon for inclusion in the output by default if the favicon attribute is specified.

@mojavelinux
Copy link
Member

For information about docinfo, see http://asciidoctor.org/docs/user-manual/#docinfo-file

@LIttleAncientForestKami
Copy link
Author

Thank you Dan. 🉑 That is indeed better than my previous workaround.

  1. :docinfo: in my file
  2. MyFile-docinfo.html with <link rel="icon" type="image/ico" href="img/favicon.ico"/>
    and it works.

It's easy enough to warrant closing the issue, I think. I'd however want to at least see it mentioned in the docs clearer PRIOR to closing. Heck I'll contribute myself, just let's decide where it fits best. ;-)

Part of me would like to have a way to include it without docinfo, but it's there for header / footer manipulation and this fits.

@ggrossetie
Copy link
Member

IMO favicon attribute would be really nice.
Sure you can do it with a docinfo file but faviconattribute will be easier to use, AND I can implement this feature in the Chrome/Opera extension and Firefox Addon 😄

@robertpanzer
Copy link
Member

👍

Am 14.11.2015 um 17:59 schrieb Guillaume Grossetie notifications@github.com:

IMO favicon attribute would be really nice.
Sure you can do it with a docinfo file but faviconattribute will be easier to use, AND I can implement this feature in the Chrome/Opera extension and Firefox Addon


Reply to this email directly or view it on GitHub #1574 (comment).

@mojavelinux
Copy link
Member

👍

@mojavelinux mojavelinux added this to the v1.5.4 milestone Dec 4, 2015
@mojavelinux mojavelinux self-assigned this Dec 4, 2015
@mojavelinux mojavelinux modified the milestones: v1.5.4, v1.5.5 Dec 21, 2015
@mojavelinux mojavelinux modified the milestones: v1.5.5, v1.5.6 Oct 3, 2016
mojavelinux added a commit to mojavelinux/asciidoctor that referenced this issue May 12, 2017
mojavelinux added a commit to mojavelinux/asciidoctor that referenced this issue May 15, 2017
@helmingstay
Copy link

Can someone comment on the behavior of the resolving commit? I've checked the user manual (no mention) and inspected the commit. I believe I understand the behavior, but a brief explanation in docs would help. In particular, does this respect :iconsdir: (no?), and will this override :docinfo:? Thanks!

@ggrossetie
Copy link
Member

Hello @helmingstay
Indeed we should document this feature!

To answer your questions, the favicon attribute does not "respect" the icondir, you will need to use the full path to your favicon. And no it will not override docinfo, if you define the favicon attribute and a docinfo with a favicon using the HTML tag <link> you will have two <link> tags in your HTML document.

@mojavelinux
Copy link
Member

I've added documentation for this feature to the user manual. See https://asciidoctor.org/docs/user-manual/#favicon.

@pkuenemann
Copy link

Hi, I'm using AsciiDoc Version 1.6.9 and am trying to add a favicon to my html-files. Unfortunately the statement :favicon: does not change anything in my htmls. Here is what I've put in my asciidoc-file:

= Document-Title
:favicon: ../images/kisscal.png
:toc: macro
:toc-title: Content
:toclevels: 3

image::../images/Kiss-Logo.png[align="center"]

toc::[]

Did I do anything wrong? The favicon.png is at its right place. Still within the html I cannot find any favicon entry:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge"><![endif]-->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="Asciidoctor 1.5.5.dev">
<title>KissCal für euer Studio einrichten</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700">
<style>
/* Asciidoctor default stylesheet | MIT License | http://asciidoctor.org */

@mojavelinux
Copy link
Member

I'm using AsciiDoc Version 1.6.9

I'm assuming you mean Asciidoc FX.

<meta name="generator" content="Asciidoctor 1.5.5.dev">

There's your problem. You are using a version before this feature was introduced. Ask Asciidoc FX to upgrade the version of Asciidoctor it uses.

@pkuenemann
Copy link

I will do so, thanks!

@rben01
Copy link
Contributor

rben01 commented Aug 19, 2021

I've added documentation for this feature to the user manual. See https://asciidoctor.org/docs/user-manual/#favicon.

Can this also be added to the document attributes reference? Probably belongs under the "Image and icon attributes" section.

@mojavelinux
Copy link
Member

@rben01 Sure. Feel free to click the "Edit this Page" and submit a proposed change. If you have trouble with that, then fall back to filing an issue in that same repository.

rben01 added a commit to rben01/asciidoc-docs that referenced this issue Aug 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants