{{.Data.Title}}
-{{.Data.Description}}
+{{.Data.Title}}
+{{.Data.Description}}
-+
-
diff --git a/docs/cmd/ssg.go b/docs/cmd/ssg.go index b4d9e5a..d847e35 100644 --- a/docs/cmd/ssg.go +++ b/docs/cmd/ssg.go @@ -6,77 +6,79 @@ import ( func main() { pager := pdocs.Pager("./docs/posts") - sitemap := []*pdocs.Sitemap{ - {Text: "Home", Href: "/", Page: pager("home.md")}, - {Text: "Sitemap", Href: "/sitemap", Page: pager("sitemap.md")}, - { - Text: "Getting Started", - Href: "/getting-started", - Page: pager("getting-started.md"), - Tag: "Help", - Children: []*pdocs.Sitemap{ - {Text: "Managed", Href: "#managed"}, - {Text: "DNS", Href: "#dns"}, - {Text: "Docker Compose", Href: "#docker-compose"}, - {Text: "Docker", Href: "#docker"}, - {Text: "Google Cloud Platform", Href: "#google-cloud-platform"}, - {Text: "Authentication", Href: "#authentication"}, + sitemap := &pdocs.Sitemap{ + Children: []*pdocs.Sitemap{ + {Text: "Home", Href: "/", Page: pager("home.md")}, + {Text: "Sitemap", Href: "/sitemap", Page: pager("sitemap.md")}, + { + Text: "Getting Started", + Href: "/getting-started", + Page: pager("getting-started.md"), + Tag: "Help", + Children: []*pdocs.Sitemap{ + {Text: "Managed", Href: "#managed"}, + {Text: "DNS", Href: "#dns"}, + {Text: "Docker Compose", Href: "#docker-compose"}, + {Text: "Docker", Href: "#docker"}, + {Text: "Google Cloud Platform", Href: "#google-cloud-platform"}, + {Text: "Authentication", Href: "#authentication"}, + }, }, - }, - { - Text: "How it Works", - Href: "/how-it-works", - Page: pager("how-it-works.md"), - Tag: "Help", - Children: []*pdocs.Sitemap{ - {Text: "Port Forward", Href: "#port-forward"}, - {Text: "Traditional VPN", Href: "#traditional-vpn"}, - {Text: "sish Public", Href: "#sish-public"}, - {Text: "sish Private", Href: "#sish-private"}, + { + Text: "How it Works", + Href: "/how-it-works", + Page: pager("how-it-works.md"), + Tag: "Help", + Children: []*pdocs.Sitemap{ + {Text: "Port Forward", Href: "#port-forward"}, + {Text: "Traditional VPN", Href: "#traditional-vpn"}, + {Text: "sish Public", Href: "#sish-public"}, + {Text: "sish Private", Href: "#sish-private"}, + }, }, - }, - { - Text: "Forwarding Types", - Href: "/forwarding-types", - Page: pager("forwarding-types.md"), - Tag: "Help", - Children: []*pdocs.Sitemap{ - {Text: "HTTP", Href: "#href"}, - {Text: "TCP", Href: "#tcp"}, - {Text: "TCP Alias", Href: "#tcp-alias"}, - {Text: "SNI", Href: "#sni"}, + { + Text: "Forwarding Types", + Href: "/forwarding-types", + Page: pager("forwarding-types.md"), + Tag: "Help", + Children: []*pdocs.Sitemap{ + {Text: "HTTP", Href: "#href"}, + {Text: "TCP", Href: "#tcp"}, + {Text: "TCP Alias", Href: "#tcp-alias"}, + {Text: "SNI", Href: "#sni"}, + }, }, - }, - { - Text: "Cheatsheet", - Href: "/cheatsheet", - Page: pager("cheatsheet.md"), - Tag: "Help", - Children: []*pdocs.Sitemap{ - {Text: "Remote forward SSH tunnels", Href: "#remote-forward-ssh-tunnels"}, - {Text: "Local forward SSH tunnels", Href: "#local-foward-ssh-tunnels"}, - {Text: "HTTPS public access", Href: "#https-public-access"}, - {Text: "HTTPS private access", Href: "#https-private-access"}, - {Text: "Websocket", Href: "#websocket"}, - {Text: "TCP public access", Href: "#tcp-public-access"}, - {Text: "TCP private access", Href: "#tcp-private-access"}, + { + Text: "Cheatsheet", + Href: "/cheatsheet", + Page: pager("cheatsheet.md"), + Tag: "Help", + Children: []*pdocs.Sitemap{ + {Text: "Remote forward SSH tunnels", Href: "#remote-forward-ssh-tunnels"}, + {Text: "Local forward SSH tunnels", Href: "#local-foward-ssh-tunnels"}, + {Text: "HTTPS public access", Href: "#https-public-access"}, + {Text: "HTTPS private access", Href: "#https-private-access"}, + {Text: "Websocket", Href: "#websocket"}, + {Text: "TCP public access", Href: "#tcp-public-access"}, + {Text: "TCP private access", Href: "#tcp-private-access"}, + }, }, - }, - {Text: "CLI", Href: "/cli", Page: pager("cli.md"), Tag: "CLI"}, - { - Text: "Advanced", - Href: "/advanced", - Page: pager("advanced.md"), - Children: []*pdocs.Sitemap{ - {Text: "Choose your own subdomain", Href: "#choose-your-own-subdomain"}, - {Text: "Websocket Support", Href: "#websocket-support"}, - {Text: "Allowlist IPs", Href: "#allowlist-ips"}, - {Text: "Custom Domains", Href: "#custom-domains"}, - {Text: "Load Balancing", Href: "#load-balancing"}, + {Text: "CLI", Href: "/cli", Page: pager("cli.md"), Tag: "CLI"}, + { + Text: "Advanced", + Href: "/advanced", + Page: pager("advanced.md"), + Children: []*pdocs.Sitemap{ + {Text: "Choose your own subdomain", Href: "#choose-your-own-subdomain"}, + {Text: "Websocket Support", Href: "#websocket-support"}, + {Text: "Allowlist IPs", Href: "#allowlist-ips"}, + {Text: "Custom Domains", Href: "#custom-domains"}, + {Text: "Load Balancing", Href: "#load-balancing"}, + }, + Tag: "Help", }, - Tag: "Help", + {Text: "FAQ", Href: "/faq", Page: pager("faq.md"), Tag: "Help"}, }, - {Text: "FAQ", Href: "/faq", Page: pager("faq.md"), Tag: "Help"}, } config := &pdocs.DocConfig{ diff --git a/docs/static/main.css b/docs/static/main.css index 1f12965..42374aa 100644 --- a/docs/static/main.css +++ b/docs/static/main.css @@ -1,5 +1,15 @@ .sitemap { - column-count: 2; + width: 150px; +} + +.post { + max-width: 700px; +} + +.post-container { + display: flex; + gap: 1rem; + flex-direction: row-reverse; } .hiw { @@ -88,3 +98,24 @@ .pager { min-width: 150px; } + +@media only screen and (max-width: 800px) { + body { + padding: 0 1rem; + } + + header { + margin: 0; + } + + .post-container { + display: block; + } + + .sitemap { + text-align: center; + -moz-column-count: 2; + column-count: 2; + width: 100%; + } +} diff --git a/docs/tmpl/base.layout.tmpl b/docs/tmpl/base.layout.tmpl index 41c1e2f..2c5837d 100644 --- a/docs/tmpl/base.layout.tmpl +++ b/docs/tmpl/base.layout.tmpl @@ -3,7 +3,7 @@