Skip to content

Commit

Permalink
CI/CD for docs page
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianRappl committed Apr 3, 2024
1 parent 1d3c0e8 commit 183fb42
Show file tree
Hide file tree
Showing 14 changed files with 87 additions and 226 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Publish Documentation

on:
push:
branches: [main]

jobs:
build_app:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: "20.x"
registry-url: "https://registry.npmjs.org"
- name: Install gh-pages
run: |
npm install -g [email protected]
- name: Install Dependencies
run: |
cd docs
npm i
cd ..
- name: Build Page
run: |
cd docs
npm run build
echo "blazor.piral.io" > .vitepress/dist/CNAME
cd ..
- name: Deploy App Shell
run: |
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
gh-pages -d ".vitepress/dist/release" -u "github-actions-bot <[email protected]>"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- Fixed issue with broken assets
- Added `PiralOptions` to configure behavior
- Added `IsolatedAssemblies` option
- Added new documentation page (blazor.piral.io)

## 0.4.1 (February 16, 2024)

Expand Down
220 changes: 24 additions & 196 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,210 +2,41 @@ import { defineConfig } from "vitepress";
import type { DefaultTheme } from "vitepress";

const sidebars = (): DefaultTheme.SidebarItem[] => [
{
text: "Concepts",
collapsed: true,
items: [
{ text: "Motivation", link: "/concepts/motivation" },
{ text: "Routers", link: "/concepts/routers" },
{ text: "Benchmarks", link: "/concepts/benchmarks" },
{ text: "Web Standard", link: "/concepts/web-standard" },
{ text: "Middleware", link: "/concepts/middleware" },
{
text: "Developer Experience",
link: "/concepts/developer-experience.md",
},
{ text: "Hono Stacks", link: "/concepts/stacks" },
],
},
{
text: "Getting Started",
collapsed: true,
items: [
{ text: "Basic", link: "/getting-started/basic" },
{
text: "Cloudflare Workers",
link: "/getting-started/cloudflare-workers",
},
{ text: "Cloudflare Pages", link: "/getting-started/cloudflare-pages" },
{ text: "Deno", link: "/getting-started/deno" },
{ text: "Bun", link: "/getting-started/bun" },
{ text: "Fastly Compute", link: "/getting-started/fastly" },
{ text: "Vercel", link: "/getting-started/vercel" },
{ text: "Netlify", link: "/getting-started/netlify" },
{ text: "AWS Lambda", link: "/getting-started/aws-lambda" },
{ text: "Lambda@Edge", link: "/getting-started/lambda-edge" },
{
text: "Supabase Functions",
link: "/getting-started/supabase-functions",
},
{ text: "Node.js", link: "/getting-started/nodejs" },
],
},
{
text: "API",
collapsed: true,
items: [
{ text: "App", link: "/api/hono" },
{ text: "Routing", link: "/api/routing" },
{ text: "Context", link: "/api/context" },
{ text: "HonoRequest", link: "/api/request" },
{ text: "Exception", link: "/api/exception" },
{ text: "Presets", link: "/api/presets" },
{ text: "Basics", link: "/getting-started/" },
{ text: "Setup", link: "/getting-started/setup" },
],
},
{
text: "Guides",
collapsed: true,
items: [
{ text: "Middleware", link: "/guides/middleware" },
{ text: "Overview", link: "/guides/" },
{ text: "Helpers", link: "/guides/helpers" },
{
text: "JSX",
link: "/guides/jsx",
},
{
text: "Client Components",
link: "/guides/jsx-dom",
},
{ text: "Testing", link: "/guides/testing" },
{
text: "Validation",
link: "/guides/validation",
},
{
text: "RPC",
link: "/guides/rpc",
},
{
text: "Best Practices",
link: "/guides/best-practices",
},
{
text: "Examples",
link: "/guides/examples",
},
{
text: "Miscellaneous",
link: "/guides/others",
},
{
text: "FAQs",
link: "/guides/faq",
},
],
},
{
text: "Helpers",
collapsed: true,
items: [
{ text: "Accepts", link: "/helpers/accepts" },
{ text: "Adapter", link: "/helpers/adapter" },
{ text: "Cookie", link: "/helpers/cookie" },
{ text: "css", link: "/helpers/css" },
{ text: "Dev", link: "/helpers/dev" },
{ text: "Factory", link: "/helpers/factory" },
{ text: "html", link: "/helpers/html" },
{ text: "JWT", link: "/helpers/jwt" },
{ text: "SSG", link: "/helpers/ssg" },
{ text: "Streaming", link: "/helpers/streaming" },
{ text: "Testing", link: "/helpers/testing" },
{ text: "WebSocket", link: "/helpers/websocket" },
{ text: "FAQs", link: "/guides/faq" },
],
},
{
text: "Middleware",
text: "Examples",
collapsed: true,
items: [
{ text: "Basic Authentication", link: "/middleware/builtin/basic-auth" },
{
text: "Bearer Authentication",
link: "/middleware/builtin/bearer-auth",
},
{ text: "Body Limit", link: "/middleware/builtin/body-limit" },
{ text: "Cache", link: "/middleware/builtin/cache" },
{ text: "Compress", link: "/middleware/builtin/compress" },
{ text: "CORS", link: "/middleware/builtin/cors" },
{ text: "CSRF Protection", link: "/middleware/builtin/csrf" },
{ text: "ETag", link: "/middleware/builtin/etag" },
{ text: "JSX Renderer", link: "/middleware/builtin/jsx-renderer" },
{ text: "JWT", link: "/middleware/builtin/jwt" },
{ text: "Timing", link: "/middleware/builtin/timing" },
{ text: "Logger", link: "/middleware/builtin/logger" },
{ text: "Pretty JSON", link: "/middleware/builtin/pretty-json" },
{ text: "Secure Headers", link: "/middleware/builtin/secure-headers" },
{ text: "3rd-party Middleware", link: "/middleware/third-party" },
],
},
];

