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

Navigation broken #1

Closed
probonopd opened this issue Nov 25, 2020 · 1 comment
Closed

Navigation broken #1

probonopd opened this issue Nov 25, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@probonopd
Copy link
Member

readthedocs/recommonmark#214

@probonopd probonopd added the bug Something isn't working label Nov 25, 2020
@probonopd
Copy link
Member Author

With

github_doc_root = 'https://' + os.environ['GITHUB_REPOSITORY'].split("/")[0] + '.github.io/' + os.environ['GITHUB_REPOSITORY'].split("/")[1] + '/'
def setup(app):
    app.add_config_value('recommonmark_config', {
            'enable_auto_toc_tree': True,
            'url_resolver': lambda url: github_doc_root + url,
            'auto_toc_tree_section': 'Contents',
            }, True)
    app.add_transform(AutoStructify)

the following works:

## Contents

* [hello](index.md)
* [Acknowledgements](acknowledgements.md)

Documentation issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant