Skip to content

Commit 8ad0fa2

Browse files
committed
Add metadata settings.
1 parent a897a0d commit 8ad0fa2

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

Markocoa/Commands/BuildCommand.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ public void Execute()
3030
// Assuming the first .yml file is the project settings
3131
ProjectSettings settings = Serializer.Deserialize<ProjectSettings>(files[0]);
3232

33-
// Build the site
3433
Compiler.Build(projectPath, settings);
3534
}
3635
}

Markocoa/ProjectSettings.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ internal class ProjectSettings
1212
/// </summary>
1313
public string? Name { get; set; }
1414

15+
/// <summary>
16+
/// The summary of the project to use in meta data.
17+
/// </summary>
18+
public string? Summary { get; set; }
19+
1520
/// <summary>
1621
/// The theme of the project.
1722
/// </summary>

Markocoa/Utilities/Compiler.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,12 @@ public static void Build(string projectPath, ProjectSettings settings)
111111
<!DOCTYPE html>
112112
<html>
113113
<head>
114+
<meta name=""description"" content=""{settings.Summary ?? string.Empty}"">
114115
<meta http-equiv=""refresh"" content=""0; url=/{relativeTarget}"" />
115116
<script>
116117
window.location.replace('/{relativeTarget}');
117118
</script>
118-
<title>Redirecting...</title>
119+
<title>{settings.Name}</title>
119120
</head>
120121
<body>
121122
<p>Redirecting to <a href=""{relativeTarget}"">{relativeTarget}</a>...</p>

0 commit comments

Comments
 (0)