const sidebarsSnippets = (): DefaultTheme.SidebarItem[] => [
{
text: "Application",
items: [
{
text: "File upload",
link: "/snippets/file-upload",
},
{
text: "Error handling in Validator",
link: "/snippets/validator-error-handling",
},
{
text: "Grouping routes for RPC",
link: "/snippets/grouping-routes-rpc",
},
],
},
{
text: "3rd-party Middleware",
items: [
{
text: "Zod OpenAPI",
link: "/snippets/zod-openapi",
},
{
text: "Swagger UI",
link: "/snippets/swagger-ui",
},
],
},
{
text: "Ecosystem",
items: [
{
text: "Remix + Hono",
link: "/snippets/with-remix",
},
],
},
{
text: "Integration",
items: [
{
text: "Cloudflare Durable Objects",
link: "/snippets/cloudflare-durable-objects",
},
{
text: "Cloudflare Queue",
link: "/snippets/cloudflare-queue",
},
{
text: "htmx",
link: "/snippets/htmx",
},
{ text: "Introduction", link: "/examples/" },
],
},
];

export default defineConfig({
lang: "en-US",
title: "Hono",
title: "Piral.Blazor",
description:
"Ultrafast web framework for Cloudflare Workers, Fastly Compute, Deno, Bun, Vercel, Node.js, and others. Fast, but not only fast.",
"Piral.Blazor allows you to write distributed web applications using dotnet and Blazor.",
lastUpdated: true,
ignoreDeadLinks: true,
cleanUrls: true,

markdown: {
theme: {
light: "github-light",
Expand All @@ -214,54 +45,51 @@ export default defineConfig({
},
themeConfig: {
logo: "/images/logo-small.png",
siteTitle: "Hono",
algolia: {
appId: "1GIFSU1REV",
apiKey: "6a9bb2036e456356e224ece74546ca14",
indexName: "hono",
},
siteTitle: "Piral.Blazor",
socialLinks: [
{ icon: "github", link: "https://github.com/honojs" },
{ icon: "discord", link: "https://discord.gg/KMh2eNSdxV" },
{ icon: "x", link: "https://twitter.com/honojs" },
{
icon: "github",
link: "https://github.com/smapiot/Piral.Blazor.Server",
},
{ icon: "discord", link: "https://discord.gg/kKJ2FZmK8t" },
{ icon: "x", link: "https://twitter.com/cloudpiral" },
],
editLink: {
pattern: "https://github.com/honojs/website/edit/main/:path",
pattern: "https://github.com/smapiot/Piral.Blazor.Server/edit/main/:path",
text: "Edit this page on GitHub",
},
footer: {
message: "Released under the MIT License.",
copyright: "Copyright © 2020 - 2024 smapiot & contributors",
},
nav: [
{ text: "Docs", link: "/top" },
{ text: "Snippets", link: "/snippets/top" },
{ text: "Examples", link: "https://github.com/honojs/examples" },
{ text: "Docs", link: "/getting-started/" },
{ text: "Examples", link: "/examples/" },
{ text: "Imprint", link: "/imprint" },
],
sidebar: {
"/": sidebars(),
"/snippets/": sidebarsSnippets(),
},
},
head: [
[
"meta",
{
property: "og:image",
content: "https://hono.dev/images/hono-title.png",
content: "https://blazor.piral.io/images/og-title.png",
},
],
["meta", { property: "og:type", content: "website" }],
["meta", { property: "twitter:domain", content: "hono.dev" }],
["meta", { property: "twitter:domain", content: "blazor.piral.io" }],
[
"meta",
{
property: "twitter:image",
content: "https://hono.dev/images/hono-title.png",
content: "https://blazor.piral.io/images/og-title.png",
},
],
["meta", { property: "twitter:card", content: "summary_large_image" }],
["link", { rel: "shortcut icon", href: "/favicon.ico" }],
],
titleTemplate: ":title - Hono",
titleTemplate: ":title - Piral.Blazor",
});
1 change: 1 addition & 0 deletions docs/examples/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Examples
1 change: 1 addition & 0 deletions docs/getting-started/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Getting Started
1 change: 1 addition & 0 deletions docs/getting-started/setup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Setup
1 change: 1 addition & 0 deletions docs/guides/faq.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Frequently Asked Questions
1 change: 1 addition & 0 deletions docs/guides/helpers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Helpers
1 change: 1 addition & 0 deletions docs/guides/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Guides
Binary file added docs/images/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/logo-large.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/logo-small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 4 additions & 12 deletions docs/imprint.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,10 @@
---
title: "Imprint"
description: ""
summary: ""
date: 2024-02-16T17:19:07+02:00
lastmod: 2024-02-16T17:19:07+02:00
draft: false
type: "legal"
seo:
title: "" # custom title (optional)
description: "" # custom description (recommended)
canonical: "" # custom canonical URL (optional)
noindex: false # false (default) or true
title: Imprint
layout: home
---

# Imprint

Information provided according to sec. 5 German Telemedia Act (TMG):

smapiot GmbH<br>
Expand Down
Loading

0 comments on commit 183fb42

Please sign in to comment.