Skip to content

Commit

Permalink
Merge branch 'main' into chore-enable-nullable-yamlproject
Browse files Browse the repository at this point in the history
  • Loading branch information
filzrev authored Nov 27, 2024
2 parents 81aafa5 + 3ff9ae7 commit 355b2d1
Show file tree
Hide file tree
Showing 13 changed files with 1,704 additions and 1,657 deletions.
13 changes: 13 additions & 0 deletions src/Docfx.App/PdfBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,8 @@ async Task MergePdf()
if (!pageBytes.TryGetValue(node, out var bytes))
continue;

var isCoverPage = url.AbsolutePath.TrimStart('/').Equals(outline.pdfCoverPage, GetStringComparison());

var isTocPage = IsTocPage(url);
if (isTocPage)
{
Expand All @@ -375,6 +377,9 @@ async Task MergePdf()

var pageBuilder = builder.AddPage(document, i, x => CopyLink(node, x));

if (isCoverPage)
continue;

if (isTocPage)
continue;

Expand Down Expand Up @@ -615,4 +620,12 @@ static string getMillimeter(double pt)
return $"{Math.Round(pt * MillimeterPerInch / Dpi)}mm";
}
}

// Gets StringComparison instance for path string.
private static StringComparison GetStringComparison()
{
return PathUtility.IsPathCaseInsensitive()
? StringComparison.OrdinalIgnoreCase
: StringComparison.Ordinal;
}
}
96 changes: 48 additions & 48 deletions templates/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions templates/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,16 @@
},
"devDependencies": {
"@types/lunr": "^2.3.7",
"@typescript-eslint/eslint-plugin": "^8.15.0",
"@typescript-eslint/parser": "^8.15.0",
"@typescript-eslint/eslint-plugin": "^8.16.0",
"@typescript-eslint/parser": "^8.16.0",
"browser-sync": "^3.0.3",
"esbuild": "~0.24.0",
"esbuild-sass-plugin": "~3.3.1",
"eslint": "^8.57.1",
"eslint-config-standard": "^17.1.0",
"stylelint": "^16.10.0",
"stylelint-config-standard-scss": "^13.1.0",
"typescript": "^5.6.3",
"typescript": "^5.7.2",
"yargs": "^17.7.2"
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"items": [
{
"name": "Namespace",
"name": "Namespaces",
"items": [
{
"name": "MyExample",
Expand All @@ -11,7 +11,7 @@
"type": "Namespace",
"items": [
{
"name": "Class",
"name": "Classes",
"items": [
{
"name": "ExampleClass",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"content": "{\"items\":[{\"name\":\"Namespace\",\"items\":[{\"name\":\"MyExample\",\"href\":\"MyExample.html\",\"topicHref\":\"MyExample.html\",\"topicUid\":\"MyExample\",\"type\":\"Namespace\",\"items\":[{\"name\":\"Class\",\"items\":[{\"name\":\"ExampleClass\",\"href\":\"MyExample.ExampleClass.html\",\"topicHref\":\"MyExample.ExampleClass.html\",\"topicUid\":\"MyExample.ExampleClass\",\"type\":\"Class\",\"items\":[{\"name\":\"Constructors\",\"items\":[{\"name\":\"ExampleClass\",\"href\":\"MyExample.ExampleClass.-ctor.html\",\"topicHref\":\"MyExample.ExampleClass.-ctor.html\",\"topicUid\":\"MyExample.ExampleClass.#ctor*\",\"type\":\"Constructor\",\"fullName\":\"MyExample.ExampleClass.ExampleClass\",\"nameWithType\":\"ExampleClass.ExampleClass\",\"isEii\":false,\"tocHref\":null,\"level\":7,\"items\":[],\"leaf\":true}],\"topicHref\":null,\"tocHref\":null,\"level\":6,\"leaf\":false},{\"name\":\"Properties\",\"items\":[{\"name\":\"MyProperty\",\"href\":\"MyExample.ExampleClass.MyProperty.html\",\"topicHref\":\"MyExample.ExampleClass.MyProperty.html\",\"topicUid\":\"MyExample.ExampleClass.MyProperty*\",\"type\":\"Property\",\"fullName\":\"MyExample.ExampleClass.MyProperty\",\"nameWithType\":\"ExampleClass.MyProperty\",\"isEii\":false,\"tocHref\":null,\"level\":7,\"items\":[],\"leaf\":true}],\"topicHref\":null,\"tocHref\":null,\"level\":6,\"leaf\":false},{\"name\":\"Methods\",\"items\":[{\"name\":\"MyMethod\",\"href\":\"MyExample.ExampleClass.MyMethod.html\",\"topicHref\":\"MyExample.ExampleClass.MyMethod.html\",\"topicUid\":\"MyExample.ExampleClass.MyMethod*\",\"type\":\"Method\",\"fullName\":\"MyExample.ExampleClass.MyMethod\",\"nameWithType\":\"ExampleClass.MyMethod\",\"isEii\":false,\"tocHref\":null,\"level\":7,\"items\":[],\"leaf\":true}],\"topicHref\":null,\"tocHref\":null,\"level\":6,\"leaf\":false},{\"name\":\"Events\",\"items\":[{\"name\":\"MyEvent\",\"href\":\"MyExample.ExampleClass.MyEvent.html\",\"topicHref\":\"MyExample.ExampleClass.MyEvent.html\",\"topicUid\":\"MyExample.ExampleClass.MyEvent\",\"type\":\"Event\",\"fullName\":\"MyExample.ExampleClass.MyEvent\",\"nameWithType\":\"ExampleClass.MyEvent\",\"isEii\":false,\"tocHref\":null,\"level\":7,\"items\":[],\"leaf\":true}],\"topicHref\":null,\"tocHref\":null,\"level\":6,\"leaf\":false}],\"tocHref\":null,\"level\":5,\"leaf\":false}],\"topicHref\":null,\"tocHref\":null,\"level\":4,\"leaf\":false}],\"tocHref\":null,\"level\":3,\"leaf\":false}],\"topicHref\":null,\"tocHref\":null,\"level\":2,\"leaf\":false}],\"memberLayout\":\"SeparatePages\",\"topicHref\":null,\"tocHref\":null,\"name\":null,\"level\":1,\"leaf\":false}"
"content": "{\"items\":[{\"name\":\"Namespaces\",\"items\":[{\"name\":\"MyExample\",\"href\":\"MyExample.html\",\"topicHref\":\"MyExample.html\",\"topicUid\":\"MyExample\",\"type\":\"Namespace\",\"items\":[{\"name\":\"Classes\",\"items\":[{\"name\":\"ExampleClass\",\"href\":\"MyExample.ExampleClass.html\",\"topicHref\":\"MyExample.ExampleClass.html\",\"topicUid\":\"MyExample.ExampleClass\",\"type\":\"Class\",\"items\":[{\"name\":\"Constructors\",\"items\":[{\"name\":\"ExampleClass\",\"href\":\"MyExample.ExampleClass.-ctor.html\",\"topicHref\":\"MyExample.ExampleClass.-ctor.html\",\"topicUid\":\"MyExample.ExampleClass.#ctor*\",\"type\":\"Constructor\",\"fullName\":\"MyExample.ExampleClass.ExampleClass\",\"nameWithType\":\"ExampleClass.ExampleClass\",\"isEii\":false,\"tocHref\":null,\"level\":7,\"items\":[],\"leaf\":true}],\"topicHref\":null,\"tocHref\":null,\"level\":6,\"leaf\":false},{\"name\":\"Properties\",\"items\":[{\"name\":\"MyProperty\",\"href\":\"MyExample.ExampleClass.MyProperty.html\",\"topicHref\":\"MyExample.ExampleClass.MyProperty.html\",\"topicUid\":\"MyExample.ExampleClass.MyProperty*\",\"type\":\"Property\",\"fullName\":\"MyExample.ExampleClass.MyProperty\",\"nameWithType\":\"ExampleClass.MyProperty\",\"isEii\":false,\"tocHref\":null,\"level\":7,\"items\":[],\"leaf\":true}],\"topicHref\":null,\"tocHref\":null,\"level\":6,\"leaf\":false},{\"name\":\"Methods\",\"items\":[{\"name\":\"MyMethod\",\"href\":\"MyExample.ExampleClass.MyMethod.html\",\"topicHref\":\"MyExample.ExampleClass.MyMethod.html\",\"topicUid\":\"MyExample.ExampleClass.MyMethod*\",\"type\":\"Method\",\"fullName\":\"MyExample.ExampleClass.MyMethod\",\"nameWithType\":\"ExampleClass.MyMethod\",\"isEii\":false,\"tocHref\":null,\"level\":7,\"items\":[],\"leaf\":true}],\"topicHref\":null,\"tocHref\":null,\"level\":6,\"leaf\":false},{\"name\":\"Events\",\"items\":[{\"name\":\"MyEvent\",\"href\":\"MyExample.ExampleClass.MyEvent.html\",\"topicHref\":\"MyExample.ExampleClass.MyEvent.html\",\"topicUid\":\"MyExample.ExampleClass.MyEvent\",\"type\":\"Event\",\"fullName\":\"MyExample.ExampleClass.MyEvent\",\"nameWithType\":\"ExampleClass.MyEvent\",\"isEii\":false,\"tocHref\":null,\"level\":7,\"items\":[],\"leaf\":true}],\"topicHref\":null,\"tocHref\":null,\"level\":6,\"leaf\":false}],\"tocHref\":null,\"level\":5,\"leaf\":false}],\"topicHref\":null,\"tocHref\":null,\"level\":4,\"leaf\":false}],\"tocHref\":null,\"level\":3,\"leaf\":false}],\"topicHref\":null,\"tocHref\":null,\"level\":2,\"leaf\":false}],\"memberLayout\":\"SeparatePages\",\"topicHref\":null,\"tocHref\":null,\"name\":null,\"level\":1,\"leaf\":false}"
}
Loading

0 comments on commit 355b2d1

Please sign in to comment.