Skip to content

Commit 506a701

Browse files
committed
Updated to hextra theme for adding page index
1 parent 7fe6a7f commit 506a701

35 files changed

+103
-298
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ Clace is an open-source Apache-2.0 licensed project building a platform to easil
88

99
Documentation is hosted at [Clace](https://clace.io) using GitHub Pages.
1010

11-
The docs are generated using [Hugo](https://gohugo.io/) with the [Congo](https://jpanther.github.io/congo/) theme.
11+
The docs are generated using [Hugo](https://gohugo.io/) with the [Hextra](https://github.com/imfing/hextra) theme.
1212

1313
The icons are from [Tabler Icons](https://tabler-icons.io/).

assets/clace_icon.png

-8.7 KB
Binary file not shown.

assets/css/custom.css

+1-65
Original file line numberDiff line numberDiff line change
@@ -4,72 +4,8 @@ html {
44
font-family: 'Open Sans', sans-serif;
55
}
66

7-
body {
8-
padding-left: 10px;
9-
padding-right: 10px;
10-
}
11-
12-
h1 {
13-
color: #007700 !important;
14-
}
15-
16-
h2, h3, h4, h5, h6 {
7+
h1, h2, h3, h4, h5, h6 {
178
color: #00C200 !important;
189
}
1910

20-
.index-container {
21-
display: flex;
22-
flex-direction: column;
23-
}
24-
25-
/* Media query for larger screens */
26-
@media (min-width: 600px) {
27-
.index-container {
28-
flex-direction: row;
29-
flex-wrap: wrap;
30-
}
31-
32-
.index-item {
33-
width: 50%; /* Each item takes up 50% of the container width */
34-
margin-bottom: 0; /* Adjust as needed */
35-
36-
padding:1px 15px;
37-
text-align: justify;
38-
}
39-
}
40-
41-
.index-pre {
42-
max-width: 95%; /* Ensures the pre tag fits in its container */
43-
overflow-x: auto; /* Adds horizontal scrolling for overflow */
44-
white-space: pre-wrap; /* Allows long lines to wrap */
45-
word-wrap: break-word; /* Breaks long words if necessary */
46-
padding: 5px;
47-
}
48-
49-
@media (max-width: 600px) {
50-
.index-pre {
51-
font-size: smaller; /* Smaller font for small screens */
52-
}
53-
}
54-
55-
.index-code {
56-
border-radius: 5px; /* Rounded corners */
57-
font-family: 'Courier New', monospace; /* Monospaced font */
58-
}
59-
60-
.index-no-copy {
61-
user-select: none; /* Prevents text from being selected */
62-
color: #00C200;
63-
}
64-
65-
66-
/* Avoid backticks from showing for inline code https://github.com/jpanther/congo/discussions/798 */
67-
.prose :where(code):not(:where([class~="not-prose"], [class~="not-prose"] *))::before {
68-
content: "";
69-
}
70-
71-
.prose :where(code):not(:where([class~="not-prose"], [class~="not-prose"] *))::after {
72-
content: "";
73-
}
7411

75-
.max-w-prose { max-width:80ch !important; }

config/_default/config.toml

-13
This file was deleted.

config/_default/languages.en.toml

-31
This file was deleted.

config/_default/markup.toml

-13
This file was deleted.

config/_default/menus.en.toml

-57
This file was deleted.

config/_default/module.toml

-6
This file was deleted.

config/_default/params.toml

-76
This file was deleted.

content/_index.md

-9
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,6 @@ cascade:
66
invertPagination: true
77
---
88

9-
<div class="index-container">
10-
<div class="index-item"><span style="font-size:250%;"> {{< icon "brand-github" >}} </span><b>GitOps Workflow</b> - Staged deployments, versioning and preview environments with no infra to manage</div>
11-
<div class="index-item"><span style="font-size:250%"> {{< icon "binary-off" >}} </span><b>No build step</b> - Backend and frontend development with no build step, the source repo is the deployment artifact</div>
12-
<div class="index-item"><span style="font-size:250%"> {{< icon "brand-html5" >}} </span><b>Hypermedia web apps</b> - Fast and lightweight backend driven apps, minimal frontend complexity</div>
13-
<div class="index-item"><span style="font-size:250%"> {{< icon "brand-golang" >}} </span><b>Go binary, Starlark config</b> - Performance and stability of Go, easy Python like backend config with no dependencies</div>
14-
<div class="index-item"><span style="font-size:250%"> {{< icon "shield-lock" >}} </span><b>Secure app sandboxing</b> - Apps runs in security sandbox, apply app code updates confidently</div>
15-
<div class="index-item"><span style="font-size:250%"> {{< icon "database" >}} </span><b>SQLite data persistence</b> - Easy access to SQLite based app data persistence, with auto-schema management</div>
16-
</div>
17-
189
<h2>What is Clace?</h2>
1910

2011
Clace is an Apache-2.0 licensed project building a platform to develop and deploy web apps for internal tools. For running multiple web applications on a single machine, Clace provides functionality which usually requires stitching together multiple services: reverse proxy like nginx/caddy (for domain/path based routing, TLS certs, static file serving), application server like uwsgi/gunicorn with micro-framework like flask (for API handling) and deployment infrastructure like containers/VMs/k8s (for isolation across apps, versioning and staged deployments). For internal tool deployment, Clace provides similar functionality in a single lightweight binary, with gitops workflow out of the box.

content/docs/App/Routing/index.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ The fragments array in the html page definition defines the API interactions wit
5050
| handler | True | function | Inherited from page | The handler function to use for the route |
5151
| method | True | string | GET | The HTTP method type: GET,POST,PUT,DELETE etc, for example `ace.GET` |
5252

53-
{{< alert >}}
53+
{{<callout type="info" >}}
5454
**Note:** `partial` and `handler` are inherited from the page level, unless overridden for the fragment.
55-
{{< /alert >}}
55+
{{</callout>}}
5656

5757
For example, in this page definition
5858

@@ -136,9 +136,9 @@ The plugin is authorized to allow proxying to `https://www.google.com`. Any requ
136136

137137
If proxying is enabled for `/` route, then `/static` file serving is disabled for the app since requests to static path are also forwarded to the upstream service. `/static_root` serving is available and overrides the proxy config.
138138

139-
{{< alert >}}
139+
{{<callout type="info" >}}
140140
**Note:** If the upstream service service uses relative paths, then all requests are automatically proxied. If the service uses absolute paths, then it better that the app is installed at the root path, like `example.com:` instead of `example.com:/test`. If the service uses absolute path including the domain name, then the client will see the absolute path and those requests will not come through the proxy. The HTML body is not rewritten by Clace to rewrite path references. The upstream service needs to use relative paths to ensure that all requests come through Clace.
141-
{{< /alert >}}
141+
{{</callout>}}
142142

143143
## Request Flow
144144

content/docs/App/Templates/index.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ For example
3636

3737
checks if the "css/style.css" file is present and not empty. If so, it is linked using the `static` function, which returns a hashed file name which can be cached aggressively.
3838

39-
{{< alert >}}
39+
{{<callout type="info" >}}
4040
**Note:** The path passed to `static` and `fileNonEmpty` functions should not include static, it is automatically added. So use `{{ static "css/style.css" }}`, not `{{ static "static/css/style.css" }}`
41-
{{< /alert >}}
41+
{{</callout>}}
4242

4343
## Template File Location
4444

content/docs/Applications/Overview/index.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,8 @@ By default, apps are created with the system authentication type. System auth us
121121

122122
To change app to be un-authenticated, add `--auth-type none` to the `app create` command. After an app is created, the auth type can be changed by running `app update auth-type /myapp none`. OAuth based authentication is also supported, see [authentication]({{< ref "docs/configuration/authentication" >}}) for details.
123123

124-
{{< alert >}}
124+
{{<callout type="info" >}}
125125
**Note:** Changes done to the app settings using the `app update` command are not staged or versioned, they apply immediately to the stage/prod/preview apps. App settings are fundamental properties of the app, like what authentication type to use, what git auth key to use etc.
126126

127127
All other changes done to app metadata (like account linking, permission approval and code reload) are staged before deployment. Use the `--promote` option to promote the change after applying it on the staging app. When a promotion is done, all previously staged changes for that app are promoted, not just the most recent change.
128-
{{< /alert >}}
128+
{{</callout>}}

content/docs/Configuration/authentication/index.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ The config details depend on the provider type. The `key` is generally the Clien
7474

7575
For all the providers, an optional `scopes` property is also supported. This is the list of scopes to configure for the OAuth account.
7676

77-
{{< alert >}}
77+
{{<callout type="info" >}}
7878
**Note:** The first time a new provider is added, it is important to manually verify an app, to verify if the required authentication restrictions are in place. For example, with google, any valid google user can login, including gmail.com accounts. The `hosted_domain` config has to be used to restrict this.
79-
{{< /alert >}}
79+
{{</callout>}}
8080

8181
The OAuth integration internally uses the [goth](https://github.com/markbates/goth) library, see [examples](https://github.com/markbates/goth/blob/master/examples/main.go) for a sample implementation.

content/docs/Configuration/networking/index.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ storage_location = "$CL_HOME/run/certmagic" # where to cache dynamically created
3636

3737
Port 0 means bind to any available port. Port -1 means disable HTTPS access.
3838

39-
{{< alert >}}
39+
{{<callout type="info" >}}
4040
Using the HTTPS port is recommended even for the local environment. HTTP/2 works with HTTPS only. Server Sent Events (SSE) are used by Clace for live reload of dev apps, [SSE works best with HTTP/2](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#listening_for_custom_events). Without HTTP/2, there can be connection limit issues with HTTP causing connections from browser to Clace server to hang.
41-
{{< /alert >}}
41+
{{</callout>}}
4242

4343
## TLS Certificates
4444

content/docs/Plugins/Details/index.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@ The response for the API (`value` within `plugin_response`) is of type list of s
8282
# Process lines
8383
```
8484

85-
{{< alert >}}
85+
{{<callout type="info" >}}
8686
**Note:** Only first 100MB of the command stdout output is scanned currently, the rest is discarded.
87-
{{< /alert >}}
87+
{{</callout>}}
8888

8989
## FS Plugin
9090

content/docs/Plugins/Overview/index.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,9 @@ if not error:
149149
return ace.response(ret, "error.go.html")
150150
```
151151

152-
{{< alert >}}
152+
{{<callout type="info" >}}
153153
**Note:** The automatic error handling is very useful, but is needs to be enabled manually. When developing a new app, first define the `error_handler` and test it for the partial and full page scenarios. After that, all the subsequent handler code does not have to handle errors unless specific handling is required.
154-
{{< /alert >}}
154+
{{</callout>}}
155155

156156
## Plugin Accounts
157157

0 commit comments

Comments
 (0)