[PR #2115] [MERGED] Markdown Export #5943

Closed
opened 2026-02-05 10:21:00 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/BookStackApp/BookStack/pull/2115
Author: @nikhiljha
Created: 5/13/2020
Status: Merged
Merged: 6/22/2021
Merged by: @ssddanbrown

Base: masterHead: markdown-export


📝 Commits (4)

  • a34a07c basic markdown export
  • a7d9646 support exporting WYSIWYG pages as Markdown
  • ea82c2f support exporting books as zip files
  • e287d96 move zip export into exportservice

📊 Changes

10 files changed (+188 additions, -3 deletions)

View changed files

📝 app/Entities/ExportService.php (+70 -0)
📝 app/Http/Controllers/BookExportController.php (+21 -0)
📝 app/Http/Controllers/ChapterExportController.php (+12 -0)
📝 app/Http/Controllers/PageExportController.php (+11 -0)
📝 composer.json (+1 -0)
📝 composer.lock (+65 -1)
📝 dev/docker/Dockerfile (+2 -2)
📝 resources/lang/en/entities.php (+1 -0)
📝 resources/views/partials/entity-export-menu.blade.php (+1 -0)
📝 routes/web.php (+4 -0)

📄 Description

I want to be able to export a full, organized, plaintext copy of a book like @XVilka suggests in #1717.

Status

  • Export single .md files
  • Convert WYSIWYG HTML into Markdown on export
  • Make the export button show in the UI
  • Export zip files with proper directory trees

I know this is a cold PR, but hopefully there's something usable in here. General guidance for how/where to implement these features is appreciated.

Help Needed

  • Export media in the zip file
  • Since this is a heavy operation, gate .zip export behind a permission

These are things that might be good to also add... not sure where to start on them though.

Benefits

  • Adopting BookStack is easier knowing that all the data stored there is in a standard format.
  • A lot of people like git sync (hi @dkess), so this makes that possible with external software.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/BookStackApp/BookStack/pull/2115 **Author:** [@nikhiljha](https://github.com/nikhiljha) **Created:** 5/13/2020 **Status:** ✅ Merged **Merged:** 6/22/2021 **Merged by:** [@ssddanbrown](https://github.com/ssddanbrown) **Base:** `master` ← **Head:** `markdown-export` --- ### 📝 Commits (4) - [`a34a07c`](https://github.com/BookStackApp/BookStack/commit/a34a07c610390746e1160c6b57b0b190a3c772d5) basic markdown export - [`a7d9646`](https://github.com/BookStackApp/BookStack/commit/a7d9646b19cd4549849e56bec1afedb1c5987f3d) support exporting WYSIWYG pages as Markdown - [`ea82c2f`](https://github.com/BookStackApp/BookStack/commit/ea82c2f61b00231cdbcffd0463361c5b41832062) support exporting books as zip files - [`e287d96`](https://github.com/BookStackApp/BookStack/commit/e287d965f5ed6d72bb5e83fa655207f96e3257df) move zip export into exportservice ### 📊 Changes **10 files changed** (+188 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `app/Entities/ExportService.php` (+70 -0) 📝 `app/Http/Controllers/BookExportController.php` (+21 -0) 📝 `app/Http/Controllers/ChapterExportController.php` (+12 -0) 📝 `app/Http/Controllers/PageExportController.php` (+11 -0) 📝 `composer.json` (+1 -0) 📝 `composer.lock` (+65 -1) 📝 `dev/docker/Dockerfile` (+2 -2) 📝 `resources/lang/en/entities.php` (+1 -0) 📝 `resources/views/partials/entity-export-menu.blade.php` (+1 -0) 📝 `routes/web.php` (+4 -0) </details> ### 📄 Description I want to be able to export a full, organized, plaintext copy of a book like @XVilka [suggests](https://github.com/BookStackApp/BookStack/issues/1717#issuecomment-543028773) in #1717. ## Status - [x] Export single .md files - [x] Convert WYSIWYG HTML into Markdown on export - [x] Make the export button show in the UI - [x] Export zip files with proper directory trees I know this is a cold PR, but hopefully there's something usable in here. General guidance for how/where to implement these features is appreciated. ## Help Needed - [ ] Export media in the zip file - [ ] Since this is a heavy operation, gate .zip export behind a permission These are things that might be good to also add... not sure where to start on them though. ## Benefits - Adopting BookStack is easier knowing that all the data stored there is in a standard format. - A lot of people like git sync (hi @dkess), so this makes that possible with external software. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 10:21:00 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#5943