Skip to content

Make docs portable by using relative URLs #271

@roblinksdata

Description

@roblinksdata

I'm testing out the use of the tech-docs for a project and I'm finding it difficult to use given the tool's expectations about where it's going to be placed on a server.

This issue is in the same vein as alphagov/tech-docs-template#213 and #196, however, I think it would be useful if the project could go a bit further than these suggestions.

It's often the case that people might want to host the same documentation in multiple places for ease of access, or even provide an offline version of said docs for users on air-gapped systems; for these reasons it's not always possible to know at build time exactly where the docs will end up being 'hosted'/stored. I don't believe the generated documentation should have these values baked into them. Ideally I'd like to be able to view and test the HTML docs on our continuous integration and know that the exact same files (without any URL changes) are deployed on 'production'.

I believe it would be much easier to make use of this template if the docs were built with zero knowledge of where they end up being deployed. This could be achieved by the use of relative URLs (think ./images/search-button.png or ../index.html in the case of folders) when including an image, linking to a page inside the same project or using the search functionality.

Unfortunately my team doesn't have the experience with ruby to make this a reality. Would it be possible for someone to implement this change?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions