Skip to content

Commit

Permalink
Fix broken links
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaliumhexacyanoferrat committed Jun 25, 2024
1 parent d0dcc46 commit 811fa23
Show file tree
Hide file tree
Showing 42 changed files with 118 additions and 168 deletions.
12 changes: 6 additions & 6 deletions content/documentation/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ Project templates can be used to create apps for typical use cases with little e

To create a project by using the terminal, create a new folder for your app and use one of the following commands:

| Template | Command | Documentation |
|---|---|---|
| REST Webservice | `dotnet new genhttp-webservice` | [Webservices](./content/webservices) |
| REST Webservice (single file) | `dotnet new genhttp-webservice-minimal` | [Functional Handlers](./content/functional) |
| Website (Static HTML) | `dotnet new genhttp-website-static` | [Statics Websites](./content/static-websites) |
| Single Page Application (SPA) | `dotnet new genhttp-spa` | [Single Page Applications (SPA)](./content/single-page-applications) |
| Template | Command | Documentation |
|---|---|---------------------------------------------------------------------------------|
| REST Webservice | `dotnet new genhttp-webservice` | [Webservices](./content/frameworks/webservices) |
| REST Webservice (single file) | `dotnet new genhttp-webservice-minimal` | [Functional Handlers](./content/frameworks/functional) |
| Website (Static HTML) | `dotnet new genhttp-website-static` | [Statics Websites](./content/frameworks/static-websites) |
| Single Page Application (SPA) | `dotnet new genhttp-spa` | [Single Page Applications (SPA)](./content/frameworks/single-page-applications) |

After the project has been created, you can run it via `dotnet run` and access the server via http://localhost:8080.

Expand Down
6 changes: 3 additions & 3 deletions content/documentation/content/concepts/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ handlers.

{{< cards >}}

{{< card link="./concepts/definitions/" title="Method Definitions" >}}
{{< card link="./definitions/" title="Method Definitions" >}}

{{< card link="./concepts/resources/" title="Resources" >}}
{{< card link="./resources/" title="Resources" >}}

{{< card link="./concepts/caches/" title="Caches" >}}
{{< card link="./caches/" title="Caches" >}}

{{< /cards >}}
2 changes: 1 addition & 1 deletion content/documentation/content/concepts/caches.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ cascade:
type: docs
---

