Skip to content

Commit

Permalink
feat: add _appLogoUrl metadata (dotnet#8737)
Browse files Browse the repository at this point in the history
* feat: add _appLogoUrl metadata

* test(snapshot): update snapshots for 67061b4

---------

Co-authored-by: yufeih <[email protected]>
  • Loading branch information
2 people authored and p-kostov committed Jun 28, 2024
1 parent 44eec57 commit afc3d46
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 7 deletions.
6 changes: 4 additions & 2 deletions docs/docs/template.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ Name | Type | Description
`_appTitle` | string | A string append to every page title.
`_appName` | string | The name of the site displayed after logo.
`_appFooter` | string | The footer HTML.
`_appLogoPath` | string | App logo URL path.
`_appLogoPath` | string | Path to the app logo.
`_appLogoUrl` | string | URL for the app logo.
`_appFaviconPath` | string | Favicon URL path.
`_enableSearch` | bool | Whether to show the search box.
`_noindex` | bool | Whether to include in search results
Expand All @@ -52,7 +53,8 @@ Name | Type | Description
`_appTitle` | string | A string append to every page title.
`_appName` | string | The name of the site displayed after logo.
`_appFooter` | string | The footer HTML.
`_appLogoPath` | string | App logo URL path.
`_appLogoPath` | string | Path to the app logo.
`_appLogoUrl` | string | URL for the app logo.
`_appFaviconPath` | string | Favicon URL path.
`_enableSearch` | bool | Whether to show the search box.
`_enableNewTab` | bool | Whether to open external links in a new tab.
Expand Down
1 change: 1 addition & 0 deletions samples/seed/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
_disableNewTab: true
_lang: zh-CN
_layout: landing
_appLogoUrl: https://github.com/dotnet/docfx
---

# docfx-seed
Expand Down
2 changes: 1 addition & 1 deletion templates/default/partials/logo.tmpl.partial
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}}

