Skip to content

Commit

Permalink
💚 Remove dynamic route
Browse files Browse the repository at this point in the history
  • Loading branch information
koeeenig committed Jan 17, 2024
1 parent 5eeba0f commit df459bc
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 99 deletions.
9 changes: 8 additions & 1 deletion src/BlazeKit.Website/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,15 @@

if (args.Count() > 0 && args[0] == "ssg") {
Console.WriteLine("Building Static Site");

if(args.Count() < 2) {
Console.WriteLine("SSG Error: No output path provided");
return;
}
Console.WriteLine($"SSG OUtput: {args[1]}");

new BlazeKit.Static.StaticSiteGenerator(
Path.Combine(".blazekit","build","ssg"),
args[1],
Path.Combine(".blazekit","build","tmp","wwwroot"),
typeof(BlazeKit.Website.Index).Assembly
).Build();
Expand Down
11 changes: 11 additions & 0 deletions src/BlazeKit.Website/Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,17 @@
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"SSG": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
"applicationUrl": "http://localhost:5000",
"commandLineArgs": "ssg ../../.vercel/output/static",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"https": {
"commandName": "Project",
"dotnetRunMessages": true,
Expand Down
93 changes: 0 additions & 93 deletions src/BlazeKit.Website/Routes/(Public)/Items/Details/[Id]/Page.razor

This file was deleted.

1 change: 0 additions & 1 deletion src/BlazeKit.Website/Routes/Page.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,4 @@ Are more features coming to BlazeKit?
I am certainly like to keep working on BlazeKit since i see some oppertunities with the release of .NET 8. Yes, i am looking at you Server-Side-Rendering.

## Links to Examples
- [Nested Layouts Demo with Route Params](/items/details/2?foo=bar)
- [Breaking out of layouts Demo](/items/details)
5 changes: 5 additions & 0 deletions ssg.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
cd ./src/BlazeKit.Website
dotnet publish -o .blazekit/build/tmp
dotnet run ssg ../../.vercel/output/static
cd ..
cd ..
4 changes: 1 addition & 3 deletions ssg.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#!/usr/bin/env bash
cd ./src/BlazeKit.Website
/vercel/.dotnet/dotnet publish -o .blazekit/build/tmp
/vercel/.dotnet/dotnet run ssg
mkdir -p ../../.vercel/output/static
rsync -av ./.blazekit/build/ssg/ ./../../.vercel/output/static/
/vercel/.dotnet/dotnet run ssg ../../.vercel/output/static
2 changes: 1 addition & 1 deletion vercel.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"buildCommand": "cd ./src/BlazeKit.Website ; /vercel/.dotnet/dotnet publish -o .blazekit/build/tmp ; /vercel/.dotnet/dotnet run ssg ; mkdir -p ../../.vercel/output/static ; cp -r .blazekit/build/ssg/. ../../.vercel/output/static",
"buildCommand": "chmod +x ./ssg.sh ; ./ssg.sh",
"installCommand": "chmod +x ./install.sh ; ./install.sh; export DOTNET_ROOT=$HOME/.dotnet ; export PATH=$PATH:$DOTNET_ROOT:$DOTNET_ROOT/tools ; /vercel/.dotnet/dotnet --version",
"outputDirectory": ".vercel/output/static",
"headers": [
Expand Down

0 comments on commit df459bc

Please sign in to comment.