Exemple #1
0
    cfp_variables,
    'slack_join':
    "https://join.slack.com/t/writethedocs/shared_invite/zt-12k7dh46o-eNMS1sHejK2OiiBfnBf6hw",
    'slack_form':
    "https://docs.google.com/forms/d/e/1FAIpQLSdq4DWRphVt1qVqH8NsjNnS0Szu_NljjZRUvyYqR7mdc00zKQ/viewform?usp=sf_link",
}

if build_videos:

    if os.environ.get('MEETUP_API_KEY'):
        try:
            from _ext.meetup_events import main as meetup_main
            html_context.update(meetup_main())
        except:
            print('Could not get meetup events.')
    html_context.update(videos.main())

notfound_no_urls_prefix = True


def setup(app):
    # Set up our custom jinja filters
    app.connect("builder-inited", add_jinja_filters_to_app)

    # Transform RST with Jinja, using proper context
    app.connect("source-read", render_rst_with_jinja)

    # Adjust html_context properly for datatemplate processing
    app.connect("source-read", set_html_context)
    app.connect("doctree-read", unset_html_context)
Exemple #2
0
# Our additions

html_context = {
    'conf_py_root': os.path.dirname(os.path.abspath(__file__)),
}

if build_videos:
    from _ext.videos import main

    if os.environ.get('MEETUP_API_KEY'):
        try:
            from _ext.meetup_events import main as meetup_main
            html_context.update(meetup_main())
        except:
            print('Could not get meetup events.')
    html_context.update(main())

notfound_no_urls_prefix = True


def setup(app):
    # Set up our custom jinja filters
    app.connect("builder-inited", add_jinja_filters_to_app)

    # Transform RST with Jinja, using proper context
    app.connect("source-read", render_rst_with_jinja)

    # Adjust html_context properly for datatemplate processing
    app.connect("source-read", set_html_context)
    app.connect("doctree-read", unset_html_context)