<a class="navbar-brand" href="{{_rel}}index.html">
<a class="navbar-brand" href="{{_appLogoUrl}}{{^_appLogoUrl}}{{_rel}}index.html{{/_appLogoUrl}}">
<img id="logo" class="svg" src="{{_rel}}{{{_appLogoPath}}}{{^_appLogoPath}}logo.svg{{/_appLogoPath}}" alt="{{_appName}}" >
</a>
2 changes: 1 addition & 1 deletion templates/modern/layout/_master.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
<header class="bg-body border-bottom">
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
<div class="container-xxl flex-nowrap">
<a class="navbar-brand" href="{{_rel}}index.html">
<a class="navbar-brand" href="{{_appLogoUrl}}{{^_appLogoUrl}}{{_rel}}index.html{{/_appLogoUrl}}">
<img id="logo" class="svg" src="{{_rel}}{{{_appLogoPath}}}{{^_appLogoPath}}logo.svg{{/_appLogoPath}}" alt="{{_appName}}" >
{{_appName}}
</a>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"conceptual": "\n<h2 id=\"description\" sourcefile=\"index.md\" sourcestartlinenumber=\"8\">Description</h2>\n<p sourcefile=\"index.md\" sourcestartlinenumber=\"9\">This is a sample docfx documentation project. It contains .NET source code and markdown files.\n<code sourcefile=\"index.md\" sourcestartlinenumber=\"10\">docfx.json</code> is the configuration file for running <code sourcefile=\"index.md\" sourcestartlinenumber=\"10\">docfx</code>.\n<code sourcefile=\"index.md\" sourcestartlinenumber=\"11\">docfx</code> will generate a static website as similar to <a href=\"http://docascode.github.io/docfx-seed/index.html\" sourcefile=\"index.md\" sourcestartlinenumber=\"11\">http://docascode.github.io/docfx-seed</a>.</p>\n<h2 id=\"how-to-run\" sourcefile=\"index.md\" sourcestartlinenumber=\"13\">How to run</h2>\n<h3 id=\"under-windows\" sourcefile=\"index.md\" sourcestartlinenumber=\"14\">Under Windows</h3>\n<ul sourcefile=\"index.md\" sourcestartlinenumber=\"15\">\n<li sourcefile=\"index.md\" sourcestartlinenumber=\"15\">Download and unzip <a href=\"https://github.com/dotnet/docfx/releases/latest\" sourcefile=\"index.md\" sourcestartlinenumber=\"15\">docfx.zip</a> to run <code sourcefile=\"index.md\" sourcestartlinenumber=\"15\">docfx.exe</code> directly!</li>\n<li sourcefile=\"index.md\" sourcestartlinenumber=\"16\">Run <code sourcefile=\"index.md\" sourcestartlinenumber=\"16\">docfx</code> under current repo! Website will be generated under <code sourcefile=\"index.md\" sourcestartlinenumber=\"16\">_site</code> folder.</li>\n<li sourcefile=\"index.md\" sourcestartlinenumber=\"17\">Run any web hosting tool to host <code sourcefile=\"index.md\" sourcestartlinenumber=\"17\">_site</code> folder, e.g. <code sourcefile=\"index.md\" sourcestartlinenumber=\"17\">docfx serve _site</code>.</li>\n</ul>\n<h3 id=\"cross-platform-and-use-dnx\" sourcefile=\"index.md\" sourcestartlinenumber=\"19\">Cross platform and use <code sourcefile=\"index.md\" sourcestartlinenumber=\"19\">dnx</code></h3>\n<p sourcefile=\"index.md\" sourcestartlinenumber=\"20\">As a prerequisite, you will need to install <a href=\"http://docs.asp.net/en/latest/getting-started/installing-on-windows.html#install-the-net-version-manager-dnvm\" sourcefile=\"index.md\" sourcestartlinenumber=\"20\">DNVM</a> and <a href=\"http://docs.asp.net/en/latest/getting-started/installing-on-windows.html#install-the-net-execution-environment-dnx\" sourcefile=\"index.md\" sourcestartlinenumber=\"20\">DNX</a>.\n###Quick Start</p>\n<ul sourcefile=\"index.md\" sourcestartlinenumber=\"22\">\n<li sourcefile=\"index.md\" sourcestartlinenumber=\"22\"><p sourcefile=\"index.md\" sourcestartlinenumber=\"22\"><code sourcefile=\"index.md\" sourcestartlinenumber=\"22\">dnvm upgrade</code> to get the latest dnvm.</p>\n</li>\n<li sourcefile=\"index.md\" sourcestartlinenumber=\"23\"><p sourcefile=\"index.md\" sourcestartlinenumber=\"23\">Add feed <a href=\"https://www.myget.org/F/aspnetrelease/api/v2/\" sourcefile=\"index.md\" sourcestartlinenumber=\"23\">https://www.myget.org/F/aspnetrelease/api/v2/</a> to Nuget.config</p>\n<blockquote sourcefile=\"index.md\" sourcestartlinenumber=\"24\">\n<p sourcefile=\"index.md\" sourcestartlinenumber=\"24\">For Windows, the nuget config file is <strong sourcefile=\"index.md\" sourcestartlinenumber=\"24\">%AppData%\\NuGet\\NuGet.config</strong>.</p>\n</blockquote>\n<blockquote sourcefile=\"index.md\" sourcestartlinenumber=\"26\">\n<p sourcefile=\"index.md\" sourcestartlinenumber=\"26\">For Linux/OSX, the nuget config file is <strong sourcefile=\"index.md\" sourcestartlinenumber=\"26\">~/.config/NuGet/NuGet.config</strong>.</p>\n</blockquote>\n<pre><code sourcefile=\"index.md\" sourcestartlinenumber=\"27\"></code></pre>\n</li>\n<li sourcefile=\"index.md\" sourcestartlinenumber=\"28\"><p sourcefile=\"index.md\" sourcestartlinenumber=\"28\"><code sourcefile=\"index.md\" sourcestartlinenumber=\"28\">dnu commands install docfx</code> to install <code sourcefile=\"index.md\" sourcestartlinenumber=\"28\">docfx</code> as a command</p>\n</li>\n<li sourcefile=\"index.md\" sourcestartlinenumber=\"29\"><p sourcefile=\"index.md\" sourcestartlinenumber=\"29\">Run <code sourcefile=\"index.md\" sourcestartlinenumber=\"29\">docfx</code> under current repo! Website will be generated under <code sourcefile=\"index.md\" sourcestartlinenumber=\"29\">_site</code> folder.</p>\n</li>\n<li sourcefile=\"index.md\" sourcestartlinenumber=\"30\"><p sourcefile=\"index.md\" sourcestartlinenumber=\"30\">Run any web hosting tool to host <code sourcefile=\"index.md\" sourcestartlinenumber=\"30\">_site</code> folder, e.g. <code sourcefile=\"index.md\" sourcestartlinenumber=\"30\">docfx serve _site</code>.</p>\n</li>\n</ul>\n<h2 id=\"further-information-about-docfx\" sourcefile=\"index.md\" sourcestartlinenumber=\"32\">Further information about <code sourcefile=\"index.md\" sourcestartlinenumber=\"32\">docfx</code></h2>\n<p sourcefile=\"index.md\" sourcestartlinenumber=\"33\"><code sourcefile=\"index.md\" sourcestartlinenumber=\"33\">docfx</code> is a tool to generate documentation towards .NET source code and markdown files. Please refer to <a href=\"http://dotnet.github.io/docfx/tutorial/docfx_getting_started.html\" sourcefile=\"index.md\" sourcestartlinenumber=\"33\">docfx</a> to get start. The <code sourcefile=\"index.md\" sourcestartlinenumber=\"33\">docfx</code> website itself is generated by <code sourcefile=\"index.md\" sourcestartlinenumber=\"33\">docfx</code>!</p>\n",
"conceptual": "\n<h2 id=\"description\" sourcefile=\"index.md\" sourcestartlinenumber=\"9\">Description</h2>\n<p sourcefile=\"index.md\" sourcestartlinenumber=\"10\">This is a sample docfx documentation project. It contains .NET source code and markdown files.\n<code sourcefile=\"index.md\" sourcestartlinenumber=\"11\">docfx.json</code> is the configuration file for running <code sourcefile=\"index.md\" sourcestartlinenumber=\"11\">docfx</code>.\n<code sourcefile=\"index.md\" sourcestartlinenumber=\"12\">docfx</code> will generate a static website as similar to <a href=\"http://docascode.github.io/docfx-seed/index.html\" sourcefile=\"index.md\" sourcestartlinenumber=\"12\">http://docascode.github.io/docfx-seed</a>.</p>\n<h2 id=\"how-to-run\" sourcefile=\"index.md\" sourcestartlinenumber=\"14\">How to run</h2>\n<h3 id=\"under-windows\" sourcefile=\"index.md\" sourcestartlinenumber=\"15\">Under Windows</h3>\n<ul sourcefile=\"index.md\" sourcestartlinenumber=\"16\">\n<li sourcefile=\"index.md\" sourcestartlinenumber=\"16\">Download and unzip <a href=\"https://github.com/dotnet/docfx/releases/latest\" sourcefile=\"index.md\" sourcestartlinenumber=\"16\">docfx.zip</a> to run <code sourcefile=\"index.md\" sourcestartlinenumber=\"16\">docfx.exe</code> directly!</li>\n<li sourcefile=\"index.md\" sourcestartlinenumber=\"17\">Run <code sourcefile=\"index.md\" sourcestartlinenumber=\"17\">docfx</code> under current repo! Website will be generated under <code sourcefile=\"index.md\" sourcestartlinenumber=\"17\">_site</code> folder.</li>\n<li sourcefile=\"index.md\" sourcestartlinenumber=\"18\">Run any web hosting tool to host <code sourcefile=\"index.md\" sourcestartlinenumber=\"18\">_site</code> folder, e.g. <code sourcefile=\"index.md\" sourcestartlinenumber=\"18\">docfx serve _site</code>.</li>\n</ul>\n<h3 id=\"cross-platform-and-use-dnx\" sourcefile=\"index.md\" sourcestartlinenumber=\"20\">Cross platform and use <code sourcefile=\"index.md\" sourcestartlinenumber=\"20\">dnx</code></h3>\n<p sourcefile=\"index.md\" sourcestartlinenumber=\"21\">As a prerequisite, you will need to install <a href=\"http://docs.asp.net/en/latest/getting-started/installing-on-windows.html#install-the-net-version-manager-dnvm\" sourcefile=\"index.md\" sourcestartlinenumber=\"21\">DNVM</a> and <a href=\"http://docs.asp.net/en/latest/getting-started/installing-on-windows.html#install-the-net-execution-environment-dnx\" sourcefile=\"index.md\" sourcestartlinenumber=\"21\">DNX</a>.\n###Quick Start</p>\n<ul sourcefile=\"index.md\" sourcestartlinenumber=\"23\">\n<li sourcefile=\"index.md\" sourcestartlinenumber=\"23\"><p sourcefile=\"index.md\" sourcestartlinenumber=\"23\"><code sourcefile=\"index.md\" sourcestartlinenumber=\"23\">dnvm upgrade</code> to get the latest dnvm.</p>\n</li>\n<li sourcefile=\"index.md\" sourcestartlinenumber=\"24\"><p sourcefile=\"index.md\" sourcestartlinenumber=\"24\">Add feed <a href=\"https://www.myget.org/F/aspnetrelease/api/v2/\" sourcefile=\"index.md\" sourcestartlinenumber=\"24\">https://www.myget.org/F/aspnetrelease/api/v2/</a> to Nuget.config</p>\n<blockquote sourcefile=\"index.md\" sourcestartlinenumber=\"25\">\n<p sourcefile=\"index.md\" sourcestartlinenumber=\"25\">For Windows, the nuget config file is <strong sourcefile=\"index.md\" sourcestartlinenumber=\"25\">%AppData%\\NuGet\\NuGet.config</strong>.</p>\n</blockquote>\n<blockquote sourcefile=\"index.md\" sourcestartlinenumber=\"27\">\n<p sourcefile=\"index.md\" sourcestartlinenumber=\"27\">For Linux/OSX, the nuget config file is <strong sourcefile=\"index.md\" sourcestartlinenumber=\"27\">~/.config/NuGet/NuGet.config</strong>.</p>\n</blockquote>\n<pre><code sourcefile=\"index.md\" sourcestartlinenumber=\"28\"></code></pre>\n</li>\n<li sourcefile=\"index.md\" sourcestartlinenumber=\"29\"><p sourcefile=\"index.md\" sourcestartlinenumber=\"29\"><code sourcefile=\"index.md\" sourcestartlinenumber=\"29\">dnu commands install docfx</code> to install <code sourcefile=\"index.md\" sourcestartlinenumber=\"29\">docfx</code> as a command</p>\n</li>\n<li sourcefile=\"index.md\" sourcestartlinenumber=\"30\"><p sourcefile=\"index.md\" sourcestartlinenumber=\"30\">Run <code sourcefile=\"index.md\" sourcestartlinenumber=\"30\">docfx</code> under current repo! Website will be generated under <code sourcefile=\"index.md\" sourcestartlinenumber=\"30\">_site</code> folder.</p>\n</li>\n<li sourcefile=\"index.md\" sourcestartlinenumber=\"31\"><p sourcefile=\"index.md\" sourcestartlinenumber=\"31\">Run any web hosting tool to host <code sourcefile=\"index.md\" sourcestartlinenumber=\"31\">_site</code> folder, e.g. <code sourcefile=\"index.md\" sourcestartlinenumber=\"31\">docfx serve _site</code>.</p>\n</li>\n</ul>\n<h2 id=\"further-information-about-docfx\" sourcefile=\"index.md\" sourcestartlinenumber=\"33\">Further information about <code sourcefile=\"index.md\" sourcestartlinenumber=\"33\">docfx</code></h2>\n<p sourcefile=\"index.md\" sourcestartlinenumber=\"34\"><code sourcefile=\"index.md\" sourcestartlinenumber=\"34\">docfx</code> is a tool to generate documentation towards .NET source code and markdown files. Please refer to <a href=\"http://dotnet.github.io/docfx/tutorial/docfx_getting_started.html\" sourcefile=\"index.md\" sourcestartlinenumber=\"34\">docfx</a> to get start. The <code sourcefile=\"index.md\" sourcestartlinenumber=\"34\">docfx</code> website itself is generated by <code sourcefile=\"index.md\" sourcestartlinenumber=\"34\">docfx</code>!</p>\n",
"type": "Conceptual",
"source": {
"remote": {
Expand All @@ -25,7 +25,8 @@
"_appName": "Seed",
"_appTitle": "docfx seed website",
"_enableSearch": true,
"rawTitle": "<h1 id=\"docfx-seed\" sourcefile=\"index.md\" sourcestartlinenumber=\"7\">docfx-seed</h1>",
"rawTitle": "<h1 id=\"docfx-seed\" sourcefile=\"index.md\" sourcestartlinenumber=\"8\">docfx-seed</h1>",
"_appLogoUrl": "https://github.com/dotnet/docfx",
"_disableNewTab": true,
"_lang": "zh-CN",
"_layout": "landing",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@
<header class="bg-body border-bottom">
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
<div class="container-xxl flex-nowrap">
<a class="navbar-brand" href="index.html">
<a class="navbar-brand" href="https://github.com/dotnet/docfx">
<img id="logo" class="svg" src="logo.svg" alt="Seed">
Seed
</a>
Expand Down

0 comments on commit afc3d46

Please sign in to comment.