Skip to content

Commit 1eec436

Browse files
committed
2 parents 67a9b75 + 111a24a commit 1eec436

File tree

12 files changed

+726
-38
lines changed

12 files changed

+726
-38
lines changed

.github/workflows/static.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ jobs:
3939
uses: actions/setup-dotnet@v2
4040
with:
4141
dotnet-version: '6.x'
42+
- name: Configure pagefile
43+
uses: al-cheb/[email protected]
44+
with:
45+
minimum-size: 10GB
46+
maximum-size: 12GB
4247
- name: Download docfx
4348
run: |
4449
$client = new-object System.Net.WebClient
@@ -48,11 +53,6 @@ jobs:
4853
Expand-Archive ./docfx.zip -d ./docfx
4954
./docfx/docfx.exe --version
5055
echo "%GITHUB_WORKSPACE%/docfx" >> $GITHUB_PATH
51-
- name: Checkout DocFxMarkdownGen
52-
uses: actions/checkout@v3
53-
with:
54-
repository: Layoric/DocFxMarkdownGen
55-
path: DocFxMarkdownGen
5656
- name: Checkout ServiceStack
5757
uses: actions/checkout@v3
5858
with:

generate.ps1

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,7 @@ if(Test-Path -Path './docfx') {
66
Get-ChildItem './api/*.yml' | ForEach {
77
(Get-Content $_) | ForEach {$_ -Replace '[email protected]:ServiceStack/ServiceStack.git', 'https://github.com/ServiceStack/ServiceStack'} | Set-Content $_
88
}
9-
if (Test-Path -Path './DocFxMarkdownGen') {
10-
echo "Already exists, skipping DocFXMarkdownGen clone"
11-
} else {
12-
git clone git@github.com:Layoric/DocFxMarkdownGen.git
13-
}
14-
cd DocFxMarkdownGen
9+
cd markdowngen
1510
dotnet publish -o ../out
1611
cd ..
1712
./out/DocFxMarkdownGen.exe

generate.sh

Lines changed: 0 additions & 26 deletions
This file was deleted.

markdowngen/.gitignore

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
bin/
2+
obj/
3+
/packages/
4+
riderModule.iml
5+
/_ReSharper.Caches/
6+
.idea/
7+
.vscode/
8+
/config.yaml
9+
/nupkg
10+
/.config/dotnet-tools.json
11+
12+
/examples/*/.docusaurus
13+
/examples/*/node_modules
14+
/examples/*/docs/api
15+
/examples/*/api
16+
.vercel

markdowngen/DTOs.cs

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
using YamlDotNet.Serialization;
2+
3+
namespace DocFxMarkdownGen;
4+
5+
public class DocFxFile
6+
{
7+
public Item[] Items { get; set; }
8+
}
9+
10+
public class Item
11+
{
12+
public string Uid { get; set; }
13+
public string CommentId { get; set; }
14+
public string Id { get; set; }
15+
public string Parent { get; set; }
16+
public string[] Children { get; set; }
17+
public string[] Langs { get; set; }
18+
public string Definition { get; set; }
19+
public string Name { get; set; }
20+
public string NameWithType { get; set; }
21+
public string FullName { get; set; }
22+
23+
public string Type { get; set; }
24+
25+
public Source Source { get; set; }
26+
public string[] Assemblies { get; set; }
27+
28+
public string Namespace { get; set; }
29+
30+
// todo: trim when loading instead of when usig gnfgnrjfuijik
31+
public string? Summary { get; set; }
32+
33+
// todo: example
34+
public Syntax Syntax { get; set; }
35+
36+
public string[] Inheritance { get; set; }
37+
public string[]? Implements { get; set; }
38+
39+
public string[]? InheritedMembers { get; set; }
40+
41+
public string[] ExtensionMethods { get; set; }
42+
// modifiers.csharp
43+
// modifiers.vb
44+
}
45+
46+
public class Syntax
47+
{
48+
public string Content { get; set; }
49+
[YamlMember(Alias = "content.vb")] public string ContentVb { get; set; }
50+
public Parameter[] Parameters { get; set; }
51+
public TypeParameter[] TypeParameters { get; set; }
52+
public SyntaxReturn Return { get; set; }
53+
}
54+
55+
public class Source
56+
{
57+
public Remote Remote { get; set; }
58+
public string Id { get; set; }
59+
public string Path { get; set; }
60+
public int StartLine { get; set; }
61+
}
62+
63+
public class Remote
64+
{
65+
public string Path { get; set; }
66+
public string Branch { get; set; }
67+
public string Repo { get; set; }
68+
}
69+
70+
public class Parameter
71+
{
72+
public string Id { get; set; }
73+
public string Type { get; set; }
74+
public string? Description { get; set; }
75+
}
76+
77+
public class TypeParameter
78+
{
79+
public string Id { get; set; }
80+
public string Description { get; set; }
81+
}
82+
83+
public class SyntaxReturn
84+
{
85+
public string Type { get; set; }
86+
public string? Description { get; set; }
87+
}
88+
89+
public class Config
90+
{
91+
public string YamlPath { get; set; }
92+
public string OutputPath { get; set; }
93+
public string IndexSlug { get; set; }
94+
public bool UseIconify { get; set; }
95+
}

markdowngen/DocFxMarkdownGen.csproj

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>Exe</OutputType>
5+
<TargetFramework>net6.0</TargetFramework>
6+
<Version>0.1.5</Version>
7+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
8+
<Description>Docusaurus Markdown generator using DocFX.</Description>
9+
<RepositoryUrl>https://github.com/Jan0660/DocFxMarkdownGen</RepositoryUrl>
10+
<PackAsTool>true</PackAsTool>
11+
<ToolCommandName>dfmg</ToolCommandName>
12+
<PackageOutputPath>./nupkg</PackageOutputPath>
13+
<ImplicitUsings>enable</ImplicitUsings>
14+
<Nullable>enable</Nullable>
15+
</PropertyGroup>
16+
17+
<ItemGroup>
18+
<PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0" />
19+
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="6.0.0" />
20+
<PackageReference Include="ServiceStack.Text" Version="6.3.0" />
21+
<PackageReference Include="YamlDotNet" Version="11.2.1" />
22+
<None Update="config.yaml">
23+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
24+
</None>
25+
<None Update="api\*">
26+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
27+
</None>
28+
</ItemGroup>
29+
30+
</Project>

markdowngen/DocFxMarkdownGen.sln

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DocFxMarkdownGen", "DocFxMarkdownGen.csproj", "{7E4D53D2-3A2B-4DD4-9E7B-FB5C2A18C312}"
4+
EndProject
5+
Global
6+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
7+
Debug|Any CPU = Debug|Any CPU
8+
Release|Any CPU = Release|Any CPU
9+
EndGlobalSection
10+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
11+
{7E4D53D2-3A2B-4DD4-9E7B-FB5C2A18C312}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
12+
{7E4D53D2-3A2B-4DD4-9E7B-FB5C2A18C312}.Debug|Any CPU.Build.0 = Debug|Any CPU
13+
{7E4D53D2-3A2B-4DD4-9E7B-FB5C2A18C312}.Release|Any CPU.ActiveCfg = Release|Any CPU
14+
{7E4D53D2-3A2B-4DD4-9E7B-FB5C2A18C312}.Release|Any CPU.Build.0 = Release|Any CPU
15+
EndGlobalSection
16+
EndGlobal

markdowngen/LICENSE

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Copyright 2021 Jan0660
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4+
5+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6+
7+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

0 commit comments

Comments
 (0)