{"id":50478662,"url":"https://github.com/uwuclxdy/katdown","last_synced_at":"2026-06-01T15:31:49.703Z","repository":{"id":360964354,"uuid":"1252163020","full_name":"uwuclxdy/katdown","owner":"uwuclxdy","description":"GitHub-styled Markdown preview plugin for Kate (KTextEditor/KF6)","archived":false,"fork":false,"pushed_at":"2026-05-28T15:54:15.000Z","size":357,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"mommy","last_synced_at":"2026-05-28T17:13:34.077Z","etag":null,"topics":["kate-plugin","kde","kf6","ktexteditor","markdown-preview","vibecoded"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/uwuclxdy.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-28T08:49:16.000Z","updated_at":"2026-05-28T15:54:21.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/uwuclxdy/katdown","commit_stats":null,"previous_names":["uwuclxdy/katdown"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/uwuclxdy/katdown","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uwuclxdy%2Fkatdown","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uwuclxdy%2Fkatdown/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uwuclxdy%2Fkatdown/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uwuclxdy%2Fkatdown/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uwuclxdy","download_url":"https://codeload.github.com/uwuclxdy/katdown/tar.gz/refs/heads/mommy","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uwuclxdy%2Fkatdown/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33782314,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-01T02:00:06.963Z","response_time":115,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["kate-plugin","kde","kf6","ktexteditor","markdown-preview","vibecoded"],"created_at":"2026-06-01T15:31:48.906Z","updated_at":"2026-06-01T15:31:49.698Z","avatar_url":"https://github.com/uwuclxdy.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# Katdown - Kate Markdown Preview\n\n[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](LICENSE)\n\u0026nbsp;![KDE Frameworks 6](https://img.shields.io/badge/KDE%20Frameworks-6-1d99f3?logo=kde\u0026logoColor=white)\n\u0026nbsp;![Qt 6](https://img.shields.io/badge/Qt-6-41cd52?logo=qt\u0026logoColor=white)\n\n\u003c/div\u003e\n\nKDE Kate plugin for viewing GitHub-styled preview of Markdown files with live updates. Supports both GitHub's own colors and also your active editor/system theme.\n\n\u003e [!NOTE]\n\u003e It's vibecoded. (it works better than anything else tho)\n\n## Screenshots\n\n| GitHub style | Theme-matched style |\n| :----------: | :-----------------: |\n| ![GitHub style preview](assets/github_theme.png) | ![Theme-matched preview](assets/native_theme.png) |\n\n## Installation\n\n### Arch Linux (recommended)\n\nInstall [`katdown-git`](https://aur.archlinux.org/packages/katdown-git) from the AUR with any helper:\n\n```bash\nyay -S katdown-git   # or: paru -S katdown-git\n```\n\nThe package builds from the latest commit and pulls in every dependency. Then enable it: Settings, then Configure Kate, then Plugins, then check Katdown.\n\n### Build from source\n\n```bash\ngit clone https://github.com/uwuclxdy/katdown.git\ncd katdown\ncmake -B build -S . -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr\ncmake --build build\n```\n\nThen pick install type:\n\n**System** (loads in every Kate launch):\n\n```bash\nsudo cmake --install build\n```\n\n**User-local** (no root, but needs a re-login to take effect). The second command adds `~/.local/lib/qt6/plugins` to Qt's plugin search path so Kate finds it:\n\n```bash\ncmake --install build --prefix ~/.local\nmkdir -p ~/.config/environment.d\nprintf 'QT_PLUGIN_PATH=%s/.local/lib/qt6/plugins\\n' \"$HOME\" \\\n    \u003e ~/.config/environment.d/katdown.conf\n```\n\nAfter installing, enable it: Settings, then Configure Kate, then Plugins, then check Katdown.\n\n\u003e [!NOTE]\n\u003e Qt WebEngine is initialized from inside Kate. On some setups you may see a console warning about `Qt::AA_ShareOpenGLContexts`. It is harmless in practice.\n\n## Requirements\n\nThe AUR package resolves these for you. You only need them to build from source.\n\n- Kate / KTextEditor 6 (KF6)\n- Qt 6 with WebEngine\n\nOn Arch:\n\n```bash\nsudo pacman -S --needed base-devel cmake extra-cmake-modules \\\n    ktexteditor qt6-webengine kcoreaddons ki18n kconfig kxmlgui ksyntaxhighlighting\n```\n\n## Why this exists\n\nKate's built-in preview uses a plain Qt renderer that looks nothing like GitHub. The other option, `kmarkdownwebview`, was abandoned in 2020 and never ported to KF6. This plugin fills that gap: it renders with the actual [github-markdown-css](https://github.com/sindresorhus/github-markdown-css), so headings, tables, blockquotes, task lists, and alerts match what you would see on github.com. It also runs fully offline (unless you opt in).\n\n## Features\n\n- Preview opens in a real tab next to your document, not a cramped side panel\n- Live updates while you type (debounced)\n- GitHub light and dark, picked automatically from your system, or forced\n- A theme-matched mode that recolors the same GitHub layout from your active Kate editor theme, so code blocks use the exact same syntax colors as the editor\n- GitHub Flavored Markdown: tables, strikethrough, autolinks, and `- [ ]` task list checkboxes\n- GitHub alerts (`\u003e [!NOTE]`, `[!TIP]`, `[!IMPORTANT]`, `[!WARNING]`, `[!CAUTION]`) with the matching octicons and colors\n- YAML frontmatter rendered as a GitHub-style metadata table at the top of the file\n- Toolbar button and a configurable \u003ckbd\u003eCtrl\u003c/kbd\u003e+\u003ckbd\u003eShift\u003c/kbd\u003e+\u003ckbd\u003eM\u003c/kbd\u003e shortcut\n- Everything is bundled — the renderer and all its assets are fully offline. Remote image loading is off by default and can be enabled in settings.\n\n## Usage\n\nOpen any Markdown file in Kate:\n\n```bash\nkate path/to/notes.md\n```\n\nThen trigger the preview in one of three ways:\n\n- press \u003ckbd\u003eCtrl\u003c/kbd\u003e+\u003ckbd\u003eShift\u003c/kbd\u003e+\u003ckbd\u003eM\u003c/kbd\u003e, or\n- click the Katdown button in the main toolbar (Settings, then Toolbars Shown, then Main Toolbar if it is hidden), or\n- use Tools, then Katdown.\n\nThe button is greyed out unless the active tab is a Markdown document. The preview tab tracks the document and re-renders as you edit. Triggering it again focuses the existing tab instead of opening a second one.\n\n## Configuration\n\nSettings -\u003e Configure Kate -\u003e (Plugins -\u003e enable `Katdown`) -\u003e Katdown.\n\n![GitHub style preview](assets/settings.png)\n\n| Setting | Options | What it does |\n|---------|---------|--------------|\n| Style | GitHub / Match editor or system theme | GitHub uses GitHub's palette. Match recolors the same layout from your active editor theme. |\n| GitHub variant | Auto / Light / Dark | Which GitHub palette to use. Auto follows whether your system is light or dark. Only applies in GitHub style. |\n| Load media previews from remote URLs | On / Off (default) | When on, images referencing `http(s)` URLs are fetched and rendered. When off (the default), the preview loads no remote resources and works fully offline. Images with paths relative to the document always load regardless of this setting. |\n\nChange the shortcut under Settings, then Configure Keyboard Shortcuts, search for Katdown.\n\n## How it works\n\nThe preview is a `QWebEngineView` added to Kate's tab area through `KTextEditor::MainWindow::addWidget`. The page is one self-contained HTML document with the assets inlined, so nothing loads over the network.\n\n```mermaid\nflowchart LR\n    A[\"Markdown document\"] --\u003e|\"textChanged (debounced)\"| B[\"PreviewWidget\"]\n    B --\u003e|\"setHtml once\"| C[\"QWebEngineView\"]\n    B --\u003e|\"runJavaScript()\"| D[\"preview.js\"]\n    D --\u003e E[\"markdown-it\u003cbr/\u003etasks · alerts · frontmatter\"]\n    D --\u003e F[\"highlight.js\"]\n    G[\"Editor theme / GitHub palette\"] --\u003e|\"CSS variables\"| C\n```\n\n- Layout and typography come from `github-markdown-css`. The built-in color values are stripped out so the plugin can drive them from CSS custom properties.\n- Markdown is parsed by [markdown-it](https://github.com/markdown-it/markdown-it). Small bundled plugins add task-list checkboxes and GitHub alerts, and leading YAML frontmatter is parsed with [js-yaml](https://github.com/nodeca/js-yaml) into a metadata table.\n- Code highlighting uses [highlight.js](https://github.com/highlightjs/highlight.js). In GitHub style it uses the github/github-dark themes. In theme-matched style the token colors are generated at runtime from `KTextEditor::View::theme()`, so they line up with the editor.\n\nCode highlighting is close to GitHub but not byte-identical, because GitHub uses its own server-side highlighter rather than highlight.js. If needed, [starry-night](https://github.com/wooorm/starry-night) is a faithful port of GitHub's highlighter and could replace highlight.js.\n\n## Development\n\nBuild, then run Kate that loads the freshly built plugin without installing it:\n\n```bash\ncmake -B build -S . -DCMAKE_BUILD_TYPE=Debug\ncmake --build build -j\"$(nproc)\"\nQT_PLUGIN_PATH=\"$PWD/build/bin\" kate some-file.md\n```\n\nSource layout:\n\n- `src/plugin.*` plugin entry point and config page registration\n- `src/pluginview.*` per-window action, toolbar/menu wiring, opening the tab\n- `src/previewwidget.*` the web view, rendering, and theme derivation\n- `src/configpage.*` the settings page\n- `src/settings.*` persisted settings\n- `data/` bundled HTML, CSS, JS, and the qrc\n\n## Credits\n\n- [github-markdown-css](https://github.com/sindresorhus/github-markdown-css) by Sindre Sorhus\n- [markdown-it](https://github.com/markdown-it/markdown-it)\n- [highlight.js](https://github.com/highlightjs/highlight.js)\n- [js-yaml](https://github.com/nodeca/js-yaml)\n\n## License\n\nGPL-3.0-or-later. See [LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuwuclxdy%2Fkatdown","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuwuclxdy%2Fkatdown","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuwuclxdy%2Fkatdown/lists"}