Skip to content

Commit 5b66910

Browse files
committed
feat: Add favicon option
1 parent c5f32ae commit 5b66910

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

Diff for: __tests__/__snapshots__/test.js.snap

+1-1
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'>

Diff for: docs/USAGE.md

+1
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

Diff for: src/commands/shared_options.js

+3
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',

Diff for: src/default_theme/index._

+4-3
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)