Skip to content
Permalink
Browse files

add favico

  • Loading branch information...
tunght91 committed Feb 13, 2019
1 parent 70c65f8 commit 7154c4ca6d49763a2cdf88887c9e954b3651a5ae
Showing with 13 additions and 2 deletions.
  1. +1 −1 index.html
  2. +11 −0 index.js
  3. BIN source/images/favico.ico
  4. +1 −1 source/layouts/layout.ejs
@@ -8,7 +8,7 @@
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>TomoMaster APIs</title>

<link rel="shortcut icon" href="source/images/favico.ico" />
<style>
</style>
<link rel="stylesheet" media="screen" href="pub/css/screen.css">
@@ -361,6 +361,17 @@ function render(inputStr, options, callback) {
return '<img src="'+imageSource+'" class="' + className + '" alt="' + altText + '">';
}
};
locals.favico = function(image) {
var imageSource = "source/images/favico.ico";
if (image) {
imageSource = "source/images/" + image;
}
if (globalOptions.inline) {
var imgContent = safeReadFileSync(path.join(__dirname, imageSource));
imageSource = getBase64ImageSource(imageSource, imgContent);
}
return '<link rel="shortcut icon" href="' + imageSource + '" />';
};
locals.logo_image_tag = function () {
if (!globalOptions.logo) return locals.image_tag('logo.png', 'Logo', 'logo', true);
var imageSource = path.resolve(process.cwd(), globalOptions.logo);
Binary file not shown.
@@ -24,7 +24,7 @@ under the License.
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title><%= current_page.data.title || "API Documentation" %></title>
<%- favico() %>
<style>
</style>
<%- stylesheet_link_tag('screen','screen') %>

0 comments on commit 7154c4c

Please sign in to comment.
You can’t perform that action at this time.