AI 资讯
Sanity vs Directus for Next.js in 2026: An Honest Comparison
Sanity vs Directus is a comparison that comes up more than you'd expect on technical forums in 2026, usually from teams who already have a Postgres database running and are wondering why they'd pay for a separate content lake when Directus can wrap what they have. It's a fair question. These two tools solve adjacent problems but from genuinely different starting points, and the right choice depends heavily on whether your content is primarily relational data or editorial content. What each tool actually is Sanity is a hosted content platform. Your content lives in Sanity's managed "content lake" — a document store with real-time collaboration, a CDN-backed asset pipeline, and GROQ as the query language. You define schemas in code, deploy a customisable Studio, and talk to Sanity's API from your Next.js app. You do not manage infrastructure. Directus is an open-source data platform that wraps any existing SQL database — Postgres, MySQL, SQLite, MS SQL — and exposes it through a REST API, a GraphQL endpoint, and a web-based admin UI. Schema changes happen in the admin UI (or via migrations), and your data stays in your own database. You can self-host entirely or use Directus Cloud. That distinction — hosted content lake vs database-wrapper — drives nearly every practical difference between them. Data ownership and where your content lives With Sanity, your content lives in Sanity's infrastructure. You can export it via the export API, but you are operationally dependent on Sanity's uptime and their CDN. For most product teams that's fine — Sanity has been reliable and their SLA on Growth/Enterprise tiers is solid. But if you're in a regulated industry, have strict data residency requirements, or your client contract requires them to own the database, it's a real constraint. With Directus, the database is yours from day one. You point Directus at a Postgres instance on your own infrastructure (or a managed one like Supabase, Neon, or Railway), and Directus adds the API
AI 资讯
WordPress 7.0 Ships with AI Foundations in Core, a Modernized Admin, and New Design Tools
WordPress 7.0, released on May 20, 2026, includes new AI infrastructure, a redesigned admin interface, and updated design tools. Key features comprise an AI Client, Abilities API, and Command Palette, alongside increased PHP requirements. Community feedback is mixed, particularly regarding AI integration. Developers are advised to consult the official documentation for upgrade guidance. By Daniel Curtis
AI 资讯
How I add semantic search to a Next.js site using Sanity Embeddings
Sanity Embeddings semantic search in Next.js is one of those features that looks complicated from the outside but is surprisingly lean to wire up once you understand the moving parts. This post covers the current native Embeddings feature built into Sanity datasets — not the older Embeddings Index API, which Sanity is sunsetting. If you found a guide that talks about a separate embeddings-index resource you have to provision via the Management API, it is stale; skip it. What Sanity Embeddings actually is Sanity's native Embeddings feature lets you mark document types for vector indexing directly inside your dataset. Sanity handles the embedding model and the vector store; you never manage a separate service. Queries use a dedicated sanity.embeddings.query GROQ function that takes a natural-language string and returns documents ranked by semantic similarity. The feature is available on Growth and Enterprise plans as of mid-2026. The workflow has three parts: Configure which document types get indexed (dataset setting or the Embeddings pane in Sanity Studio). Run a semantic query from your Next.js route handler using the Sanity client. Render the results in a search UI component. Setting up the embeddings index in your dataset Go to Manage → your project → Embeddings (or open the Embeddings pane inside Sanity Studio if your plan surfaces it there). Create an index, give it a name (e.g. site_search ), and select which document types and fields to embed. For a blog you would typically pick post with fields title , excerpt , and body (plain text extracted from Portable Text). Sanity backfills existing documents automatically. New and updated documents are re-embedded on publish via an internal webhook — you do not configure that yourself. There is no code required for the indexing step. The index name you choose here ( site_search ) is what you will pass in the GROQ query. Querying embeddings from a Next.js route handler Create a route handler that accepts a search term,
AI 资讯
Building a typed CMS for business data with PHP, OpenAPI, and MCP
In my previous article, I introduced the NeNe series: a family of small, self-hosted business tools for teams operating in Japan. Previous article: https://dev.to/hideyukimori/i-am-building-self-hosted-business-tools-for-small-teams-in-japan-4i26 This article is a deeper look at one of those tools: NeNe Records . Repository: https://github.com/hideyukiMORI/nene-records NeNe Records is an API-first typed CMS and flexible entity platform built on NENE2 , my small PHP framework for AI-readable business APIs. It is not trying to be a WordPress clone. It is not trying to run WordPress plugins or themes. The goal is different: manage business data and public content through typed schemas, documented APIs, and clear AI tool boundaries. Why not just use WordPress? WordPress is useful. It has proven that a generic content model can support blogs, pages, shops, media, and many small business workflows. But when I think about business data, a few problems keep coming back: untyped metadata plugin-specific data shapes hooks and filters that can change behavior from many places API contracts that depend heavily on plugins AI integrations that may not know where the real application boundary is The postmeta model is flexible, but it often becomes stringly typed storage. That is fine for many websites. But for business data, I usually want the API to know more: this field is text this field is an enum this field is an image this field is a relation this field is required this record belongs to this organization this operation requires this role That is the space where NeNe Records lives. Typed records instead of metadata chaos The core model is simple: Entity Type -> Field Definition -> Record An Entity Type defines what kind of data exists. Examples: posts pages products events internal documents A Field Definition describes the shape of a field: text markdown html blocks int enum bool datetime image file relation A Record is the actual data. The important part is that the schema
AI 资讯
Lovable vs. SleekCMS: What Happens After You Launch?
There is a moment, about ten minutes into using Lovable, where you feel like the future has arrived. You type a few sentences, and a real website appears. It looks good. It works. You did not write a line of code. We get it. That moment is genuinely impressive, and Lovable deserves the credit it gets for it. But a website is not a launch. It is a thing you live with. You update your hours. You add a blog post. You publish a case study. You change a price. You hire someone and want them to handle the news page without breaking anything. That is where the two platforms stop looking alike. So instead of comparing the first ten minutes, this post compares the next ten months. What Lovable actually builds Lovable is an AI coding tool. When you describe your site, it writes a React application: components, state, routing, build tooling. Your content, the actual words and images on your pages, lives inside that code. This is a fine architecture for a web app. It is an awkward one for a website, because every future change is a code change. Want to fix a typo in a testimonial? That sentence is a string inside a React component. You can ask the AI to change it, and it usually will. But you are editing software to edit a sentence. Your marketing person is not going to do that. Your client definitely is not. And there is a quieter problem underneath. The site Lovable generates depends on a specific framework, a specific set of packages, and a build pipeline. Frameworks move fast. The React app that builds cleanly today may need dependency updates a year from now just to keep working. Someone has to own that, and it is probably you. What SleekCMS builds SleekCMS starts from a different assumption: most businesses do not need a web application. They need a website, and a website is mostly content. So when you describe your site to SleekCMS, you get two things: First, your content as structured data. Your pages, your services, your team bios, your blog posts all live in a CMS, in
AI 资讯
Headless CMS Security: Why Decoupled Is Safer
📝 Originally published on unfoldcms.com — reposted here for the DEV community. (I work on UnfoldCMS.) A coupled CMS puts the admin login on the same hostname visitors reach. A headless CMS puts it on a different hostname behind auth. That single architectural difference is why headless CMS security is meaningfully better than traditional coupled-CMS security on most real-world dimensions — and it's also why the comparison gets oversimplified into "headless is more secure" when the truth is more interesting. This post is the architectural take on headless CMS security : why decoupled is safer on most dimensions, where it can be less safe if you don't handle API hygiene properly, and what the honest comparison looks like in 2026. TL;DR : headless wins on attack-surface reduction (admin off the public hostname, smaller plugin attack surface, API-first auth model) but loses on dimensions teams typically don't think about (exposed APIs without rate limits, JWT misuse, secrets in frontend code, draft preview tokens leaking). A well-built headless CMS is meaningfully more secure than a typical WordPress site; a poorly-configured headless CMS can be worse than a maintained WordPress site. The architecture biases toward safer; the implementation determines actual outcomes. The audience: technical decision-makers and security-conscious teams comparing CMS architectures with security as a deciding factor. If you're earlier in the architectural decision, see headless CMS vs traditional CMS: key differences . For the WordPress-specific security picture this post compares against, WordPress security problems in 2026 . The Attack Surface Difference The single biggest architectural difference between coupled and headless CMS security is where the admin lives . A traditional WordPress site puts the admin login at yourdomain.com/wp-admin . The same hostname your visitors reach. The same SSL cert. The same Cloudflare config. Every brute-force attempt, every credential-stuffing bot, ev
AI 资讯
WordPress Market Share Declining (2026 Data)
📝 Originally published on unfoldcms.com — reposted here for the DEV community. (I work on UnfoldCMS.) WordPress's market share among CMS-using websites dropped from 65.2% in 2023 to 60.2% by Q1 2026, contracting -2.9% year-over-year for the first time in over a decade. The platform that built the modern web is losing share to Wix, Squarespace, Shopify, and an emerging headless category — and the trend is steeper among newly-built sites than the headline number suggests. This post is the data-driven take on WordPress market share declining in 2026 — where the numbers actually come from, where the lost share is going, what age-cohort analysis reveals about the trajectory, and what the developer-signal data (Stack Overflow, GitHub) shows about who's still building on WordPress versus moving on. TL;DR : WordPress isn't collapsing — 60% market share is still dominant — but the lead has shrunk for the first time in 10 years, the cohort of new sites is breaking away faster than the overall number suggests, and the developer mindshare is leaving even faster than market share. The structural pressures (security, performance, plugin tax, modern stack expectations) all point the same direction. The audience: developers, agencies, and CTOs trying to read the WordPress market trend before committing to a multi-year platform decision. If you've been told "WordPress is sinking" or "WordPress is fine, market share gossip is overstated," this post puts numbers behind the actual movement. For the broader context on why WordPress is losing share, see why developers are leaving WordPress: 7 pain points and WordPress vs modern CMS: honest feature comparison . The Headline Numbers Three primary sources track CMS market share. They don't agree exactly, but they all show the same direction: W3Techs (the most-cited dataset, scans the top 10M websites): Metric 2023 Q1 2024 Q1 2025 Q1 2026 Change WordPress share among CMS-using sites 65.2% 64.1% 62.4% 60.2% -5 points in 3 years WordPress shar
AI 资讯
Your Static Site Doesn't Need a Build Pipeline
Setting up a 10-page marketing site Count the tools. You reach for Next.js or Astro. You run npm init . There's a bundler config. PostCSS for Tailwind. A Netlify account. A GitHub repository. Environment variables for the CMS token. A build hook URL from Netlify, pasted into the CMS webhook settings so content publishes trigger a rebuild. Maybe a CI configuration file. For a 10-page marketing site. The honest question: does a 10-page marketing site need any of this? For most content-focused sites, the answer is no. How we got here The JAMstack movement was right about the fundamentals. Pre-generated static HTML served from a CDN is faster, cheaper, and more secure than server-side rendering at request time. Netlify and Vercel made this genuinely accessible. The developer tooling that emerged around it was designed well. The problem is that the tooling was designed for applications — large JavaScript codebases with complex component trees, client-side routing, and sophisticated build requirements. It's good tooling for that use case. It became the default for everything, including content sites that have no more complexity than a Markdown file and a CSS stylesheet. When the tool doesn't fit the problem, you inherit the cost of the tool without the benefit. What the build pipeline actually costs Setup time. Getting a new project from blank to deployed with a modern build pipeline takes a few hours if you know the stack, longer if you're making decisions. Framework version, bundler config, PostCSS, Tailwind setup, environment variable management, deploy configuration. That's before you've written a single line of page-specific code. Maintenance surface. Every dependency is something that can break. Node version compatibility, framework major version upgrades, bundler updates, plugin compatibility matrices. A project set up in 2022 may require non-trivial work to update in 2026. For a client site, that maintenance either falls on your agency or accumulates as technical
AI 资讯
Contentful vs. Sanity vs. SleekCMS: A Practical Comparison for Developer Teams
Start here This post assumes you have a project and you're trying to pick a tool. It skips the marketing and goes to the technical and economic decisions that actually matter when you're doing the evaluation. All three of these platforms — Contentful, Sanity, and SleekCMS — are used in production by serious teams. The comparison is not going to tell you one of them is bad. It's going to tell you which scenarios each one is genuinely suited for, so you can match your project to the right tool. The three platforms at a glance Contentful is an enterprise-grade headless CMS with a long history of production deployments, a large ecosystem of integrations, and pricing that becomes significant at scale. It's the established choice for large organisations with existing Contentful investment. Sanity is a developer-first headless CMS with a flexible schema system, real-time collaborative editing, and GROQ — a query language purpose-built for content graphs. It has a strong developer community and a genuinely modern developer experience. SleekCMS is a headless CMS with an integrated static site builder. Structured content with REST and GraphQL APIs, a TypeScript-native client library, and the option to generate and deploy a static site from the same content models without maintaining an external frontend stack. Content modeling All three support structured content modeling. The differences are in how you define models and what the system supports natively. Contentful uses a GUI-based model builder in the dashboard. You create content types and add fields through a point-and-click interface. Solid for teams who prefer a visual setup; less ideal if you want models version-controlled as code. Sanity defines schemas in TypeScript or JavaScript config files — committed to your repository, version-controlled, and composable like code. This is Sanity's strongest differentiator for teams who think in code-first workflows. The schema definition is expressive and the TypeScript integrat
AI 资讯
How We Built a Client Site in a Single Afternoon Using AI and @sleekcms/sync
The brief Small professional services firm. Needed a clean marketing site: homepage, services section with individual service pages, about page, a blog, and a contact form. Timeline: tight. Budget: fixed. The kind of project where the question isn't whether you can build it — it's whether you can build it without spending three days on project scaffolding before writing a single line of content-specific code. This is what that afternoon looked like. One command to start The cms-sync is the entry point. One command creates the local workspace and starts the file watcher: npx @sleekcms/sync --token YOUR_AUTH_TOKEN On first run, the workspace appears with three files before you've written anything: my-site/ ├── CLAUDE.md ├── AGENT.md └── .vscode/ └── copilot-instructions.md These context files are the key. CLAUDE.md for Claude and Claude Code. AGENT.md for GitHub Copilot in agent mode. .vscode/copilot-instructions.md for GitHub Copilot in VS Code. Each contains the complete SleekCMS site-building reference — file naming conventions, model syntax, template helpers, field types, content format. Open the workspace in Cursor (or VS Code with Copilot, or Claude Code). The AI already knows how to build a SleekCMS site. No setup prompt, no pasting documentation. The prompt We kept it realistic — not a paragraph of precise technical specification, but the kind of description you'd give a developer on a call: Build a professional services marketing site with: - A homepage with a hero section, services overview, client logos, and a contact CTA - A services page listing all services, and individual service detail pages - An about page - A blog with individual post pages - A shared header and footer - A contact form - Tailwind CSS styling - SEO meta tags on every page What the AI generated The output was a complete set of working files: models/pages/_index.model models/pages/services.model models/pages/services[].model models/pages/about.model models/pages/blog[].model models/page