{"id":23855478,"url":"https://github.com/jgauffin/markdownweb","last_synced_at":"2025-09-08T03:31:22.463Z","repository":{"id":25530935,"uuid":"28963376","full_name":"jgauffin/markdownweb","owner":"jgauffin","description":"Generates web pages using Markdown","archived":false,"fork":false,"pushed_at":"2022-12-08T14:48:03.000Z","size":6725,"stargazers_count":8,"open_issues_count":4,"forks_count":1,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-12-15T15:40:21.725Z","etag":null,"topics":["csharp","dotnet","markdown","page-generator","sequence-diagram","wiki"],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jgauffin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-08T11:40:46.000Z","updated_at":"2022-11-07T13:58:50.000Z","dependencies_parsed_at":"2023-01-14T03:00:19.718Z","dependency_job_id":null,"html_url":"https://github.com/jgauffin/markdownweb","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgauffin%2Fmarkdownweb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgauffin%2Fmarkdownweb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgauffin%2Fmarkdownweb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgauffin%2Fmarkdownweb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jgauffin","download_url":"https://codeload.github.com/jgauffin/markdownweb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232275370,"owners_count":18498274,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csharp","dotnet","markdown","page-generator","sequence-diagram","wiki"],"created_at":"2025-01-03T00:57:30.079Z","updated_at":"2025-01-03T00:57:30.582Z","avatar_url":"https://github.com/jgauffin.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MarkdownWeb\n\nThis project is a web page generator that uses Markdown as the format. You can use wiki link syntax\nto link between different pages. It also supports editing of pages using a Markdown editor with preview support and syntax highlighting.\n\nIf you implement your repository you can also store page revisions (to get a complete wiki functionality).\n\n\n[Live demo](http://coderr.io/documentation/) which is generated from [this documentation repository](https://github.com/coderrio/coderr.documentation).\n\n## Screenshot\n\n![](docs/screenshot.png)\n\n# Features\n\n* All basic markdown formatters.\n* Fenced codeblocks (with language specified as in Github pages)\n* Github table format\n* Links between markdown pages\n* Local images\n* Markdown editor\n* Save/Edit pages\n\n# Installation\n\n**Basic installation**\n\n    install-package markdownweb\n\t\n# AspNet Core installation\n\nInstall the ASP.NET Core package: `markdownweb.aspnetcore`.\n\nAdd the following to `ConfigureServices()` in your `Startup.cs`:\n\n```csharp\napp.UseMarkdownWeb(options =\u003e\n{\n    // URL to serve the markdown pages from\n    options.Path = new PathString(\"/doc\");\n    \n    // Location on disk\n    options.DocumentationDirectory = @\"D:\\websites\\mysite\\wwwroot\\docs\";\n\n    // To use a git repos:\n    options.GitRepositoryUrl = \"https://github.com/your/repository\";\n    \n    // Where in the repos that the markdown files are located.\n    options.GitSubFolder = @\"docs\\\";\n});\n```\n\nThat's it.\n\n## Customizing\n\nMarkdownWeb supports view engine files and plain HTML.\n\n### View engine files\n\nMarkdownWeb looks for `Views\\Shared\\Wiki.cshtml` per default, change it using `options.LayoutPage`. Custom views must be placed where view engines normally look for them (typically `Views\\`).\n\nThe model type is `MarkdownWeb.GeneratedPage`.\n\nTo get the generated table of contents (using headings), use `@Model.GetPartOrDefault(\"TableOfContents\")`.\n\n### HTML files\n\nThe page path is relative to the content root (i.e. root folder).\n\nThe template must contain a tag named `{Body}` which will be replaced with the Markdown generated HTML. You can also add the tags `{TableOfContents}`, `{Title}` and `{Abstract}`\n\n# Manual installation\n\t\nThe `PageService` is the main class which takes care of all parsing. It do however need to know how to treat links and \nwhere it can load/store pages. It do therefore have two dependencies that you need to configure first.\n\n## IPageRepository\n\nThe abstraction for the datastorage. The built in storage is using the harddrive for storage. You should specify which directory\nthe files can be stored in. The structure will mirror the structure you use when you create pages.\n\nThere is also a IPageRepository which pulls a git repository.\n\n## IUrlConverter\n\nAs the markdown pages can be placed anywhere in your web site structure the library needs to know where the pages is located to make it's wiki links\nurl independent. That transaction is handled by the `IUrlConverter` interface.\n\nFor instance you might have the pages in `http://yoursite.com/doc/` while all web site links in the pages are relative to the doc root (`/`). Thus\nwhen someone surfs to `http://yoursite.com/doc/users/create/` the library just want to see it as `/users/create`.\n\n## Complete configuration\n\n```csharp\nvar repository = new FileBasedRepository(@\"C:\\Web\\MarkdownPages\");\nvar converter = new UrlConverter(VirtualPathUtility.ToAbsolutePath(\"~/doc/\"));\nvar service = new PageService(repository, converter);\n```\n\nThen you just need to pass an url to the service:\n\n```csharp\nvar htmlPage = service.ParseUrl(Request.Url.AbsolutePath);\n```\n\n.. or just markdown:\n\n```csharp\nvar htmlPage = service.ParseString(\"/doc/\", myMarkdownDocument);\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjgauffin%2Fmarkdownweb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjgauffin%2Fmarkdownweb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjgauffin%2Fmarkdownweb/lists"}