Skip to content

Remove Kontent.ai dependency, migrate content to markdown#26

Merged
petrsvihlik merged 11 commits into
masterfrom
feature/remove-kontent-ai
Mar 14, 2026
Merged

Remove Kontent.ai dependency, migrate content to markdown#26
petrsvihlik merged 11 commits into
masterfrom
feature/remove-kontent-ai

Conversation

@petrsvihlik
Copy link
Copy Markdown
Owner

Summary

  • Replaces all Kontent.ai generated models with simple POCOs (Article, Category, Tag, Author, Contact, SiteMetadata, Page, Homepage)
  • Rewrites all 8 content pipelines to read from local markdown files with YAML frontmatter instead of the Kontent.ai Delivery API
  • Adds 18 post .md files and 3 page .md files to input/
  • Adds input/_data/author.yaml and input/_data/site.yaml for site/author metadata
  • Removes Kontent.Statiq NuGet package, user secrets config, and DeliveryOptions from appsettings
  • Cleans up all Kontent smart link scripts and data-kontent-* attributes from Razor templates
  • Removes the repository_dispatch trigger dependency for content rebuilds (no longer needed)

Test plan

  • dotnet build passes (verified locally)
  • dotnet run generates static output in /output
  • Home page lists 18 articles with correct dates, categories, tags
  • Category and tag archive pages render correctly
  • Individual post pages render with canonical URL link
  • Pages (About me, Projects, 404) render correctly
  • RSS/Atom feeds generate without errors
  • Sitemap generates correctly

🤖 Generated with Claude Code

petrsvihlik and others added 11 commits March 14, 2026 23:50
- Replace all Kontent.ai generated models with simple POCOs
- Rewrite all 8 pipelines to read from local markdown files with YAML frontmatter
- Add 18 post markdown files and 3 page markdown files to input/
- Add author and site metadata YAML data files
- Remove Kontent.Statiq NuGet package and user secrets configuration
- Remove Kontent smart link scripts, data-kontent-* attributes from templates
- Delete generated model files, CustomTypeProvider, CustomContentLinkUrlResolver
- Update Program.cs, appsettings.json, and .csproj accordingly

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Rename Index.cshtml -> _Index.cshtml, Post.cshtml -> _Post.cshtml to
  prevent built-in Content pipeline from rendering them as pages
- Add _directory.yaml with Excluded: true to input/posts/ and input/pages/
  so Statiq's Content pipeline skips markdown files handled by custom pipelines
- Remove deleted display templates (DateTime, IInlineImage, IRichTextContent)
- Fix PublishDate formatting to use .ToString() directly instead of DisplayFor

Site now generates cleanly with 108 files, 0 errors.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…places it

MergeContent swaps the document content with the Razor template, so
GetContentStringAsync() in the model builder returned Razor source instead
of the rendered markdown. Store the HTML in RenderedBody metadata after
RenderMarkdown, then read it from there when building the Page model.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Projects page had placeholder text with missing links — restored all
8 project entries with their original GitHub/Gist URLs from Kontent.
About me page updated with original biographical text and links.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Statiq.Web pulls in several packages with known vulnerabilities.
Added explicit version overrides to resolve all NU190x warnings:
- Azure.Identity 1.19.0
- Microsoft.Build.Tasks.Core 18.4.0
- Microsoft.Data.SqlClient 6.1.4
- Microsoft.IdentityModel.JsonWebTokens / System.IdentityModel.Tokens.Jwt 8.16.0
- Microsoft.Rest.ClientRuntime 2.3.24 (capped at <3.0.0 for Azure.Search compat)
- Newtonsoft.Json 13.0.4
- System.Data.SqlClient 4.9.1
- System.DirectoryServices.Protocols / System.Drawing.Common / System.Security.Cryptography.Xml 10.0.5

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Remove meet-petr-svihlik.md: devrel.net redirects to developerrelations.com
  but the page is 404
- Update dev.to code coverage article URL: org renamed from
  kentico-kontent to kontent_ai

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@petrsvihlik petrsvihlik merged commit caee0af into master Mar 14, 2026
1 check passed
@petrsvihlik petrsvihlik deleted the feature/remove-kontent-ai branch March 14, 2026 23:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant