Tavenem.Wiki
0.26.8-preview
Prefix Reserved
See the version list below for details.
dotnet add package Tavenem.Wiki --version 0.26.8-preview
NuGet\Install-Package Tavenem.Wiki -Version 0.26.8-preview
<PackageReference Include="Tavenem.Wiki" Version="0.26.8-preview" />
paket add Tavenem.Wiki --version 0.26.8-preview
#r "nuget: Tavenem.Wiki, 0.26.8-preview"
// Install Tavenem.Wiki as a Cake Addin #addin nuget:?package=Tavenem.Wiki&version=0.26.8-preview&prerelease // Install Tavenem.Wiki as a Cake Tool #tool nuget:?package=Tavenem.Wiki&version=0.26.8-preview&prerelease
Tavenem.Wiki
Tavenem.Wiki is a .NET wiki library.
Unlike many wiki software packages, this main library is implementation-agnostic. It provides a set of core features which can be used to build a web-based wiki, a desktop application, a distributed cloud app with native clients, or any other architecture desired.
Installation
Tavenem.Wiki is available as a NuGet package.
Configuration
The WikiOptions
object is used to control the behavior of the wiki. It is expected as a parameter
to various methods, and in most implementations is expected to be provided by dependency injection
after being configured during initialization.
Most of the properties of this class are not expected to change once a wiki has gone into operation. Doing so can cause existing wiki pages to become inaccessible, or to be formatted incorrectly.
AboutPageTitle
*: The title of the main about page. Default is "About".CategoriesTitle
: The name of the article on categories in the main wiki. Default is "Categories".CategoryNamespace
: The name of the categories namespace. Default is "Category".ContactPageTitle
*: The title of the main contact page. Default is "Contact".ContentsPageTitle
*: The title of the main contents page. Default is "Contents".CopyrightPageTitle
*: The title of the main copyright page. Default is "Copyright".CustomAdminNamespaces
: An optional collection of namespaces which may not be assigned to pages by non-admin users.The
AdminNamespaces
read-only property may be used to get the full list, which includes the namespace assigned toSystemNamespace
automatically.CustomReservedNamespaces
: An optional collection of namespaces which may not be assigned to pages by users.The
ReservedNamespaces
read-only property may be used to get the full list, which includes the namespace assigned toFileNamespace
automatically.DefaultAnonymousPermission
: The default permission granted to an anonymous user for wiki content with no configured access control.This defaults to
Read
, which allows anonymous users to view any content for which no specific access has been configured. It can be set toNone
to disable anonymous browsing, and require all users to sign in prior to viewing any content.Note that anonymous users cannot make any changes regardless of this setting. A specific editor is required for all content creation and revision.
DefaultRegisteredPermission
: The default permission granted to a registered user for wiki content with no configured access control.This defaults to
All
, which allows registered users full access when no specific access controls take precedence.DefaultTableOfContentsDepth
: The default number of levels of nesting shown in an article's table of contents. Can be overridden by specifying the level for a given article. Default is 3.DefaultTableOfContentsTitle
: The default title of tables of contents. Default is "Contents".FileNamespace
: The name of the file namespace. Default is "File".GetDomainPermission
: When a user attempts to interact with an article in a domain (including viewing, creating, editing, or deleting items), this function is invoked (if provided) to determine the permissions the user has for that domain.Receives the user's ID and the name of the domain as parameters, and should return a
WikiPermission
enum value.GroupNamespace
: The name of the user group namespace. Default is "Group".HelpPageTitle
*: The title of the main help page. Default is "Help".LinkTemplate
: A string added to all wiki links, if non-empty. The string '{LINK}', if included, will be replaced by the full article title being linked.MainPageTitle
: The title of the main page for any namespace (shown when no article title is explicitly requested). If omitted "Main" will be used.MaxFileSize
: The maximum size (in bytes) of uploaded files. Default is 5,000,000 (5 MB).Setting this to a value less than or equal to zero effectively prevents file uploads.
MaxFileSizeString
: Read-only. Gets a string representing theMaxFileSize
in a reasonable unit (GB for large sizes, down to bytes for small ones).MinimumTableOfContentsHeadings
: The minimum number of headings required in an article to display a table of contents by default. Can be overridden by specifying the location of a table of contents explicitly for a given article. Default is 3.OnCreated
: An optional callback invoked when a new article (including categories and files) is created.Receives the new article as a parameter.
OnDeleted
: An optional callback invoked when an article (including categories and files) is deleted.Receives the deleted article, the original owner, and the new owner as parameters.
OnEdited
: An optional callback invoked when an article (including categories and files) is edited (not including deletion ifOnDeleted
is provided).Receives the deleted article, the revision which was applied, the original owner, and the new owner as parameters.
PolicyPageTitle
*: The title of the main policy page. Default is "Policies".Postprocessors
: A collection of preprocessors which transform the HTML of an article after it is parsed from markdown but before it is sanitized.Processors are run in the order they are added to the collection.
ScriptNamespace
: The name of the script namespace. Default is "Script".SiteName
: The name of the wiki. Displayed as a subheading below each article title. Default is "a NeverFoundry wiki".SystemNamespace
: The name of the system namespace. Default is "System".TransclusionNamespace
: The name of the transclusion namespace. Default is "Transclusion".When a transclusion omits the namespace, this namespace is assumed. To transclude a page from the default (empty) namespace, a transclusion may use a single hyphen as the namespace. The hyphen will be replaced during transclusion by the empty namespace. If your wiki actually has a namespace that uses a single hyphen as its name, pages may be transcluded from it by escaping the hyphen with a backslash character: '
\-
'.UserNamespace
: The name of the user namespace. Default is "User".UserDomains
: If set totrue
each user (and only that user) is automatically granted full permission in a domain with the same name as their user ID. TheGetDomainPermission
function, theWikiUser.AllowedViewDomains
property, and theWikiGroup.AllowedViewDomains
property will still be checked for other users attempting to access content in such domains, but the user with the matching ID will always be granted all permissions automatically. A possible use for user domains is as a "scratch-pad" area where articles can be drafted and tested prior to publication.WikiLinkPrefix
: A prefix added before wiki links (to distinguish them from other pages on the same server). Default is "Wiki".May be set to
null
or an emptystring
, which omits any prefix from generated URLs.
*This property may be set to null
or an empty string
to disable the associated wiki page.
The associated page is expected in the system namespace, and is not expected to be in a domain
Markup
The Tavenem Wiki syntax is a custom flavor of markdown. It implements all the features of CommonMark, as well as many others. The implementation uses Markdig, and details of most extensions to standard CommonMark can be found on its GitHub page.
Roadmap
Tavenem.Wiki is currently in a prerelease state. Development is ongoing, and breaking changes are possible before the first production release.
No release date is currently set for v1.0 of Tavenem.Wiki. The project is currently in a "wait and see" phase while Tavenem.DataStore (a dependency of Tavenem.Wiki) is in prerelease. When that project has a stable release, a production release of Tavenem.Wiki will follow.
Contributing
Contributions are always welcome. Please carefully read the contributing document to learn more before submitting issues or pull requests.
Code of conduct
Please read the code of conduct before engaging with our community, including but not limited to submitting or replying to an issue or pull request.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net8.0
- Handlebars.Net (>= 2.1.6)
- HtmlSanitizer (>= 8.1.870)
- Jint (>= 4.0.3)
- Lucene.Net (>= 4.8.0-beta00016)
- Lucene.Net.Analysis.Common (>= 4.8.0-beta00016)
- Lucene.Net.Highlighter (>= 4.8.0-beta00016)
- Lucene.Net.QueryParser (>= 4.8.0-beta00016)
- Markdig (>= 0.37.0)
- Microsoft.Extensions.Caching.Abstractions (>= 8.0.0)
- System.Text.Json (>= 8.0.5)
- Tavenem.DataStore (>= 2.0.4)
- Tavenem.DiffPatchMerge (>= 1.0.0)
NuGet packages (4)
Showing the top 4 NuGet packages that depend on Tavenem.Wiki:
Package | Downloads |
---|---|
Tavenem.Wiki.Blazor.Client
An implementation of Tavenem.Wiki for Blazor. |
|
Tavenem.Wiki.Blazor.Shared
An implementation of Tavenem.Wiki for Blazor. |
|
Tavenem.Wiki.Mvc
An implementation of Tavenem.Wiki for ASP.NET MVC. |
|
Tavenem.Wiki.Web
An auxilliary library for Tavenem.Wiki with interfaces and classes for web implementations. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
0.26.10-preview | 23 | 11/13/2024 |
0.26.9-preview | 22 | 11/13/2024 |
0.26.8-preview | 31 | 11/12/2024 |
0.26.7-preview | 41 | 11/11/2024 |
0.26.6-preview | 46 | 11/8/2024 |
0.26.5-preview | 37 | 11/7/2024 |
0.26.4-preview | 44 | 11/6/2024 |
0.26.3-preview | 42 | 10/31/2024 |
0.26.2-preview | 75 | 10/18/2024 |
0.26.1-preview | 68 | 10/18/2024 |
0.26.0-preview | 75 | 8/22/2024 |
0.25.4-preview | 87 | 3/28/2024 |
0.25.3-preview | 66 | 3/25/2024 |
0.25.2-preview | 64 | 3/25/2024 |
0.25.1-preview | 56 | 3/25/2024 |
0.25.0-preview | 61 | 3/22/2024 |
0.24.4-preview | 67 | 2/21/2024 |
0.24.3-preview | 69 | 2/20/2024 |
0.24.2-preview | 63 | 2/20/2024 |
0.24.1-preview | 68 | 2/19/2024 |
0.24.0-preview | 156 | 11/27/2023 |
0.23.0-preview | 108 | 9/8/2023 |
0.22.2-preview | 102 | 8/14/2023 |
0.22.1-preview | 100 | 8/9/2023 |
0.22.0-preview | 93 | 8/4/2023 |
0.21.0-preview | 112 | 7/26/2023 |
0.20.1-preview | 86 | 4/25/2023 |
0.20.0-preview | 102 | 3/3/2023 |
0.19.4-preview | 106 | 3/2/2023 |
0.19.3-preview | 116 | 3/1/2023 |
0.19.2-preview | 118 | 2/3/2023 |
0.19.1-preview | 105 | 1/12/2023 |
0.19.0-preview | 116 | 1/11/2023 |
0.18.6-preview | 105 | 1/9/2023 |
0.18.5-preview | 106 | 1/9/2023 |
0.18.4-preview | 116 | 1/9/2023 |
0.18.3-preview | 107 | 1/6/2023 |
0.18.2-preview | 101 | 1/6/2023 |
0.18.1-preview | 108 | 1/6/2023 |
0.18.0-preview | 108 | 1/6/2023 |
0.17.0-preview | 112 | 1/3/2023 |
0.16.0-preview | 102 | 1/3/2023 |
0.15.0-preview | 101 | 11/22/2022 |
0.14.1-preview | 102 | 11/8/2022 |
0.14.0-preview | 101 | 11/7/2022 |
0.13.3-preview | 102 | 11/4/2022 |
0.13.2-preview | 101 | 11/3/2022 |
0.13.1-preview | 96 | 10/31/2022 |
0.12.4-preview | 95 | 10/31/2022 |
0.12.3-preview | 102 | 10/31/2022 |
0.12.2-preview | 101 | 10/26/2022 |
0.12.1-preview | 94 | 10/25/2022 |
0.12.0-preview | 100 | 10/25/2022 |
0.11.1-preview | 126 | 9/8/2022 |
0.11.0-preview | 112 | 9/8/2022 |
0.10.0-preview | 112 | 9/2/2022 |
0.9.0-preview | 107 | 9/1/2022 |
0.8.10-preview | 111 | 8/26/2022 |
0.8.9-preview | 110 | 8/25/2022 |
0.8.8-preview | 114 | 8/25/2022 |
0.8.7-preview | 120 | 8/25/2022 |
0.8.6-preview | 114 | 8/25/2022 |
0.8.5-preview | 116 | 8/25/2022 |
0.8.4-preview | 113 | 8/24/2022 |
0.8.3-preview | 112 | 8/24/2022 |
0.8.2-preview | 121 | 8/24/2022 |
0.8.1-preview | 117 | 8/24/2022 |
0.8.0-preview | 113 | 8/24/2022 |
0.7.2-preview | 117 | 8/22/2022 |
0.7.1-preview | 111 | 8/19/2022 |
0.7.0-preview | 114 | 8/19/2022 |
0.6.1-preview | 115 | 8/19/2022 |
0.6.0-preview | 120 | 8/15/2022 |
0.5.0-preview | 137 | 8/3/2022 |
0.4.0-preview | 158 | 8/31/2021 |
0.3.2-preview | 165 | 5/21/2021 |
0.3.1-preview | 162 | 4/26/2021 |
0.3.0-preview | 156 | 4/26/2021 |
0.2.3-preview | 152 | 4/15/2021 |
0.2.2-preview | 147 | 4/15/2021 |
0.2.1-preview | 153 | 4/15/2021 |
0.2.0-preview | 163 | 4/14/2021 |
0.1.0-preview | 173 | 4/11/2021 |