

def begin_site(self):
    'Event hook for when site processing begins.\n\n        This hook checks that the site is correctly configured for building\n        with sphinx, and adjusts any sphinx-controlled resources so that\n        hyde will process them correctly.\n        '
    settings = self.settings
    if settings.sanity_check:
        self._sanity_check()
    suffix = self.sphinx_config.get('source_suffix', '.rst')
    for resource in self.site.content.walk_resources():
        if resource.source_file.path.endswith(suffix):
            new_name = (resource.source_file.name_without_extension + '.html')
            target_folder = File(resource.relative_deploy_path).parent
            resource.relative_deploy_path = target_folder.child(new_name)
            if settings.block_map:
                resource.meta.default_block = None

dataset/ETHPy150Open hyde/hyde/hyde/ext/plugins/sphinx.py SphinxPlugin.begin_site/original