Skip to content

Commit 0b094f6

Browse files
authored
Change to linux host and upgrade to .NET 9 (and fix renderer warnings) (#96)
* fix datatypes filename * rename syntax folder * upgrrade .net and actions * deal with warnings * use ubuntu runner
1 parent 0fb793e commit 0b094f6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+10
-7
lines changed

.github/workflows/main.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,25 @@ name: 🚀 Deploy website on push
66
jobs:
77
publish:
88
name: 🎉 Publish
9-
runs-on: windows-latest
9+
runs-on: ubuntu-latest
1010
steps:
1111
- name: Setup .NET Core SDK
1212
uses: actions/setup-dotnet@v4.0.0
1313
with:
1414
# Optional SDK version(s) to use. If not provided, will install global.json version when available. Examples: 2.2.104, 3.1, 3.1.x, 3.x, 6.0.2xx
15-
dotnet-version: 8.0.x
15+
dotnet-version: 9.0.x
1616

1717
- name: 🚚 Get latest code
1818
uses: actions/checkout@v4
1919

2020
- name: Run Publish
21-
run: dotnet publish
21+
run: dotnet publish -c Release
2222

2323
- name: 📂 Upload files
24-
uses: SamKirkland/FTP-Deploy-Action@v4.3.5
24+
uses: SamKirkland/FTP-Deploy-Action@v4.3.6
2525
with:
2626
server: kopernicuswiki.org
2727
port: 2121
2828
username: kopwiki
29-
local-dir: bin/Release/net8.0/publish/
29+
local-dir: bin/Release/net9.0/publish/
3030
password: ${{ secrets.password }}

Components/MarkdownPageRenderer.razor

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
private Regex linkAdder = new(@"(#\w+)");
1414
private Regex curlCleaner = new(@"(?<=##.*)({)(?=\[)");
1515
private Regex idAdder = new(@"(?:## ([\w ]*))");
16+
#pragma warning disable CS1998
1617
protected override async Task OnInitializedAsync()
1718
{
1819
string markdownFile = $"{System.IO.Directory.GetCurrentDirectory()}{@"/wwwroot/content/" + srcFile}";
@@ -29,6 +30,7 @@
2930
htmlText = Markdown.ToHtml(markdown, pipeline);
3031
} else htmlText = Markdown.ToHtml(rawMarkdown, pipeline);
3132
}
33+
#pragma warning restore CS1998
3234

3335
private string Evaluate(Match match) =>
3436
$"{match.Value.TrimEnd()} {{#{match.Groups[1].Value.Trim().Replace(' ', '-')}}}";

ExamplePage.razor

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
@page "/Sample/Url"
2+
@using kopernicus_wiki.Components
23

34
<h1>@pageTitle</h1>
45

kopernicus-wiki.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>net8.0</TargetFramework>
4+
<TargetFramework>net9.0</TargetFramework>
55
<Nullable>enable</Nullable>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<RootNamespace>kopernicus-wiki</RootNamespace>
@@ -14,7 +14,7 @@
1414
</ItemGroup>
1515

1616
<ItemGroup>
17-
<PackageReference Include="Markdig" Version="0.37.0" />
17+
<PackageReference Include="Markdig" Version="0.44.0" />
1818
</ItemGroup>
1919

2020
</Project>

wwwroot/content/syntax/Atmosphere/AtmosphereFromGround.md renamed to wwwroot/content/Syntax/Atmosphere/AtmosphereFromGround.md

0 commit comments

Comments
 (0)