-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Update project documentation and assets
Updated the project's documentation to reflect changes in the application's name, URLs, and descriptions. Added new image assets for logos. Created a .gitignore file to exclude unnecessary files from version control.
- Loading branch information
Showing
27 changed files
with
7,844 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
.DS_Store | ||
node_modules | ||
dist | ||
tmp | ||
|
||
# Generated files by hugo | ||
/public/ | ||
/resources/_gen/ | ||
/assets/jsconfig.json | ||
|
||
# Executable may be added to repository | ||
hugo.exe | ||
hugo.darwin | ||
hugo.linux | ||
|
||
# Temporary lock file while building | ||
/.hugo_build.lock | ||
|
||
!hugo_stats.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,43 @@ | ||
# SpiceDb.docs | ||
# SpiceDb Documentation | ||
|
||
Welcome to the documentation for SpiceDb - Seamlessly blend the power of Razor Components with Asp.net and HTMX. | ||
|
||
<img src="https://jalexsocial.github.io/spicedb.docs/images/SpiceDb-logo.png" height="160px"/> | ||
|
||
## Documentation Site | ||
|
||
For detailed documentation and examples, please visit the [SpiceDb Documentation Site](https://jalexsocial.github.io/spicedb.docs/). | ||
|
||
## Introduction | ||
|
||
SpiceDb is a lightweight library that enhances Asp.net MVC applications by seamlessly integrating Razor components for UI development and working harmoniously with HTMX for progressive enhancement. With SpiceDb, you can leverage the power of Razor components to create dynamic and interactive user interfaces while ensuring a smooth user experience through HTMX. | ||
|
||
### Why SpiceDb? | ||
|
||
SpiceDb combines the strengths of Razor Components with the seamless integration of HTMX, offering a powerful solution for Asp.net MVC developers looking to enhance their applications with modern UI development practices. | ||
|
||
## Features | ||
|
||
- **Razor Component Integration:** Easily use Razor components within your Asp.net MVC views, enhancing the modularity and maintainability of your UI code. | ||
|
||
- **HTMX Compatibility:** SpiceDb works effortlessly with HTMX, enabling progressive enhancement for your MVC applications. Make your web pages dynamic and interactive without compromising on performance. | ||
|
||
- **Simplified Syntax:** SpiceDb simplifies the integration process, allowing developers to seamlessly blend Razor components and HTMX features into their existing MVC projects. | ||
|
||
- **Efficient Development:** Leverage the benefits of Razor Components for efficient and structured UI development, resulting in more maintainable and scalable applications. | ||
|
||
## How to Contribute | ||
|
||
We welcome contributions to the SpiceDb project. If you'd like to get involved, please check out the following resources: | ||
|
||
- [Doks Documentation](https://getdoks.org/docs/start-here/getting-started/): Doks is the main documentation theme used in this project. | ||
|
||
- [Hyas Documentation](https://docs.gethyas.com/getting-started/): Hyas is the documentation framework for Doks. | ||
|
||
- [Hugo Documentation](https://gohugo.io/documentation/): Hugo is the generator for static sites and powers our documentation site. | ||
|
||
## License | ||
|
||
Copyright © 2024 Michael Tanczos | ||
|
||
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# Overrides for production environment | ||
baseurl = "https://jalexsocial.github.io/SpiceDb.docs/" | ||
baseurl = "https://jalexsocial.github.io/spicedb.docs/" | ||
canonifyURLs = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
--- | ||
title : "Welcome to Doks" | ||
title : "SpiceDb" | ||
description: "" | ||
lead: "Congrats on setting up a new Doks project!" | ||
lead: "SpiceDb C# client documentation" | ||
date: 2023-09-07T16:33:54+02:00 | ||
lastmod: 2023-09-07T16:33:54+02:00 | ||
draft: false | ||
seo: | ||
title: "Welcome to Doks" # custom title (optional) | ||
title: "SpiceDb Documentation" # custom title (optional) | ||
description: "" # custom description (recommended) | ||
canonical: "" # custom canonical URL (optional) | ||
noindex: false # false (default) or true | ||
--- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
--- | ||
title: "Getting Started" | ||
description: "How to get started with SpiceDb." | ||
summary: "" | ||
date: 2023-09-07T16:04:48+02:00 | ||
lastmod: 2023-09-07T16:04:48+02:00 | ||
draft: false | ||
menu: | ||
docs: | ||
parent: "" | ||
identifier: "example-6a1a6be4373e933280d78ea53de6158e" | ||
weight: 810 | ||
toc: true | ||
seo: | ||
title: "" # custom title (optional) | ||
description: "" # custom description (recommended) | ||
canonical: "" # custom canonical URL (optional) | ||
noindex: false # false (default) or true | ||
--- | ||
|
||
# SpiceDb Library Usage Guide for ASP.NET | ||
|
||
This README provides instructions on how to incorporate the SpiceDb library into your ASP.NET projects. SpiceDb leverages .NET 8 capabilities to enhance your web application development process, particularly focusing on HTMX integration. | ||
|
||
## Requirements | ||
|
||
- **.NET Version**: .NET 8 or newer. | ||
|
||
## Installation | ||
|
||
SpiceDb is available as a NuGet package. You can install it using the .NET CLI with the following command: | ||
|
||
```sh | ||
dotnet add package SpiceDb | ||
``` | ||
|
||
For the latest version and more details, visit the [SpiceDb NuGet package page](https://www.nuget.org/packages/SpiceDb). | ||
|
||
## Configuration | ||
|
||
After installing SpiceDb, you need to configure it in your `Program.cs` or startup configuration file. This setup involves specifying your application's root component, default layout, antiforgery strategy, and HTMX configurations. Here's how to add SpiceDb to your application builder: | ||
|
||
```csharp | ||
builder.AddSpiceDb(config => | ||
{ | ||
config.RootComponent = typeof(HtmxApp<AppLayout>); | ||
config.DefaultLayout = typeof(HtmxLayout<MainLayout>); | ||
config.AntiforgeryStrategy = AntiforgeryStrategy.GenerateTokensPerPage; | ||
}) | ||
.WithHtmxConfiguration(config => | ||
{ | ||
config.SelfRequestsOnly = true; | ||
}) | ||
.WithHtmxConfiguration("articles", config => | ||
{ | ||
config.SelfRequestsOnly = true; | ||
config.GlobalViewTransitions = true; | ||
}); | ||
``` | ||
|
||
### Configuration Details | ||
|
||
- **RootComponent**: Defines the default root component for your component hierarchy. Wrapping a Layout in `HtmxApp` ensures that when a page is rendered with HTMX, it won't render the Layout. | ||
- **DefaultLayout**: Applied to any view that doesn't specifically specify a Layout attribute. | ||
- **AntiforgeryStrategy**: Configures antiforgery tokens behavior. Options include turning off antiforgery tokens, generating them on each request, or generating them on each full-page reload. | ||
|
||
### HTMX Configuration | ||
|
||
`WithHtmxConfiguration` allows setting up HTMX-specific settings, supporting both default and named configurations. In this example we configure: | ||
|
||
- **SelfRequestsOnly**: Restricts HTMX requests to the same origin. | ||
- **GlobalViewTransitions**: Enables global view transitions for the specified named configuration. | ||
|
||
Multiple configurations can be defined for different parts of your application, offering granular control over HTMX behavior. | ||
|
||
For more detailed information on configuring HTMX in SpiceDb, refer to the [Htmx Configuration Documentation](https://jalexsocial.github.io/SpiceDb.docs/docs/htmx/configuration/). | ||
|
||
## Middleware | ||
|
||
After configuring antiforgery and routing in your application, ensure to add the SpiceDb middleware to the pipeline: | ||
|
||
```csharp | ||
app.UseSpiceDb(); | ||
``` | ||
|
||
This middleware integrates SpiceDb's capabilities into your application, enabling advanced features and configurations specified in your setup. | ||
|
||
## Conclusion | ||
|
||
SpiceDb offers a powerful and flexible way to enhance your ASP.NET applications with advanced HTMX integration and configuration options. By following the setup instructions outlined above, you can leverage SpiceDb to create dynamic, interactive web applications using the latest .NET technologies. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
title: "Introduction" | ||
description: "" | ||
summary: "" | ||
date: 2024-02-05T12:24:52-05:00 | ||
lastmod: 2024-02-05T12:24:52-05:00 | ||
draft: false | ||
menu: | ||
docs: | ||
parent: "" | ||
identifier: "introduction-b91285bb4e8a204de334cc90481a3f4e" | ||
weight: 50 | ||
toc: true | ||
seo: | ||
title: "" # custom title (optional) | ||
description: "" # custom description (recommended) | ||
canonical: "" # custom canonical URL (optional) | ||
noindex: false # false (default) or true | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
--- | ||
title: "Getting Started" | ||
description: "" | ||
summary: "" | ||
date: 2024-02-05T12:07:02-05:00 | ||
lastmod: 2024-02-05T12:07:02-05:00 | ||
draft: false | ||
menu: | ||
docs: | ||
parent: "" | ||
identifier: "getting-started-b61c1d09773be2e6c7aa6e8dbfc38058" | ||
weight: 999 | ||
toc: true | ||
seo: | ||
title: "" # custom title (optional) | ||
description: "" # custom description (recommended) | ||
canonical: "" # custom canonical URL (optional) | ||
noindex: false # false (default) or true | ||
--- | ||
|
||
This README provides instructions on how to incorporate the SpiceDb library into your ASP.NET projects. SpiceDb leverages .NET 8 capabilities to enhance your web application development process, particularly focusing on HTMX integration. | ||
|
||
## Requirements | ||
|
||
- **.NET Version**: .NET 8 or newer. | ||
|
||
## Installation | ||
|
||
SpiceDb is available as a NuGet package. You can install it using the .NET CLI with the following command: | ||
|
||
```sh | ||
dotnet add package SpiceDb | ||
``` | ||
|
||
For the latest version and more details, visit the [SpiceDb NuGet package page](https://www.nuget.org/packages/SpiceDb). | ||
|
||
## Configuration | ||
|
||
After installing SpiceDb, you need to configure it in your `Program.cs` or startup configuration file. This setup involves specifying your application's root component, default layout, antiforgery strategy, and HTMX configurations. Here's how to add SpiceDb to your application builder: | ||
|
||
```csharp | ||
builder.AddSpiceDb(config => | ||
{ | ||
config.RootComponent = typeof(HtmxApp<AppLayout>); | ||
config.DefaultLayout = typeof(HtmxLayout<MainLayout>); | ||
config.AntiforgeryStrategy = AntiforgeryStrategy.GenerateTokensPerPage; | ||
}) | ||
.WithHtmxConfiguration(config => | ||
{ | ||
config.SelfRequestsOnly = true; | ||
}) | ||
.WithHtmxConfiguration("articles", config => | ||
{ | ||
config.SelfRequestsOnly = true; | ||
config.GlobalViewTransitions = true; | ||
}); | ||
``` | ||
|
||
### Configuration Details | ||
|
||
- **RootComponent**: Defines the default root component for your component hierarchy. Wrapping a Layout in `HtmxApp` ensures that when a page is rendered with HTMX, it won't render the Layout. | ||
- **DefaultLayout**: Applied to any view that doesn't specifically specify a Layout attribute. | ||
- **AntiforgeryStrategy**: Configures antiforgery tokens behavior. Options include turning off antiforgery tokens, generating them on each request, or generating them on each full-page reload. | ||
|
||
### HTMX Configuration | ||
|
||
`WithHtmxConfiguration` allows setting up HTMX-specific settings, supporting both default and named configurations. In this example we configure: | ||
|
||
- **SelfRequestsOnly**: Restricts HTMX requests to the same origin. | ||
- **GlobalViewTransitions**: Enables global view transitions for the specified named configuration. | ||
|
||
Multiple configurations can be defined for different parts of your application, offering granular control over HTMX behavior. | ||
|
||
For more detailed information on configuring HTMX in SpiceDb, refer to the [Htmx Configuration Documentation](https://jalexsocial.github.io/SpiceDb.docs/docs/htmx/configuration/). | ||
|
||
## Middleware | ||
|
||
After configuring antiforgery and routing in your application, ensure to add the SpiceDb middleware to the pipeline: | ||
|
||
```csharp | ||
app.UseSpiceDb(); | ||
``` | ||
|
||
This middleware integrates SpiceDb's capabilities into your application, enabling advanced features and configurations specified in your setup. | ||
|
||
## Conclusion | ||
|
||
SpiceDb offers a powerful and flexible way to enhance your ASP.NET applications with advanced HTMX integration and configuration options. |
Oops, something went wrong.