Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import code files #5392

Open
1 task done
FaroJoaoFaro opened this issue Jan 6, 2025 · 0 comments
Open
1 task done

Import code files #5392

FaroJoaoFaro opened this issue Jan 6, 2025 · 0 comments

Comments

@FaroJoaoFaro
Copy link

Describe the feature you'd like

I would like the ability to upload coding files (e.g., PHP, Python, or JS files) directly into BookStack pages. Once uploaded, the files could be displayed in one of two ways:

  1. As an icon with the file name that, when clicked, opens the file's content in a modal or separate viewer.
  2. Automatically transformed into a code block (using the language syntax highlighting that already exists in BookStack).

Additionally, it would be beneficial to have features like:

  • Minimizable code blocks: So that large code blocks (e.g., 1000+ lines) don’t dominate the page.

  • Code previews in modals: Clicking on a file or block could show a modal or expandable viewer for better usability.

This would significantly improve documentation for projects where large code snippets or files need to be included without overwhelming the visual layout of the page.

Describe the benefits this would bring to existing BookStack users

This feature would bring the following benefits:

  • Improved readability: Large code snippets would no longer clutter pages, making documentation easier to read.

  • Better organization: Developers can upload and reference files directly in BookStack rather than pasting raw code blocks, which can be cumbersome.

  • Enhanced usability: Users can navigate and view file content on demand, either through modals or minimized blocks.

  • Efficiency in documentation: This feature supports a more structured approach for technical documentation involving large codebases.

These benefits apply broadly to any team or individual using BookStack to document software projects with embedded code.

Can the goal of this request already be achieved via other means?

No, not entirely. While you can manually paste code into a page as a code block, this is inefficient for handling larger code files and does not provide the features of file uploading, code previews, or minimizable blocks.

Have you searched for an existing open/closed issue?

  • I have searched for existing issues and none cover my fundamental request

How long have you been using BookStack?

Under 3 months

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant