Skip to content

Commit

Permalink
feat: Update project documentation and assets
Browse files Browse the repository at this point in the history
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
tanczosm committed Apr 12, 2024
1 parent f590166 commit e73a2be
Show file tree
Hide file tree
Showing 27 changed files with 7,844 additions and 48 deletions.
19 changes: 19 additions & 0 deletions .gitignore
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
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2020-2024 Hyas
Copyright (c) 2024 Michael Tanczos

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
44 changes: 43 additions & 1 deletion README.md
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.
Binary file added assets/images/rizzy-logo.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 assets/images/rizzy.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 assets/images/spicedb-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions config/_default/hugo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
title = "Rizzy Documentation"
baseurl = "https://jalexsocial.github.io/SpiceDb.docs/"
title = "SpiceDb Documentation"
baseurl = "https://jalexsocial.github.io/spicedb.docs/"
canonifyURLs = true
disableAliases = true
disableHugoGeneratorInject = true
Expand Down
10 changes: 5 additions & 5 deletions config/_default/menus/menus.en.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,23 @@
name = "Lorem"
weight = 10
identifier = "lorem"
url = "/rizzy.docs/guide/lorem/"
url = "/SpiceDb.docs/guide/lorem/"

[[tutorial]]
name = "Lorem"
weight = 10
identifier = "lorem"
url = "/rizzy.docs/tutorial/lorem/"
url = "/SpiceDb.docs/tutorial/lorem/"

[[main]]
name = "Docs"
url = "/rizzy.docs/docs/introduction/overview/"
url = "/SpiceDb.docs/docs/introduction/overview/"
# url = "/docs/1.0/prologue/introduction/"
weight = 10

[[main]]
name = "Blog"
url = "/rizzy.docs/blog/"
url = "/SpiceDb.docs/blog/"
weight = 30

# [[social]]
Expand All @@ -54,7 +54,7 @@
[[social]]
name = "GitHub"
pre = '<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-github" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5"></path></svg>'
url = "https://github.com/JalexSocial/Rizzy"
url = "https://github.com/JalexSocial/SpiceDb"
post = "v0.1.0"
weight = 30

Expand Down
10 changes: 5 additions & 5 deletions config/_default/params.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Hugo
title = "Rizzy Documentation"
description = "Rizzy MVC: Seamlessly blend the power of Razor Components with Asp.net and HTMX"
title = "SpiceDb Documentation"
description = "SpiceDb MVC: Seamlessly blend the power of Razor Components with Asp.net and HTMX"
images = ["cover.png"]

# mainSections
Expand Down Expand Up @@ -74,7 +74,7 @@ mainSections = ["docs"]
editPage = true # false (default) or true
lastMod = false # false (default) or true
repoHost = "GitHub" # GitHub (default), Gitea, GitLab, Bitbucket, or BitbucketServer
docsRepo = "https://github.com/jalexsocial/rizzy.docs/"
docsRepo = "https://github.com/jalexsocial/spicedb.docs/"
docsRepoBranch = "main" # main (default), master, or <branch name>
docsRepoSubPath = "" # "" (none, default) or <sub path>

Expand Down Expand Up @@ -129,8 +129,8 @@ mainSections = ["docs"]
[seo.schemas]
type = "Organization" # Organization (default) or Person
logo = "favicon-512x512.png" # Logo of Organization — favicon-512x512.png (default)
name = "Rizzy" # Name of Organization or Person
sameAs = [] # E.g. ["https://github.com/jalexsocial/rizzy.docs/", "https://github.com/jalexsocial/Rizzy/"]
name = "SpiceDb" # Name of Organization or Person
sameAs = [] # E.g. ["https://github.com/jalexsocial/spicedb.docs/", "https://github.com/jalexsocial/SpiceDb/"]
images = ["cover.png"] # ["cover.png"] (default)
article = [] # Article sections
newsArticle = [] # NewsArticle sections
Expand Down
2 changes: 1 addition & 1 deletion config/production/hugo.toml
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
7 changes: 4 additions & 3 deletions content/_index.md
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
---

12 changes: 4 additions & 8 deletions content/blog/example/index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Example Post"
description: "Just an example post."
summary: "You can use blog posts for announcing product updates and features."
title: "Welcome to SpiceDb C# Client"
description: "We are just getting started."
summary: ""
date: 2023-09-07T16:27:22+02:00
lastmod: 2023-09-07T16:27:22+02:00
draft: false
Expand All @@ -18,8 +18,4 @@ seo:
noindex: false # false (default) or true
---

Well-thought-through product announcements will help increase feature awareness and engage users with new functionality. Just like [sharing your public roadmap](https://canny.io/blog/should-you-have-a-public-roadmap/), it's also a great way to let potential customers see that you're constantly improving.

## Further reading

- Read [How to announce product updates and features](https://canny.io/blog/announce-product-updates-features/)
## More to come
90 changes: 90 additions & 0 deletions content/docs/guides/started.md
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.
19 changes: 19 additions & 0 deletions content/docs/introduction/_index.md
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
---
88 changes: 88 additions & 0 deletions content/docs/introduction/getting-started.md
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.
Loading

0 comments on commit e73a2be

Please sign in to comment.