예제 #1
0
def setup(app: Sphinx):
    """Set up function called by Sphinx."""
    app.add_builder(RevealjsHTMLBuilder)
    app.add_node(
        revealjs_section, html=(not_write, not_write), revealjs=(not_write, not_write)
    )
    app.add_node(
        revealjs_break,
        html=(not_write, not_write),
        revealjs=(visit_revealjs_break, depart_revealjs_break),
    )
    app.add_node(
        revealjs_slide, html=(not_write, not_write), revealjs=(not_write, not_write)
    )
    app.add_node(
        revealjs_fragments, html=(not_write, not_write), revealjs=(not_write, not_write)
    )
    app.add_directive("revealjs_break", RevealjsBreak)
    app.add_directive("revealjs_section", RevealjsSection)
    app.add_directive("revealjs_slide", RevealjsSlide)
    app.add_directive("revealjs_fragments", RevealjsFragments)
    app.add_config_value("revealjs_static_path", [], True)
    app.add_config_value("revealjs_style_theme", "black", True)
    app.add_config_value("revealjs_css_files", [], True)
    app.add_config_value("revealjs_google_fonts", [], True)
    app.add_config_value("revealjs_generic_font", "sans-serif", True)
    app.add_config_value("revealjs_script_files", ["revealjs/js/reveal.js"], True)
    app.add_config_value("revealjs_script_conf", None, True)
    app.add_config_value("revealjs_script_plugins", [], True)
    app.add_html_theme("sphinx_revealjs", str(get_theme_path("sphinx_revealjs")))
    return {
        "version": __version__,
        "env_version": 1,
        "parallel_read_safe": False,
    }
예제 #2
0
def setup(app: Sphinx):
    """Set up function called by Sphinx."""
    app.add_builder(RevealjsHTMLBuilder)
    app.add_node(
        revealjs_section,
        html=(not_write, not_write),
        revealjs=(not_write, not_write))
    app.add_node(
        revealjs_break,
        html=(not_write, not_write),
        revealjs=(visit_revealjs_break, depart_revealjs_break))
    app.add_node(
        revealjs_slide,
        html=(not_write, not_write),
        revealjs=(not_write, not_write))
    app.add_node(
        revealjs_fragments,
        html=(not_write, not_write),
        revealjs=(not_write, not_write))
    app.add_directive('revealjs_break', RevealjsBreak)
    app.add_directive('revealjs_section', RevealjsSection)
    app.add_directive('revealjs_slide', RevealjsSlide)
    app.add_directive('revealjs_fragments', RevealjsFragments)
    app.add_config_value('revealjs_theme', 'sphinx_revealjs', True)
    app.add_config_value('revealjs_theme_options', {}, True)
    app.add_html_theme(
        'sphinx_revealjs', str(get_theme_path('sphinx_revealjs')))
    return {
        'version': __version__,
        'env_version': 1,
        'parallel_read_safe': False,
    }
예제 #3
0
def setup(app: Sphinx):
    """Set up function called by Sphinx."""
    if sys.version_info.minor <= 7:
        logger.info(
            "NOTICE: New features of ver-2.x will be possibility to support not-fully for python 3.6"  # noqa
        )
    app.connect("config-inited", inherit_extension_nodes)
    # After convert_html_js_files
    app.connect("config-inited", convert_reveal_js_files, priority=810)
    app.connect("config-inited", notify_deprecated_config)
    app.add_builder(RevealjsHTMLBuilder)
    app.add_builder(DirectoryRevealjsHTMLBuilder)
    app.add_node(
        revealjs_section, html=(not_write, not_write), revealjs=(not_write, not_write)
    )
    app.add_node(
        revealjs_break,
        html=(not_write, not_write),
        revealjs=(visit_revealjs_break, depart_revealjs_break),
    )
    app.add_node(
        revealjs_slide, html=(not_write, not_write), revealjs=(not_write, not_write)
    )
    app.add_node(
        revealjs_fragments, html=(not_write, not_write), revealjs=(not_write, not_write)
    )
    # TODO: Remove undersocored directives by v2.0.0
    app.add_directive("revealjs_break", RevealjsBreak)
    app.add_directive("revealjs_section", RevealjsSection)
    app.add_directive("revealjs_slide", RevealjsSlide)
    app.add_directive("revealjs_fragments", RevealjsFragments)
    app.add_directive("revealjs-section", RevealjsSection)
    app.add_directive("revealjs-break", RevealjsBreak)
    app.add_directive("revealjs-slide", RevealjsSlide)
    app.add_directive("revealjs-fragments", RevealjsFragments)
    app.add_directive("revealjs-code-block", RevealjsCodeBlock)
    app.add_config_value("revealjs_use_section_ids", False, True)
    app.add_config_value("revealjs_static_path", [], True)
    app.add_config_value("revealjs_style_theme", "black", True)
    app.add_config_value("revealjs_js_files", [], True)
    app.add_config_value("revealjs_css_files", [], True)
    app.add_config_value("revealjs_google_fonts", [], True)
    app.add_config_value("revealjs_generic_font", "sans-serif", True)
    app.add_config_value("revealjs_script_files", [], True)
    app.add_config_value("revealjs_script_conf", None, True)
    app.add_config_value("revealjs_script_plugins", [], True)
    app.add_html_theme("sphinx_revealjs", str(get_theme_path("sphinx_revealjs")))
    return {
        "version": __version__,
        "env_version": 1,
        "parallel_read_safe": False,
    }
예제 #4
0
def setup(app: Sphinx):
    app.add_builder(RevealjsHTMLBuilder)
    app.add_node(revealjs_section,
                 html=(not_write, not_write),
                 revealjs=(not_write, not_write))
    app.add_node(revealjs_slide,
                 html=(not_write, not_write),
                 revealjs=(not_write, not_write))
    app.add_directive('revealjs_section', RevealjsSection)
    app.add_directive('revealjs_slide', RevealjsSlide)
    app.add_config_value('revealjs_theme', 'sphinx_revealjs', True)
    app.add_config_value('revealjs_theme_options', {}, True)
    app.add_html_theme('sphinx_revealjs',
                       str(get_theme_path('sphinx_revealjs')))
    return {
        'version': __version__,
        'env_version': 1,
        'parallel_read_safe': False,
    }