Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support description metadata #9585

Merged
merged 2 commits into from
Jan 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions src/Docfx.Build/SystemMetadata.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,6 @@ namespace Docfx.Build.Engine;

class SystemMetadata
{
[JsonProperty("_title")]
[JsonPropertyName("_title")]
public string Title { get; set; }

[JsonProperty("_tocTitle")]
[JsonPropertyName("_tocTitle")]
public string TocTitle { get; set; }

[JsonProperty("_name")]
[JsonPropertyName("_name")]
public string Name { get; set; }

[JsonProperty("_description")]
[JsonPropertyName("_description")]
public string Description { get; set; }

/// <summary>
/// TOC PATH from ~ ROOT
Expand Down
1 change: 1 addition & 0 deletions templates/default/partials/head.tmpl.partial
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
<meta name="viewport" content="width=device-width">
<meta name="title" content="{{#title}}{{title}}{{/title}}{{^title}}{{>partials/title}}{{/title}} {{#_appTitle}}| {{_appTitle}} {{/_appTitle}}">
{{#_description}}<meta name="description" content="{{_description}}">{{/_description}}
{{#description}}<meta name="description" content="{{description}}">{{/description}}
<link rel="shortcut icon" href="{{_rel}}{{{_appFaviconPath}}}{{^_appFaviconPath}}favicon.ico{{/_appFaviconPath}}">
<link rel="stylesheet" href="{{_rel}}styles/docfx.vendor.min.css">
<link rel="stylesheet" href="{{_rel}}styles/docfx.css">
Expand Down
1 change: 1 addition & 0 deletions templates/modern/layout/_master.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="{{#title}}{{title}}{{/title}}{{^title}}{{>partials/title}}{{/title}} {{#_appTitle}}| {{_appTitle}} {{/_appTitle}}">
{{#_description}}<meta name="description" content="{{_description}}">{{/_description}}
{{#description}}<meta name="description" content="{{description}}">{{/description}}
<link rel="icon" href="{{_rel}}{{{_appFaviconPath}}}{{^_appFaviconPath}}favicon.ico{{/_appFaviconPath}}">
<link rel="stylesheet" href="{{_rel}}public/docfx.min.css">
<link rel="stylesheet" href="{{_rel}}public/main.css">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<meta name="title" content="Class Class1
| docfx seed website ">


<link rel="icon" href="../favicon.ico">
<style class="anchorjs"></style><link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<meta name="title" content="Class Cat<T, K>
| docfx seed website ">

Comment on lines 6 to 8
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yufeih any idea why these have new lines appended to them? I only see this in API generation, the conceptual articles are correct with a single line title.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are caused by the changes here and isn't specific to API pages, e.g. this one


<link rel="icon" href="../favicon.ico">
<style class="anchorjs"></style><link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<meta name="title" content="Namespace CatLibrary
| docfx seed website ">


<link rel="icon" href="../favicon.ico">
<style class="anchorjs"></style><link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<meta name="title" content="Namespace CatLibrary
| docfx seed website ">


<link rel="icon" href="../favicon.ico">
<style class="anchorjs"></style><link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="C# Coding Standards | docfx seed website ">


<link rel="icon" href="../favicon.ico">
<style class="anchorjs"></style><link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Markdown | docfx seed website ">


<link rel="icon" href="../favicon.ico">
<style class="anchorjs"></style><link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="docfx-seed | docfx seed website ">


<link rel="icon" href="favicon.ico">
<style class="anchorjs"></style><link rel="stylesheet" href="public/docfx.min.css">
<link rel="stylesheet" href="public/main.css">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Pet Store APIs | docfx seed website ">


<link rel="icon" href="../favicon.ico">
<style class="anchorjs"></style><link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
Expand Down