Skip to content

Generate root-relative URLs from Sphinx #105

Open
@smashwilson

Description

@smashwilson

Sphinx assumes that all URLs end with a trailing slash and generates relative URLs accordingly:

<a class="reference internal" href="cloud-interfaces/api/cloudimages-api/#cloudimages-api"><span>Cloud Images and SDKs and APIs</span></a>

These work when you visit the page with a trailing slash, but chop the final path element when you visit it without a trailing slash. Normalize URLs to be less sensitive to this.

Remaining Work

  • Sphinx preparer: Generate content ID references instead of relative URLs in the Sphinx preparer. ([waiting] Generate content ID references instead of relative URLs. preparer-sphinx#27)
  • presenter: Search and replace content ID references in envelope.body.
  • presenter: Handle content IDs in envelope.next and envelope.previous elements.
  • Jekyll preparer: Generate content ID references from all helpers that generate URLs.
  • Jekyll preparer: Generate content IDs instead of relative URLs in next and previous elements.
  • Test URL generation within the userguides to be sure that I didn't mess up anything else.
  • Update deconst documentation to include the updated envelope schema with a contentID element.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions