From 5b66910782e83eee4f9e8aa1d0528c681eba5d06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20B=C3=B6gle?= Date: Thu, 14 Feb 2019 16:53:21 +0100 Subject: [PATCH] feat: Add favicon option --- __tests__/__snapshots__/test.js.snap | 2 +- docs/USAGE.md | 1 + src/commands/shared_options.js | 3 +++ src/default_theme/index._ | 7 ++++--- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/__tests__/__snapshots__/test.js.snap b/__tests__/__snapshots__/test.js.snap index 135a0c87e..485a4ddb9 100644 --- a/__tests__/__snapshots__/test.js.snap +++ b/__tests__/__snapshots__/test.js.snap @@ -1388,12 +1388,12 @@ exports[`html nested.input.js 1`] = ` | Documentation + -
diff --git a/docs/USAGE.md b/docs/USAGE.md index e39a25f71..14960f983 100644 --- a/docs/USAGE.md +++ b/docs/USAGE.md @@ -24,6 +24,7 @@ Options: package.json --project-homepage project homepage. by default, inferred from package.json + --favicon favicon used in html --watch, -w watch input files and rebuild documentation when they change [boolean] --markdown-toc include a table of contents in markdown output diff --git a/src/commands/shared_options.js b/src/commands/shared_options.js index 53d36ccd4..b8c326306 100644 --- a/src/commands/shared_options.js +++ b/src/commands/shared_options.js @@ -106,6 +106,9 @@ module.exports.sharedOutputOptions = { 'project-homepage': { describe: 'project homepage. by default, inferred from package.json' }, + favicon: { + describe: 'favicon used in html' + }, format: { alias: 'f', default: 'json', diff --git a/src/default_theme/index._ b/src/default_theme/index._ index 3d7c69d2e..15a57cbb9 100644 --- a/src/default_theme/index._ +++ b/src/default_theme/index._ @@ -2,13 +2,14 @@ - <%- config['project-name'] %> <%- config['project-version'] %> | Documentation + <%- config['project-name'] %> <%- config['project-version'] %> | Documentation<% if (config['project-description']) { %> + '><% } %> - <% if (config['project-description']) { %> - '><% } %> + <% if (config['favicon']) { %> + ' rel='icon' ><% } %>