From f615e009d19c26b9296390fea8e8a07b2882075b Mon Sep 17 00:00:00 2001 From: Yufei Huang Date: Tue, 14 Mar 2023 15:28:28 +0800 Subject: [PATCH 1/2] feat: update docfx to use modern template --- docs/docfx.json | 1 + docs/template/dashboard.html.tmpl | 123 ++++++++-------------- docs/template/index.html.tmpl | 20 ---- docs/template/layout/_master.tmpl | 57 ----------- docs/template/styles/main.css | 146 +-------------------------- templates/build.js | 3 +- templates/modern/layout/_master.tmpl | 1 + templates/modern/src/docfx.scss | 1 + templates/modern/src/docfx.ts | 5 +- templates/modern/src/layout.scss | 55 +++++----- templates/modern/src/nav.ts | 23 +++++ templates/modern/src/theme.ts | 53 +++++----- templates/modern/src/toc.ts | 6 +- 13 files changed, 136 insertions(+), 358 deletions(-) delete mode 100644 docs/template/index.html.tmpl delete mode 100644 docs/template/layout/_master.tmpl diff --git a/docs/docfx.json b/docs/docfx.json index aedff16d181..39fc962cc70 100644 --- a/docs/docfx.json +++ b/docs/docfx.json @@ -37,6 +37,7 @@ "dest": "_site", "template": [ "default", + "modern", "template" ] } diff --git a/docs/template/dashboard.html.tmpl b/docs/template/dashboard.html.tmpl index f09ad6d8922..73993916a9e 100644 --- a/docs/template/dashboard.html.tmpl +++ b/docs/template/dashboard.html.tmpl @@ -1,88 +1,47 @@ {{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}} -{{!include(/^styles/.*/)}} -{{!include(/^fonts/.*/)}} -{{!include(favicon.ico)}} -{{!include(logo.svg)}} - - - - {{>partials/head}} - - -
-
- {{>partials/navbar}} - {{>partials/breadcrumb}} -
- - {{>partials/footer}} -
- {{>partials/scripts}} - - \ No newline at end of file + diff --git a/docs/template/index.html.tmpl b/docs/template/index.html.tmpl deleted file mode 100644 index 23c520417f0..00000000000 --- a/docs/template/index.html.tmpl +++ /dev/null @@ -1,20 +0,0 @@ -{{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}} -{{!include(/^styles/.*/)}} -{{!include(/^fonts/.*/)}} -{{!include(favicon.ico)}} -{{!include(logo.svg)}} - - - - {{>partials/head}} - -
-
- {{>partials/navbar}} -
- {{{conceptual}}} - {{>partials/footer}} -
- {{>partials/scripts}} - - \ No newline at end of file diff --git a/docs/template/layout/_master.tmpl b/docs/template/layout/_master.tmpl deleted file mode 100644 index 4015c9c00f8..00000000000 --- a/docs/template/layout/_master.tmpl +++ /dev/null @@ -1,57 +0,0 @@ -{{!Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}} -{{!include(/^styles/.*/)}} -{{!include(/^fonts/.*/)}} -{{!include(favicon.ico)}} -{{!include(logo.svg)}} -{{!include(search-stopwords.json)}} - - - - {{>partials/head}} - {{^redirect_url}} - -
-
- {{^_disableNavbar}} - {{>partials/navbar}} - {{/_disableNavbar}} - {{^_disableBreadcrumb}} - {{>partials/breadcrumb}} - {{/_disableBreadcrumb}} -
- {{#_enableSearch}} -
- {{>partials/searchResults}} -
- {{/_enableSearch}} - - -
+ + diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedHtml/html/api-CatLibrary.html-term-cat.verified.html b/test/docfx.Snapshot.Tests/SamplesTest.SeedHtml/html/api-CatLibrary.html-term-cat.verified.html index 5b04013194a..e6f7865cbfd 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedHtml/html/api-CatLibrary.html-term-cat.verified.html +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedHtml/html/api-CatLibrary.html-term-cat.verified.html @@ -14,6 +14,7 @@ + @@ -306,17 +307,17 @@

Made with docfx - - + + diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedHtml/html/api-CatLibrary.html.verified.html b/test/docfx.Snapshot.Tests/SamplesTest.SeedHtml/html/api-CatLibrary.html.verified.html index f8259b05948..a3bba335d59 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedHtml/html/api-CatLibrary.html.verified.html +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedHtml/html/api-CatLibrary.html.verified.html @@ -14,6 +14,7 @@ + @@ -288,17 +289,17 @@

Made with docfx - - + + diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedHtml/html/articles-csharp_coding_standards.html.verified.html b/test/docfx.Snapshot.Tests/SamplesTest.SeedHtml/html/articles-csharp_coding_standards.html.verified.html index bf3bf1124e7..a13f89c8588 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedHtml/html/articles-csharp_coding_standards.html.verified.html +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedHtml/html/articles-csharp_coding_standards.html.verified.html @@ -12,6 +12,7 @@ + @@ -292,17 +293,17 @@

In this article
Made with docfx
- - + + diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedHtml/html/articles-markdown.html-tabs-windows-2Ctypescript-markdown-extensions.verified.html b/test/docfx.Snapshot.Tests/SamplesTest.SeedHtml/html/articles-markdown.html-tabs-windows-2Ctypescript-markdown-extensions.verified.html index e47124b6ffa..2cdc52af3d5 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedHtml/html/articles-markdown.html-tabs-windows-2Ctypescript-markdown-extensions.verified.html +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedHtml/html/articles-markdown.html-tabs-windows-2Ctypescript-markdown-extensions.verified.html @@ -12,6 +12,7 @@ + @@ -348,17 +349,17 @@
In this article
Made with docfx
- - + + diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedHtml/html/index.html.verified.html b/test/docfx.Snapshot.Tests/SamplesTest.SeedHtml/html/index.html.verified.html index 8f796fe6777..390d9dd7bf9 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedHtml/html/index.html.verified.html +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedHtml/html/index.html.verified.html @@ -12,6 +12,7 @@ + @@ -139,17 +140,17 @@
In this article
Made with docfx
- - + + diff --git a/test/docfx.Snapshot.Tests/SamplesTest.SeedHtml/html/restapi-petstore.html.verified.html b/test/docfx.Snapshot.Tests/SamplesTest.SeedHtml/html/restapi-petstore.html.verified.html index 9aaa93450d8..b82641d4c50 100644 --- a/test/docfx.Snapshot.Tests/SamplesTest.SeedHtml/html/restapi-petstore.html.verified.html +++ b/test/docfx.Snapshot.Tests/SamplesTest.SeedHtml/html/restapi-petstore.html.verified.html @@ -12,6 +12,7 @@ + @@ -1440,17 +1441,17 @@
In this article
Made with docfx
- - + +