I want to know the best way to represent FontAwesome icons on GitHub flavoured markdown. Currently What I do is I include the path for my compiler to find FontAwesome and Academ-icons.
link rel="stylesheet" href="https://cdn.rawgit.com/jpswalsh/academicons/master/css/academicons.min.css">
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
Then write my desired Academicon as
<i class="ai ai-arxiv ai-5x"></i>
<i class="fa fa-medium fa-5x" aria-hidden="true">
Mind you this is a markdown file that I am editing. When viewing on MarkdownPad, my README renders with the icons, but when pushed to Git the icons don't show. Compiling with Pandoc to an HTML page still renders the icons. Can someone help me with this?
After a few months of initially posing this question, I found the answer. So apparently GitHub does not support CSS rendering for security purposes. Here is an answer to this question.
I have verified this using custom CSS and trying to centrally render a logo on my README but it doesn't work either. Here is the README in question
I am not exactly sure but READMEs on GitLab may still render custom CSS. I have used GitLab but the GitLab settings vary w.r.t. the org.
Related
How to configure syntax highlighting for GitHub Pages to be identical to GitHub syntax highlighting?
GitHub uses a closed syntax highlighting library not available on GitHub Pages. Supposedly, it should be possible to get a reasonable result using the default Jekyll highlighter. However, for me it was simpler to switch to the highlight.js JS library. Here are the steps.
Disable Jekyll's highlighter in the _config.yml
Obtain the highlight.min.js library
Prebuilt library is available from the website or via CDNs.
A custom version can be generated online, if necessary.
Obtain a CSS theme file
Specific CSS theme can be picked chosen using online demo service. CSS files are also available via CDNs or can be downloaded for local access.
Load the library, theme file, and initialize the library
In my case, I placed the library in /assets/js/highlight.min.js and included the following lines in /_includes/head_custom.html
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.6.0/styles/github.min.css">
<script type="text/javascript" src="{{ '/assets/js/highlight.min.js' | relative_url }}"></script>
<script>hljs.highlightAll();</script>
I also included a CSS element /_sass/custom/custom.scss in to overwrite code block background:
.hljs {background: #fdfdfa !important;}
Some glyphs that are shown on the Google Fonts specimen sheet are not available once the font is implemented on a site.
For example, look at this preview for Piazzolla:
https://fonts.google.com/specimen/Piazzolla?preview.text=piazzolla%20%E2%84%A6%E2%86%92%E2%86%92%E2%86%97%E2%86%97&preview.text_type=custom&query=piazzolla#standard-styles
Notice how the arrows are using the custom glyph provided by the font.
Then, compare that to this codepen that uses the same font, but the arrows are not using the same glyph.
<div></div>
(random code block to appease stackoverflow because there is no code that needs to be embedded in the question.)
This leads me to believe that Google is not serving up the entire font, and there might be a way to have access to more characters.
Any help would be greatly appreciated. Thanks!
The GF API has an advanced feature for this, but you have to closely read the manual (https://developers.google.com/fonts/docs/getting_started) and know how to use the API to do what you want.
Here's a working demo using the arrows in IBM Plex:
https://jsbin.com/neheyuxira/2/edit?html,output
And a fork of your page with the same technique applied
https://codepen.io/davelab6/pen/bGRpJQP
The trick is to add a API URL first that uses the text API feature to specify the unicodes you want (URL encoded, eg with https://r12a.github.io/app-encodings), and then the regular API URL.
<link href="https://fonts.googleapis.com/css?family=IBM+Plex+Mono|IBM+Plex+Sans|IBM+Plex+Sans+Condensed|IBM+Plex+Serif&text=%E2%86%B3" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=IBM+Plex+Mono|IBM+Plex+Sans|IBM+Plex+Sans+Condensed|IBM+Plex+Serif" rel="stylesheet">
I'm using Rich Text Editor with MiscTools plugin to edit text in CQ%
However when I open the HTML editor and create sth like this
<div id="test">Test <!-- Test Comment --></div>
the CQ rewrites it to after switch back to HTML mode and source edit mode
<div id="test">Test </div>
Is it possible to keep HTML comment tag <!-- --> in the source code?
Thank you for answer my question
I would suggest taking it out of the div and see if that works.
In CQ5.4-5.6.1 (not sure about latest version AEM6), the Rich Text Editor intentionally strips out all HTML comments. The only way to stop it from doing this is to modify the product javascript source code in WhitespaceProcessor.js. However, allowing HTML comments in this way wouldn't be recommended as it hasn't been fully tested it might cause other errors. If you still need this feature, then you might consider contacting Adobe Customer Care to request it to be officially added to the product.
Is it possible to change Github's gists default styles programmatically or through some interface?
I don't know of any API or interface influencing the way gist are presented on GitHub.
If you include those gist in your blog, then of course some CSS local changes can make your gist different, as illustrated by this blog post, this CSS or this CSS.
However, this doesn't concern syntax highlighting.
You can only share those Gist with a custom stylesheet through, for instance Octopress, using a Sass port of Solarized syntax highlighting.
But again, that won't change those gist presentation on GitHub itself.
May i am late at party, but you can create your own CSS by editing the default one it with the color you want. I have done something same but instead of pasting all the css in the blog i prefer to link it
See if this works for you
<link href="https://cdn.rawgit.com/Killercodes/281792c423a4fe5544d9a8d36a4430f2/raw/36c2eb3e0c44133880485a143717bda9d180f2c1/GistDarkCode.css" rel="stylesheet" type="text/css">
You can also find it here: GistDarkCode.css I made it look all black
Edit:
I figured out that the markdown (*.md) documents are where still white this has been fixed in this new version 0.3.0 also the font size is increased to 14px to make it look bigger, try the new one below
<link href="https://cdn.rawgit.com/Killercodes/281792c423a4fe5544d9a8d36a4430f2/raw/42e5b91a60ea5e25b7bb42c0a315d9e740c92f0/GistDarkCode.css" rel="stylesheet" type="text/css">
For embedded Gists there is Pretty Gist
Pretty Gist is a jQuery plugin to make prettier and more functional embedded Github Gists.
Github repo
Yes there are different properties to control the default css of GitHub gist. I did various customizations in this project and made sure I define the properties after the embedded js - https://github.com/tebelorg/TA.Gist (PHP template that displays your GitHub gists as blog posts)
I just started a new Typo3 4.6 site and I found this weird line right off the bat in the
<link type="text/css" rel="stylesheet" href="data:text/css,">
Where does it come from? And how can I get rid of it?
This is the link to the css stylesheet which creates the styles for the pages in your Typo3 CMS. You probably need this line and might want to keep it.
It must have been added from some extension. I used the introductory package. Ive done a new site with the blank package and its not there anymore. Thanks!