Icons on GitHub

classic Classic list List threaded Threaded
7 messages Options
suy
Reply | Threaded
Open this post in threaded view
|

Icons on GitHub

suy
Hello.

I've seen that icons (as in icon:foo[]) in GitHub are disabled (for security
reasons?). However, they have their own syntax for adding icons, emoji, etc. I
think this is the most official list for those:

http://www.emoji-cheat-sheet.com/

The icon set supported by Font Awesome is quite different, but some might
overlap. Has anyone used some workaround? I've got this working fine, but is
just a test:

https://gist.github.com/suy/01b33cc488bf7be3adf1

Is just an ifdef:: macro to define one attribute with the `:foo:` notation on
Github and the `icon:foo[]` otherwise.

Besides that, do you know what issue they have with AsciiDoctor's icon? Is the
extra font? They have the octicons one already, so I suppose it could be used
somehow.

--
Alex (a.k.a. suy) | GPG ID 0x0B8B0BC2
http://barnacity.net/ | http://disperso.net
Reply | Threaded
Open this post in threaded view
|

Re: Icons on GitHub

nawroth
Use DocGist!

http://gist.asciidoctor.org/?01b33cc488bf7be3adf1

As you can see (use the green button!) it renders straight from your gist.

/anders

2015-11-12 13:08 GMT+01:00 suy [via Asciidoctor :: Discussion]
<[hidden email]>:

> Hello.
>
> I've seen that icons (as in icon:foo[]) in GitHub are disabled (for security
> reasons?). However, they have their own syntax for adding icons, emoji, etc.
> I
> think this is the most official list for those:
>
> http://www.emoji-cheat-sheet.com/
>
> The icon set supported by Font Awesome is quite different, but some might
> overlap. Has anyone used some workaround? I've got this working fine, but is
> just a test:
>
> https://gist.github.com/suy/01b33cc488bf7be3adf1
>
> Is just an ifdef:: macro to define one attribute with the `:foo:` notation
> on
> Github and the `icon:foo[]` otherwise.
>
> Besides that, do you know what issue they have with AsciiDoctor's icon? Is
> the
> extra font? They have the octicons one already, so I suppose it could be
> used
> somehow.
>
> --
> Alex (a.k.a. suy) | GPG ID 0x0B8B0BC2
> http://barnacity.net/ | http://disperso.net
>
>
> ________________________________
> If you reply to this email, your message will be added to the discussion
> below:
> http://discuss.asciidoctor.org/Icons-on-GitHub-tp3952.html
> To start a new topic under Asciidoctor :: Discussion, email
> [hidden email]
> To unsubscribe from Asciidoctor :: Discussion, click here.
> NAML
suy
Reply | Threaded
Open this post in threaded view
|

Re: Icons on GitHub

suy
El Thursday 12 November 2015, escribió:
> DocGist!
>
> http://gist.asciidoctor.org/?01b33cc488bf7be3adf1
>
> As you can see (use the green button!) it renders straight from your gist.

Thank you. I certainly use docgist less than I could, but is not good enough
in this case, because what I want is proper rendering on the normal GitHub
page. I'm starting a repository with just a README.adoc as main content, and
looking good there is the goal. Otherwise I'd just move to a compilation step
that pushes the rendered content to Github pages.

I'll look at their markup repository to see if it's possible to contribute
there. At least icon:foo[] with their octicons should work, IMHO. It would
have less impact than the emoticos they have right now, which are image files
instead of glyphs from a font.

Greetings.

--
Alex (a.k.a. suy) | GPG ID 0x0B8B0BC2
http://barnacity.net/ | http://disperso.net
jmb
Reply | Threaded
Open this post in threaded view
|

Re: Icons on GitHub

jmb
In reply to this post by suy
Also really anoyed by this. When you have started using AwsomeFont icons, hard to go back on your README.adoc :-(
Reply | Threaded
Open this post in threaded view
|

Re: Icons on GitHub

mojavelinux
Administrator
In reply to this post by suy

On Fri, Nov 13, 2015 at 1:35 AM, suy [via Asciidoctor :: Discussion] <[hidden email]> wrote:
what I want is proper rendering on the normal GitHub
page. I'm starting a repository with just a README.adoc as main content, and
looking good there is the goal.

I'll start by saying that I keep pushing on the goal of making AsciiDoc look nice on GitHub and won't give that up.

Having said that, it's very unlikely rendering will ever be proper on GitHub, not for AsciiDoc or any other markup language for that matter (including Markdown). GitHub has a different objective. They (seem to) want the documents to be fairly plain so that they don't conflict with their visual design and/or to ensure they pose no risk to security (or something along those lines). They are not trying to make a document frame that shows the document with its native appearance.

The way that I look at the rendering on GitHub is as a reasonable preview of the overall structure of the document and the raw content. For simple documents, this works great. Beyond that, trying to make it look a certain way is only going to cause disappointment.

If we can find a way to convince GitHub to allow font-based icons inline, that would certainly be a nice embellishment for those simple documents.

-Dan


--
Dan Allen | @mojavelinux | http://google.com/profiles/dan.j.allen
Reply | Threaded
Open this post in threaded view
|

Re: Icons on GitHub

mojavelinux
Administrator
In reply to this post by suy

On Thu, Nov 12, 2015 at 5:08 AM, suy [via Asciidoctor :: Discussion] <[hidden email]> wrote:
I've got this working fine, but is
just a test:

https://gist.github.com/suy/01b33cc488bf7be3adf1

This is something we could definitely do. We could map the AsciiDoc icon macro onto the :name: syntax when rendering on GitHub. Those are the types of tricks we have to use to work on GitHub.

The place where this would need to happen is here: https://github.com/asciidoctor/html-pipeline-asciidoc_filter. We could extend the html5 converter and override the inline_image method.

-Dan


--
Dan Allen | @mojavelinux | http://google.com/profiles/dan.j.allen
suy
Reply | Threaded
Open this post in threaded view
|

Re: Icons on GitHub

suy
In reply to this post by mojavelinux
El Sunday 29 November 2015, escribió:

> I'll start by saying that I keep pushing on the goal of making AsciiDoc
> look nice on GitHub and won't give that up.
>
> Having said that, it's very unlikely rendering will ever be proper on
> GitHub, not for AsciiDoc or any other markup language for that matter
> (including Markdown). GitHub has a different objective. They (seem to) want
> the documents to be fairly plain so that they don't conflict with their
> visual design and/or to ensure they pose no risk to security (or something
> along those lines). They are not trying to make a document frame that shows
> the document with its native appearance.

Yes, I understand this. They prefer to use the full Github pages as the full
website experience. In other case I would just do this for a project website.
The thing is, for the project I was considering this, the README is the
_whole_ project, since is just one of those awesome-foo lists. :)

Adding a step that converts to HTML with the real Asciidoctor could confuse
other potential contributors, so I'll weight the pros and the cons.

El Sunday 29 November 2015, mojavelinux [via Asciidoctor :: Discussion]
escribió:

> On Thu, Nov 12, 2015 at 5:08 AM, suy [via Asciidoctor :: Discussion] <
> [hidden email]> wrote:
> > I've got this working fine, but is
> > just a test:
> >
> > https://gist.github.com/suy/01b33cc488bf7be3adf1
>
> This is something we could definitely do. We could map the AsciiDoc icon
> macro onto the :name: syntax when rendering on GitHub. Those are the types
> of tricks we have to use to work on GitHub.
>
> The place where this would need to happen is here:
> https://github.com/asciidoctor/html-pipeline-asciidoc_filter. We could
> extend the html5 converter and override the inline_image method.

Thank you, I'll keep an eye on this. I saw also some discussion on the
github/markup repository that was clarifying on the subject.

Greetings!

--
Alex (a.k.a. suy) | GPG ID 0x0B8B0BC2
http://barnacity.net/ | http://disperso.net