From d468cd01fa758a8d1205590ece3efdcf8fe2a89d Mon Sep 17 00:00:00 2001 From: valdis iljuconoks Date: Mon, 12 Sep 2022 12:33:53 +0300 Subject: [PATCH] Closes #11 --- README.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6ae3f86..91f9390 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,9 @@ See the [editor guide](docs/editor-guide.md) for more information. Start by installing NuGet package (use [Optimizely NuGet](https://nuget.optimizely.com/)): - dotnet add package Geta.Optimizely.Tags +``` +dotnet add package Geta.Optimizely.Tags +``` Geta Tags library uses [tag-it](https://github.com/aehlke/tag-it) jQuery UI plugin for selecting tags. To add Tags as a new property to your page types, you need to use the UIHint attribute like in this example: @@ -52,7 +54,16 @@ Then, call `UseGetaTags` in the `Configure` method: app.UseGetaTags(); ``` -Use ITagEngine to query for data: +Also, you have to add Razor pages routing support. + +```csharp +app.UseEndpoints(endpoints => +{ + endpoints.MapRazorPages(); +}); +``` + +Use `ITagEngine` to query for data: ```csharp IEnumerable GetContentByTag(string tagName);