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

[waiting] Generate content ID references instead of relative URLs. #27

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

smashwilson
Copy link
Member

Implements the Sphinx preparer part of deconst/deconst-docs#105.

Remaining Work

  • Generate {{ to(target-content-id) }} instead of relative URLs.
  • Generate just the target content ID for next and previous links in the metadata envelope.

@smashwilson
Copy link
Member Author

This will modify the preparer to render nunjucks-ish markup for all Sphinx-generated internal links, and use a contentID element instead of a url element for next and previous navigation:

{
  "toc": "...",
  "layout_key": "default",
  "previous": {
    "contentID": "https://github.com/rackerlabs/docs-core-infra-user-guide/cloud-config/compute/cloud-servers-product-concepts/server-events",
    "title": "Monitoring events on your cloud server"
  },
  "next": {
    "contentID": "https://github.com/rackerlabs/docs-core-infra-user-guide/cloud-config/compute/cloud-images-product-concepts",
    "title": "Understanding Cloud Images"
  },
  "body": "... <li><a class=\"reference internal\" href=\"{{ to('https://github.com/rackerlabs/docs-core-infra-user-guide/cloud-interfaces/gui/cloudservers-gui') }}#cloudservers-gui\"><em>Cloud Servers and the Cloud Control Panel</em></a>...",
  "title": "Actions for Cloud Servers"
}

Notice that URL fragments will still be intact.

🚧 This PR is ready to go, but I can't merge until all of deconst/deconst-docs#105 is ready to 🚢. 🚧

@smashwilson smashwilson changed the title [wip] Generate content ID references instead of relative URLs. [waiting] Generate content ID references instead of relative URLs. Jun 19, 2015
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.

None yet

1 participant