Skip to content

feat: add support for <base> tag in rendered HTML#60

Merged
zamkovskaya merged 2 commits intomainfrom
feat/base-tag-support
Apr 7, 2026
Merged

feat: add support for <base> tag in rendered HTML#60
zamkovskaya merged 2 commits intomainfrom
feat/base-tag-support

Conversation

@zamkovskaya
Copy link
Copy Markdown
Contributor

Add a new base option to RenderParams that allows setting <base href="..." target="..."> in the document <head>.

  • Add Base interface with optional href and target fields
  • Add base? to HeadContent and RenderParams interfaces
  • Wire base through generateRenderContent (including plugin access)
  • Render <base> tag after <meta charset> and before <title>
  • Export Base type from package index
  • Add tests for base tag rendering
  • Document in README.md and README-ru.md

Add a new `base` option to `RenderParams` that allows setting
`<base href="..." target="...">` in the document `<head>`.

- Add `Base` interface with optional `href` and `target` fields
- Add `base?` to `HeadContent` and `RenderParams` interfaces
- Wire `base` through `generateRenderContent` (including plugin access)
- Render `<base>` tag after `<meta charset>` and before `<title>`
- Export `Base` type from package index
- Add tests for base tag rendering
- Document in README.md and README-ru.md
Comment thread src/utils/generateRenderContent.ts Outdated
Comment thread src/utils/renderHeadContent.ts Outdated
Comment thread src/types.ts
@zamkovskaya zamkovskaya merged commit c7033d6 into main Apr 7, 2026
2 checks passed
@zamkovskaya zamkovskaya deleted the feat/base-tag-support branch April 7, 2026 09:04
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.

2 participants