285.9. ghostwriter-26.08.2
Markdown editor — distraction-free writing with a live preview, outline, statistics and export
26.08.2-1 · GPL-3.0-or-later AND BSD-2-Clause AND MIT AND Apache-2.0 · 2.1 SBU · 5.6 MiB, 21 files · 44_apps, 84 of 422 · ports/core/editors/ghostwriter
Homepage: https://ghostwriter.kde.org/
ghostwriter is KDE’s Markdown editor: a full-screen, distraction-free editing surface with focus and Hemingway modes, a live HTML preview, a document outline, word and reading-time statistics, spell checking through sonnet, and export to HTML, PDF, ODT and DOCX. The preview is a Qt WebEngine view, from qt6-qtwebengine, which upstream requires.
Depends on: cmake, ninja, extra-cmake-modules, qt6-qtbase, qt6-qtsvg, qt6-qtwebchannel, qt6-qtwebengine, kconfigwidgets, kcoreaddons, sonnet, kwidgetsaddons, kxmlgui, kdoctools, cmark, pandoc.
Required by (1): kde-gear-utilities.
Sources: ghostwriter-26.08.2.tar.xz (2.6 MiB). Every step kpkg takes applies to this port.
Install: script/chroot/exec.sh bash -c 'source script/phases/44_apps/phase.env && kpkg install ghostwriter'
build.sh:
cmake -S . -B build -G Ninja \
-D CMAKE_INSTALL_PREFIX=/usr \
-D KDE_INSTALL_LIBDIR=lib \
-D CMAKE_BUILD_TYPE=Release \
-D KDE_INSTALL_USE_QT_SYS_PATHS=ON \
-D BUILD_TESTING=OFF \
-D KF_SKIP_PO_PROCESSING=ON \
-D CMAKE_REQUIRE_FIND_PACKAGE_KF6DocTools=ON \
-Wno-dev
cmake --build build
DESTDIR=$PKG cmake --install build
-D CMAKE_REQUIRE_FIND_PACKAGE_KF6DocTools=ON— The handbook, through kdoctools, which upstream looks for as optional; required, a missing one stops the configure instead of leaving the handbook out.-D KF_SKIP_PO_PROCESSING=ON— Skips building the interface translations, which the package-wide English-only rule would remove anyway (see Size and language policy).
Programs: ghostwriter.
Directories: /usr/share/licenses/ghostwriter.
The source carries three third-party trees under 3rdparty/. cmark-gfm, GitHub’s Markdown parser, is C, compiled here as a static library and linked into the program; it parses for the outline, the statistics and the built-in exporter. React and MathJax are built JavaScript that the preview loads, compiled into the program’s resources as upstream ships them; they are the class of payload that What is built from source lets ship as released.
The other exporters are programs ghostwriter looks for on PATH when the export dialog opens: pandoc from pandoc, which gives the PDF, ODT and DOCX formats, and cmark from cmark. Both are in depends for run time; MultiMarkdown is not a port, so it never appears in the list.