Caches can be used by handlers such as the [cached content](./server-caching) concern
Caches can be used by handlers such as the [cached content](../../concerns/server-caching) concern
to store and serve intermediate results for improved performance. The SDK ships with
backends for local memory and file system based storage. Custom backends can be
provided by implementing the [ICache](https://github.com/Kaliumhexacyanoferrat/GenHTTP/blob/master/API/Content/Caching/ICache.cs)
Expand Down
2 changes: 1 addition & 1 deletion content/documentation/content/concepts/definitions.md
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ for data structures, but also for special types such as streams.

Instead of generating a response you can also return an `IHandler` or `IHandlerBuilder` instance.
This allows you to provide a whole segment on your web application by re-using the
[existing handlers](../../handlers/) or by implementing [custom ones](../handlers/).
[existing handlers](../../handlers/) or by implementing [custom ones](../../handlers/).

The following example will render a fully navigable directory listing view depending on
the tenant ID passed to the method:
Expand Down
6 changes: 3 additions & 3 deletions content/documentation/content/concepts/resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ cascade:
---

Resources provide an unified way to load and access binary data used by handlers
to achieve their functionality. For example, the [Download](./downloads) handler
to achieve their functionality. For example, the [Download](../../handlers/downloads) handler
serves a single file on request - where the content of the file originates from
is not important for the handler to achieve it's functionality.

Expand All @@ -27,8 +27,8 @@ provide resources, for example a database or a cloud blob storage.
## Resource Trees

Similar to the resources, resource trees provide an abstraction for a directory
structure that can be consumed by handlers such as the [Directory Browsing](./listing)
or the [Single Page Application](./single-page-applications).
structure that can be consumed by handlers such as the [Directory Browsing](../../handlers/listing)
or the [Single Page Application](../../frameworks/single-page-applications).

```csharp
var tree = ResourceTree.FromDirectory("/var/www/downloads/"); // or FromAssembly, ...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ The `eTag` is generated from the [checksum of the content](https://github.com/Ka
that should be served to the client. Dependent on the kind of content (such as a local file resource)
the checksum can be calculated quite efficiently.

This concern is part of the [default configuration](./defaults) and will automatically
This concern is part of the [default configuration](../defaults) and will automatically
be added to your server.
2 changes: 1 addition & 1 deletion content/documentation/content/concerns/compression.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ var content = Layout.Create()
.Add(CompressedContent.Default());
```

This concern is part of the [default configuration](./defaults) and will automatically
This concern is part of the [default configuration](../defaults) and will automatically
be added.

## Custom Algorithms
Expand Down
2 changes: 1 addition & 1 deletion content/documentation/content/concerns/cors.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ cascade:

[Cross-Origin Resource Sharing](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) allows to control
which resources browsers are allowed to access and how they are allowed to do so. For example, if you would like
to access a [webservice](./webservices) from a [website](./websites) hosted on another domain, the browser will
to access a webservice from a website hosted on another domain, the browser will
send the `Origin` header along with requests to the webservice and analyze the response to determine, whether the server
allows clients to access the resource from this origin.

Expand Down
2 changes: 1 addition & 1 deletion content/documentation/content/concerns/defaults.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ cascade:

The `Defaults()` method provided by the [Practices](https://www.nuget.org/packages/GenHTTP.Modules.Practices/)
module adds some useful concerns to your web server to enable features such as
[compression](./compression) or [client side caching](./client-caching-validation).
[compression](../compression) or [client side caching](../client-caching-validation).
This way, you will have a well configured server instance without the need
of adding everything by yourself.

Expand Down
4 changes: 2 additions & 2 deletions content/documentation/content/concerns/range-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ needed by every web application, [range support](https://developer.mozilla.org/e
disabled by default.

To enable this feature on server level, you may pass an
additional flag to the [default configuration](./defaults).
additional flag to the [default configuration](../defaults).

```csharp
Host.Create()
Expand All @@ -26,7 +26,7 @@ to be requested (which would then result in a multipart response).

## Scope

As the range support is implemented as a [concern](../concepts/concerns.md), you
As the range support is implemented as a [concern](../), you
may add this functionality to any handler as needed.

```csharp
Expand Down
16 changes: 8 additions & 8 deletions content/documentation/content/concerns/server-caching.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ cascade:

This concern allows to cache responses generated by a handler and to
serve them from the cache when they are requested again. The following
example will cache all responses generated by a [website](./websites):
example will cache all responses generated by an API:

```csharp
var website = Website.Create()
.Content(...)
.Add(ServerCache.Memory());
var service = Layout.Create()
.Content(...)
.Add(ServerCache.Memory());

Host.Create()
.Handler(website)
.Handler(service)
.Console()
.Defaults()
.Run();
Expand All @@ -24,7 +24,7 @@ Host.Create()
## When to Cache

Caching usually introduces some overhead that might affect the performance
of your web application in a negative manner. A cache will boost the
of your application in a negative manner. A cache will boost the
performance of your application if the provided content does rarely change
and the generation of the content is expensive.

Expand All @@ -35,7 +35,7 @@ application instead.
## Backends

The server cache can utilize any backend provided by the
[cache infrastructure](./caches).
[cache infrastructure](../../concepts/caches).

```csharp
// uses RAM to cache generated responses
Expand Down Expand Up @@ -110,7 +110,7 @@ var cache = ServerCache.Create(meta, data);

## Pre-compress Content

Typically, the [compression](./compression) concern is added to
Typically, the [compression](../compression) concern is added to
dynamically compress the content which is generated by your
web application. If the content of your application is rather static,
you can use the server cache to compress the content once with
Expand Down
2 changes: 1 addition & 1 deletion content/documentation/content/handlers/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ cascade:
---

Handlers are responsible for analyzing HTTP requests and to serve responses to the connected client. All features
available in the SDK are either provided by handlers or [concerns](./concerns).
available in the SDK are either provided by handlers or [concerns](../concerns).

If you would like to add an additional feature that cannot be achieved using the existing
functionality to the SDK or your own web application, you may implement
Expand Down
2 changes: 1 addition & 1 deletion content/documentation/content/handlers/downloads.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cascade:
type: docs
---

Downloads allow to serve a single [Resource](./resources) with a fixed name to your clients. The content type
Downloads allow to serve a single [Resource](../../concepts/resources) with a fixed name to your clients. The content type
of the file will automatically be determined by it's extension.

```csharp
Expand Down
4 changes: 1 addition & 3 deletions content/documentation/content/handlers/listing.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ cascade:
---

The directory listing provider serves a simple web UI allowing users to browse directories
and files read from a [resource tree](../concepts/resources.md) below the specified path.
and files read from a [resource tree](../../concepts/resources) below the specified path.

```csharp
var tree = ResourceTree.FromDirectory("/var/www/documents/");
Expand All @@ -17,7 +17,5 @@ Host.Create()
```

In this example, the listing view will be available at http://localhost:8080/.
The generated view will be rendered using the template of the [Website](./websites)
the provider is embedded into (or the server theme by default).

![Directory listing served by the GenHTTP server](listing.png)
3 changes: 0 additions & 3 deletions content/documentation/content/handlers/redirects.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,3 @@ Host.Create()
In this example, accessing http://localhost:8080 will redirect the client to the
Google search engine. By default, the HTTP status 301 (permament redirect) will be sent, which
can get customized to a temporary HTTP 307 redirect.

If you would like to redirect the client to a resource that is hosted by your
application, you can also pass a symbolic route such as `{sitemap}` (see [routing](./websites#routing)).
9 changes: 2 additions & 7 deletions content/documentation/content/handlers/static-content.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cascade:
type: docs
---

To provide static resources required by your web application, add them to your project
To provide static resources required by your application, add them to your project
and mark them either as `Content` or as an `Embedded Resource`. To serve those files,
you can use the `Resources` factory class:

Expand All @@ -26,9 +26,4 @@ Host.Create()
```

For example, a stylesheet named `main.css` in the `styles` subfolder would be made available at
http://localhost:8080/res/styles/main.css. To generate a relative link to the file, use the routing
functionality from within your template:

```html
{{ route 'res/styles/main.css' }}
```
http://localhost:8080/res/styles/main.css.
12 changes: 6 additions & 6 deletions content/documentation/content/templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ be used from there to quickly create new projects:

The following templates are available to be used:

| Template | Description |
|------------------------------|------------- |
| `genhttp-webservice` | A project that will host a new [REST web service](./webservices). |
| `genhttp-webservice-minimal` | A project that will host a minimal web service in a single file using the [functional module](./functional). |
| `genhttp-website-static` | Serves a [static website](./static-websites) from the file system. |
| `genhttp-spa` | Serves the distribution files of a [Single Page Application (SPA)](./single-page-applications). |
| Template | Description |
|------------------------------|--------------------------------------------------------------------------------------------------------------------------|
| `genhttp-webservice` | A project that will host a new [REST web service](../frameworks/webservices). |
| `genhttp-webservice-minimal` | A project that will host a minimal web service in a single file using the [functional module](../frameworks/functional). |
| `genhttp-website-static` | Serves a [static website](../frameworks/static-websites) from the file system. |
| `genhttp-spa` | Serves the distribution files of a [Single Page Application (SPA)](../frameworks/single-page-applications). |

After creating the project, you can run it with `dotnet run` which make the application
available on [http://localhost:8080](http://localhost:8080).
Expand Down
2 changes: 1 addition & 1 deletion content/documentation/hosting/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ see their [Docker Hub](https://hub.docker.com/_/microsoft-dotnet-core-sdk/) page

## Building Template Apps

If you created your application using a [project template](../documentation/templates),
If you created your application using a [project template](../content/templates),
you will see that matching Docker files have already been created. Building and
running your app is as easy as:

Expand Down
4 changes: 2 additions & 2 deletions content/documentation/server/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ for service mocks in integration and component testing as well.

By default, the server will listen to all IP addresses on port 8080. These
settings can be adjusted [as needed](./endpoints). The `Defaults()` call adds
[typical features](/documentation/content/defaults) such as [compression](/documentation/content/compression)
and [client caching](/documentation/content/client-caching-validation).
[typical features](/documentation/content/concerns/defaults) such as [compression](/documentation/content/concerns/compression)
and [client caching](/documentation/content/concerns/client-caching-validation).

## Security

Expand Down
2 changes: 1 addition & 1 deletion public/documentation/content/concepts/caches/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -882,7 +882,7 @@

<div class="content">
<h1>Caches</h1>
<p>Caches can be used by handlers such as the <a href="./server-caching" >cached content</a> concern
<p>Caches can be used by handlers such as the <a href="../../concerns/server-caching" >cached content</a> concern
to store and serve intermediate results for improved performance. The SDK ships with
backends for local memory and file system based storage. Custom backends can be
provided by implementing the <a href="https://github.com/Kaliumhexacyanoferrat/GenHTTP/blob/master/API/Content/Caching/ICache.cs" target="_blank" rel="noopener">ICache</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2627,7 +2627,7 @@ <h3>Results<span class="hx-absolute -hx-mt-20" id="results"></span>
<h3>Handlers<span class="hx-absolute -hx-mt-20" id="handlers"></span>
<a href="#handlers" class="subheading-anchor" aria-label="Permalink for this section"></a></h3><p>Instead of generating a response you can also return an <code>IHandler</code> or <code>IHandlerBuilder</code> instance.
This allows you to provide a whole segment on your web application by re-using the
<a href="../../handlers/" >existing handlers</a> or by implementing <a href="../handlers/" >custom ones</a>.</p>
<a href="../../handlers/" >existing handlers</a> or by implementing <a href="../../handlers/" >custom ones</a>.</p>
<p>The following example will render a fully navigable directory listing view depending on
the tenant ID passed to the method:</p>
<div class="hx-mt-4 hx-flex hx-w-max hx-min-w-full hx-border-b hx-border-gray-200 hx-pb-px dark:hx-border-neutral-800"><button
Expand Down
6 changes: 3 additions & 3 deletions public/documentation/content/concepts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -898,15 +898,15 @@ <h2>Concepts<span class="hx-absolute -hx-mt-20" id="concepts"></span>
<a href="#concepts" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><div class="hextra-cards hx-mt-4 hx-gap-4 hx-grid not-prose" style="--hextra-cards-grid-cols: 3;">

<a
class="hextra-card hx-group hx-flex hx-flex-col hx-justify-start hx-overflow-hidden hx-rounded-lg hx-border hx-border-gray-200 hx-text-current hx-no-underline dark:hx-shadow-none hover:hx-shadow-gray-100 dark:hover:hx-shadow-none hx-shadow-gray-100 active:hx-shadow-sm active:hx-shadow-gray-200 hx-transition-all hx-duration-200 hover:hx-border-gray-300 hx-bg-transparent hx-shadow-sm dark:hx-border-neutral-800 hover:hx-bg-slate-50 hover:hx-shadow-md dark:hover:hx-border-neutral-700 dark:hover:hx-bg-neutral-900"href="./concepts/definitions/"
class="hextra-card hx-group hx-flex hx-flex-col hx-justify-start hx-overflow-hidden hx-rounded-lg hx-border hx-border-gray-200 hx-text-current hx-no-underline dark:hx-shadow-none hover:hx-shadow-gray-100 dark:hover:hx-shadow-none hx-shadow-gray-100 active:hx-shadow-sm active:hx-shadow-gray-200 hx-transition-all hx-duration-200 hover:hx-border-gray-300 hx-bg-transparent hx-shadow-sm dark:hx-border-neutral-800 hover:hx-bg-slate-50 hover:hx-shadow-md dark:hover:hx-border-neutral-700 dark:hover:hx-bg-neutral-900"href="./definitions/"
><span class="hextra-card-icon hx-flex hx-font-semibold hx-items-start hx-gap-2 hx-p-4 hx-text-gray-700 hover:hx-text-gray-900 dark:hx-text-neutral-200 dark:hover:hx-text-neutral-50">Method Definitions</span></a>

<a
class="hextra-card hx-group hx-flex hx-flex-col hx-justify-start hx-overflow-hidden hx-rounded-lg hx-border hx-border-gray-200 hx-text-current hx-no-underline dark:hx-shadow-none hover:hx-shadow-gray-100 dark:hover:hx-shadow-none hx-shadow-gray-100 active:hx-shadow-sm active:hx-shadow-gray-200 hx-transition-all hx-duration-200 hover:hx-border-gray-300 hx-bg-transparent hx-shadow-sm dark:hx-border-neutral-800 hover:hx-bg-slate-50 hover:hx-shadow-md dark:hover:hx-border-neutral-700 dark:hover:hx-bg-neutral-900"href="./concepts/resources/"
class="hextra-card hx-group hx-flex hx-flex-col hx-justify-start hx-overflow-hidden hx-rounded-lg hx-border hx-border-gray-200 hx-text-current hx-no-underline dark:hx-shadow-none hover:hx-shadow-gray-100 dark:hover:hx-shadow-none hx-shadow-gray-100 active:hx-shadow-sm active:hx-shadow-gray-200 hx-transition-all hx-duration-200 hover:hx-border-gray-300 hx-bg-transparent hx-shadow-sm dark:hx-border-neutral-800 hover:hx-bg-slate-50 hover:hx-shadow-md dark:hover:hx-border-neutral-700 dark:hover:hx-bg-neutral-900"href="./resources/"
><span class="hextra-card-icon hx-flex hx-font-semibold hx-items-start hx-gap-2 hx-p-4 hx-text-gray-700 hover:hx-text-gray-900 dark:hx-text-neutral-200 dark:hover:hx-text-neutral-50">Resources</span></a>

<a
class="hextra-card hx-group hx-flex hx-flex-col hx-justify-start hx-overflow-hidden hx-rounded-lg hx-border hx-border-gray-200 hx-text-current hx-no-underline dark:hx-shadow-none hover:hx-shadow-gray-100 dark:hover:hx-shadow-none hx-shadow-gray-100 active:hx-shadow-sm active:hx-shadow-gray-200 hx-transition-all hx-duration-200 hover:hx-border-gray-300 hx-bg-transparent hx-shadow-sm dark:hx-border-neutral-800 hover:hx-bg-slate-50 hover:hx-shadow-md dark:hover:hx-border-neutral-700 dark:hover:hx-bg-neutral-900"href="./concepts/caches/"
class="hextra-card hx-group hx-flex hx-flex-col hx-justify-start hx-overflow-hidden hx-rounded-lg hx-border hx-border-gray-200 hx-text-current hx-no-underline dark:hx-shadow-none hover:hx-shadow-gray-100 dark:hover:hx-shadow-none hx-shadow-gray-100 active:hx-shadow-sm active:hx-shadow-gray-200 hx-transition-all hx-duration-200 hover:hx-border-gray-300 hx-bg-transparent hx-shadow-sm dark:hx-border-neutral-800 hover:hx-bg-slate-50 hover:hx-shadow-md dark:hover:hx-border-neutral-700 dark:hover:hx-bg-neutral-900"href="./caches/"
><span class="hextra-card-icon hx-flex hx-font-semibold hx-items-start hx-gap-2 hx-p-4 hx-text-gray-700 hover:hx-text-gray-900 dark:hx-text-neutral-200 dark:hover:hx-text-neutral-50">Caches</span></a>

</div>
Expand Down
Loading

0 comments on commit 811fa23

Please sign in to comment.