Skip to content

Commit 5b045f2

Browse files
irgendwrtmcw
authored andcommitted
feat: Add favicon option (documentationjs#1207)
1 parent fb0a27f commit 5b045f2

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

__tests__/__snapshots__/test.js.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1388,12 +1388,12 @@ exports[`html nested.input.js 1`] = `
13881388
<head>
13891389
<meta charset='utf-8' />
13901390
<title> | Documentation</title>
1391+
<meta name='description' content='a documentation generator'>
13911392
<meta name='viewport' content='width=device-width,initial-scale=1'>
13921393
<link href='assets/bass.css' rel='stylesheet' />
13931394
<link href='assets/style.css' rel='stylesheet' />
13941395
<link href='assets/github.css' rel='stylesheet' />
13951396
<link href='assets/split.css' rel='stylesheet' />
1396-
<meta name='description' content='a documentation generator'>
13971397
</head>
13981398
<body class='documentation m0'>
13991399
<div class='flex'>

docs/USAGE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Options:
2424
package.json
2525
--project-homepage project homepage. by default, inferred from
2626
package.json
27+
--favicon favicon used in html
2728
--watch, -w watch input files and rebuild documentation when
2829
they change [boolean]
2930
--markdown-toc include a table of contents in markdown output

src/commands/shared_options.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,9 @@ module.exports.sharedOutputOptions = {
106106
'project-homepage': {
107107
describe: 'project homepage. by default, inferred from package.json'
108108
},
109+
favicon: {
110+
describe: 'favicon used in html'
111+
},
109112
format: {
110113
alias: 'f',
111114
default: 'json',

src/default_theme/index._

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@
22
<html>
33
<head>
44
<meta charset='utf-8' />
5-
<title><%- config['project-name'] %> <%- config['project-version'] %> | Documentation</title>
5+
<title><%- config['project-name'] %> <%- config['project-version'] %> | Documentation</title><% if (config['project-description']) { %>
6+
<meta name='description' content='<%- config['project-description'] %>'><% } %>
67
<meta name='viewport' content='width=device-width,initial-scale=1'>
78
<link href='assets/bass.css' rel='stylesheet' />
89
<link href='assets/style.css' rel='stylesheet' />
910
<link href='assets/github.css' rel='stylesheet' />
10-
<link href='assets/split.css' rel='stylesheet' /><% if (config['project-description']) { %>
11-
<meta name='description' content='<%- config['project-description'] %>'><% } %>
11+
<link href='assets/split.css' rel='stylesheet' /><% if (config['favicon']) { %>
12+
<link href='<%- config['favicon'] %>' rel='icon' ><% } %>
1213
</head>
1314
<body class='documentation m0'>
1415
<div class='flex'>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy