diff --git a/src/BlogMan.Test/BlogMan.Test.csproj b/src/BlogMan.Test/BlogMan.Test.csproj index 3a63532..d01a752 100644 --- a/src/BlogMan.Test/BlogMan.Test.csproj +++ b/src/BlogMan.Test/BlogMan.Test.csproj @@ -1,9 +1,20 @@  + Exe net8.0 enable enable + + + Always + + + + + + + diff --git a/src/BlogMan.Test/Program.cs b/src/BlogMan.Test/Program.cs new file mode 100644 index 0000000..2257450 --- /dev/null +++ b/src/BlogMan.Test/Program.cs @@ -0,0 +1,5 @@ + +await BlogMan.Program.Main( + "build", + "--project", + "Resources/test.json"); diff --git a/src/BlogMan.Test/Resources/.gitignore b/src/BlogMan.Test/Resources/.gitignore new file mode 100644 index 0000000..da3d337 --- /dev/null +++ b/src/BlogMan.Test/Resources/.gitignore @@ -0,0 +1,2 @@ +build/ +site/ \ No newline at end of file diff --git a/src/BlogMan.Test/Resources/post/test-post.md b/src/BlogMan.Test/Resources/post/test-post.md new file mode 100644 index 0000000..d6c7324 --- /dev/null +++ b/src/BlogMan.Test/Resources/post/test-post.md @@ -0,0 +1,19 @@ +--- +LCID: ko-kr +Layout: default +Title: Welcome! +Timestamps: +- 2023-10-04 +- 2023-10-05 +- 2023-10-06 +Topic: [ + "test-topic-0", + "test-topic-1" +] +--- + +## Hello There! + +[test-link-1](ref::test/test-post-1.md) + +[test-link-2](ref::test/test/test-post-2.md) diff --git a/src/BlogMan.Test/Resources/post/test0/test-post-1.md b/src/BlogMan.Test/Resources/post/test0/test-post-1.md new file mode 100644 index 0000000..d6c7324 --- /dev/null +++ b/src/BlogMan.Test/Resources/post/test0/test-post-1.md @@ -0,0 +1,19 @@ +--- +LCID: ko-kr +Layout: default +Title: Welcome! +Timestamps: +- 2023-10-04 +- 2023-10-05 +- 2023-10-06 +Topic: [ + "test-topic-0", + "test-topic-1" +] +--- + +## Hello There! + +[test-link-1](ref::test/test-post-1.md) + +[test-link-2](ref::test/test/test-post-2.md) diff --git a/src/BlogMan.Test/Resources/post/test0/test1/test-post-2.md b/src/BlogMan.Test/Resources/post/test0/test1/test-post-2.md new file mode 100644 index 0000000..1400ddc --- /dev/null +++ b/src/BlogMan.Test/Resources/post/test0/test1/test-post-2.md @@ -0,0 +1,19 @@ +--- +LCID: ko-kr +Layout: default +Title: Welcome! +Timestamps: +- 2023-10-04 +- 2023-10-05 +- 2023-10-06 +Topic: [ + "test-topic-0", + "test-topic-1" +] +--- + +## Hello There! + +[test-link-1](ref::test0/test-post-1.md) + +[test-link-2](ref::test0/test1/test-post-2.md) diff --git a/src/BlogMan.Test/Resources/test.json b/src/BlogMan.Test/Resources/test.json new file mode 100644 index 0000000..ab1b426 --- /dev/null +++ b/src/BlogMan.Test/Resources/test.json @@ -0,0 +1,20 @@ +{ + "Info": { + "Name": "sharp0802-github-io", + "ApiVersion": "1.0.0.0", + "RootUri": "https://sharp0802.github.io/", + "PostDirectory": "post/", + "LayoutDirectory": "layout/", + "SiteDirectory": "docs/", + "BuildDirectory": "build/" + }, + "Profile": { + "UserName": "Sharp0802", + "ProfileImage": "https://avatars.githubusercontent.com/u/64760536?v=4" + }, + "Contacts": { + "GitHub": "https://www.github.com/Sharp0802", + "Email": "sharp0802.business@gmail.com", + "Misc": [] + } +} diff --git a/src/BlogMan/Program.cs b/src/BlogMan/Program.cs index e0c802c..ad4212f 100644 --- a/src/BlogMan/Program.cs +++ b/src/BlogMan/Program.cs @@ -1,6 +1,14 @@ using System.CommandLine; using BlogMan.Components; -var root = new RootCommand(); -Initializer.InitializeRoot(root); -return await root.InvokeAsync(args); \ No newline at end of file +namespace BlogMan; + +public static class Program +{ + public static async Task Main(params string[] args) + { + var root = new RootCommand(); + Initializer.InitializeRoot(root); + return await root.InvokeAsync(args); + } +}