# Theme Knowledge

## Package docs status

This page is generated from public package documentation in `capell-4/packages` and the package manifest checked into the source repository.

| Field | Value |
| --- | --- |
| Composer package | `capell-app/theme-knowledge` |
| Package slug | `theme-knowledge` |
| Product group | Capell Themes |
| Tier | premium |
| Bundle | `themes` |
| Runtime contexts | `frontend` |
| Capell version | `^4.0` |
| Source repository | `capell-app/packages` |
| Source path | `packages/theme-knowledge` |
| Docs source | `packages/theme-knowledge/docs` |
| Manifest | [`capell.json`](https://github.com/capell-app/packages/edit/4.x/packages/theme-knowledge/capell.json) |

Theme Knowledge is a Capell theme for knowledge bases, publishers, resource
hubs, and content-led teams that need searchable, editorial frontend pages.

## At A Glance

- Package: `capell-app/theme-knowledge`
- Namespace: `Capell\ThemeStudio\Knowledge\`
- Theme key: `knowledge`
- Surfaces: frontend, console
- Service provider:
  `Capell\ThemeStudio\Knowledge\KnowledgeThemeServiceProvider`
- Demo command:
  `capell:theme-knowledge-demo {--url=} {--languages=} {--sites=} {--force}`
- Extends: `capell-app/foundation-theme`
- Database impact: none

## Why It Helps Your Capell Workflow

- Site owners can launch a resource-library site where visitors can browse
  topics, featured content, authors, and search-led journeys.
- Editors get a theme vocabulary that fits documentation, articles, resource
  hubs, newsletters, and author-led content.
- Developers get a renderer package with optional Blog, Search, and Newsletter
  integration checks instead of hard package coupling.

## Best Used With

- [Foundation Theme](../foundation-theme/README.md)
- [Blog](../blog/README.md) for resources and author content.
- [Search](../search/README.md) for public search listing sections.
- [Newsletter](../newsletter/README.md) for subscription CTAs.
- [SEO Suite](../seo-suite/README.md) for structured discovery.

## What It Adds

- Registers the `knowledge` theme definition and preset.
- Ships a knowledge-focused page wrapper and theme CSS.
- Adds section renderers for topic hubs, featured content, resource library,
  search listing, newsletter, authors, proof, and supporting content blocks.
- Uses Core `ViewSectionRenderer` extra view data for optional Blog, Search, and Newsletter
  sections.
- Adds a demo install command backed by `InstallKnowledgeThemeDemoAction`.
- Adds `ThemeKnowledgeHealthCheck` and a Theme management page contribution.

## Runtime Surface

| Area                | Path                                               |
| ------------------- | -------------------------------------------------- |
| Provider            | `src/KnowledgeThemeServiceProvider.php`            |
| Demo command        | `src/Console/Commands/DemoCommand.php`             |
| Demo action         | `src/Actions/InstallKnowledgeThemeDemoAction.php`  |
| Renderer            | Core `ViewSectionRenderer` extra view data         |
| Theme management    | `src/Manifest/ThemeManagementPageContribution.php` |
| Health check        | `src/Health/ThemeKnowledgeHealthCheck.php`         |
| Views               | `resources/views/page.blade.php`                   |
| CSS                 | `resources/css/theme-knowledge.css`                |
| Screenshot manifest | `docs/screenshots.json`                            |

## Install Impact

- Adds a frontend theme renderer and console demo command.
- Adds no migrations, settings, models, package-owned routes, or admin
  resources.
- Depends on Foundation Theme and reads normal Capell page/theme runtime data.
- Optional sections stay guarded when Blog, Search, or Newsletter are not
  installed.

## Docs

- [Docs index](README.md)
- [Overview](overview.md)
- [Creating a Capell theme](../../docs/creating-a-theme.md)
- [Theme Screenshot QA Playbook](../../docs/theme-screenshot-qa-playbook.md)

## Testing

Run package tests from the repository root:

```bash
vendor/bin/pest packages/theme-knowledge/tests --configuration=phpunit.xml
```

## Maintenance Notes

- Keep public theme output free of admin URLs, signed preview URLs, editor
  selectors, theme internals, model IDs, and permission metadata.
- Keep optional package checks inside the service provider/renderer layer, not
  public Blade.
- Keep the docs aligned with `KnowledgeThemeServiceProvider::definition()` when
  section keys, presets, or optional integrations change.