Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 26, 2025

Migrates 266 files (131 markdown + 135 images/icons) from tvheadend/tvheadend:docs/ and src/webui/static/img/ to tvheadend/documentation to centralize documentation and enable independent versioning.

Changes

  • 266 files migrated with GitBook-compliant structure:

    • webui/class/ - 37 class documentation files
    • webui/property/ - 45 property help files
    • webui/wizard/ - 8 wizard step files
    • webui/markdown/ - 19 general documentation files
    • .gitbook/includes/ - 22 reusable content blocks (moved from webui/markdown/inc/)
    • .gitbook/assets/ - 135 images and icons (moved from webui/static/img/)
  • Documentation added:

    • MIGRATION.md - Migration summary and file inventory
    • webui/INTEGRATION.md - Integration guide with submodule/URL/build-time options
    • webui/README.md - Structure overview
    • Updated SUMMARY.md to link key webui documentation

GitBook Integration

Converted all include directives and image references to GitBook's standard syntax:

{% include "../../.gitbook/includes/users_contents.md" %}
![Screenshot](../../.gitbook/assets/doc/config/base.png)
  • Reusable content blocks are stored in .gitbook/includes/ directory as per GitBook's documentation syncing conventions. All 112 include references across 45 files have been updated with proper relative paths.

  • Images and icons are stored in .gitbook/assets/ directory following GitBook conventions. All 36 files with image references have been updated to use relative paths to the assets directory.

File References

All internal links preserved:

[Access Entries](class/access)

Image and include paths are calculated based on file depth to ensure correct relative paths from any location in the documentation.

Integration Path

Main repository can reference via:

  1. Git submodule at docs-external/
  2. Direct URLs to raw.githubusercontent.com/tvheadend/documentation/master/
  3. Build-time fetch

See webui/INTEGRATION.md for implementation details.

Original prompt

There is a lot of documentation in https://github.org/tvheadend/tvheadend (in the docs folder) which is used for the in-app help. Lets move it to here but keep the general structure (meaning don't merge the files, of course you can put them in different directories to generate a nice structure) so that in the main repo we can use includes to pull in files from this documentation. Make sure no valuable content is lost, I know this will take some time but please do it anyways and find a nice place for all the files/sections from the original repo


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@Flole998
Copy link
Member

@copilot Is the structure where you migrated the files to really a good one? Also did you make sure all the images that are referenced in the markdown files were included in the migration?

Copilot AI changed the title [WIP] Move documentation files to new structure without merging Migrate in-app help documentation from main repository Oct 26, 2025
Copilot finished work on behalf of Flole998 October 26, 2025 15:24
Copilot AI requested a review from Flole998 October 26, 2025 15:24
Copy link
Contributor Author

Copilot AI commented Oct 26, 2025

@copilot Is the structure where you migrated the files to really a good one? Also did you make sure all the images that are referenced in the markdown files were included in the migration?

Good catches!

  1. Structure: The webui/ directory structure makes sense here because these files are specifically the WebUI in-app help content. This keeps them separate from the general user documentation while maintaining the original structure from the main repo for compatibility with the include system.

  2. Images: You're absolutely right - I had missed the images initially! I've now added all 135 image and icon files from src/webui/static/img/ in the main repository. This includes:

    • 77 documentation screenshots in webui/static/img/doc/
    • 58 icon files in webui/static/img/doc/icons/
    • Additional root-level images like logos and the opencollective badge

All image references in the markdown files (e.g., static/img/doc/users/access_entries_tab.png) now have their corresponding files in place.

Commit: 912fb5e

Copilot AI changed the title Migrate in-app help documentation from main repository Migrate in-app help documentation and images from main repository Oct 26, 2025
Copilot finished work on behalf of Flole998 October 26, 2025 15:38
@Flole998
Copy link
Member

@copilot We are using gitbooks, which uses a different style of includes than what is currently there. From the docs:

Syncing with GitHub & GitLab
Reusable content is fully supported when syncing to GitHub & GitLab. Your reusable content will be exported to a dedicated includes folder, each content being a separate Markdown file.

Your content is then referenced in your other pages using the includes directive.

When syncing, the .gitbook/includes directory is created in the root of each synced space (which may not be the root of the whole repository). If your .gitbook/includes folder or its files appear in your space’s table of contents, you may need to hide them manually from the TOC.

Example
If you're writing on the GitHub side, ensure the path to the include is relative to the file containing the reference (not the root of the repository).

Copy
{% include "../../.gitbook/includes/reusable-block.md" %}

Use this method instead of the tvh_include directive, move the reusable content to the .gitbook/includes directory.

Copy link
Contributor Author

Copilot AI commented Oct 26, 2025

@copilot We are using gitbooks, which uses a different style of includes than what is currently there. From the docs:

Syncing with GitHub & GitLab
...

Converted all includes to GitBook syntax. Changes made:

  1. Moved reusable content: All 22 include files moved from webui/markdown/inc/ to .gitbook/includes/
  2. Updated syntax: Converted 112 instances of <tvh_include>inc/filename</tvh_include> to {% include "../../.gitbook/includes/filename.md" %} with proper relative paths
  3. Updated documentation: Modified MIGRATION.md, webui/README.md, and webui/INTEGRATION.md to reflect the new structure

Example from webui/class/access_entry.md:

{% include "../../.gitbook/includes/users_contents.md" %}

The relative paths are calculated based on file depth (e.g., files in webui/class/ use ../../.gitbook/includes/, files in webui/ use .gitbook/includes/).

Commit: 12365ac

Copilot AI changed the title Migrate in-app help documentation and images from main repository Migrate in-app help documentation and images from main repository with GitBook includes Oct 26, 2025
Copilot finished work on behalf of Flole998 October 26, 2025 16:32
@Flole998
Copy link
Member

@copilot All the images should be moved into the .gitbook/assets directory, just like it's in the existing files.

Copy link
Contributor Author

Copilot AI commented Oct 26, 2025

@copilot All the images should be moved into the .gitbook/assets directory, just like it's in the existing files.

Moved all images to .gitbook/assets/. Changes made:

  1. Moved 135 image files from webui/static/img/ to .gitbook/assets/ preserving the directory structure
  2. Updated 36 markdown files with image references to use new paths
  3. Updated documentation to reflect the new location

Example path changes:

  • Old: ![Screenshot](static/img/doc/config/base.png)
  • New: ![Screenshot](../../.gitbook/assets/doc/config/base.png)

All relative paths are calculated based on file depth, matching GitBook's convention for assets stored in .gitbook/assets/.

Commit: 0b11f63

Copilot finished work on behalf of Flole998 October 26, 2025 17:01
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