'Set mkdocs config values'

def append_conf(self, **__):

    user_config = self.load_yaml_config()
    user_docs_dir = user_config.get('docs_dir')
    docs_dir = self.docs_dir(docs_dir=user_docs_dir)
    self.create_index(extension='md')
    user_config['docs_dir'] = docs_dir
    media_url = get_absolute_media_url()
    user_config.setdefault('extra_javascript', []).extend(['readthedocs-data.js', 'readthedocs-dynamic-include.js', ('%sstatic/core/js/readthedocs-doc-embed.js' % media_url)])
    user_config.setdefault('extra_css', []).extend([('%scss/badge_only.css' % media_url), ('%scss/readthedocs-doc-embed.css' % media_url)])
    if (('theme_dir' not in user_config) and self.use_theme):
        user_config['theme_dir'] = TEMPLATE_DIR
    yaml.safe_dump(user_config, open(os.path.join(self.root_path, 'mkdocs.yml'), 'w'))
    docs_path = os.path.join(self.root_path, docs_dir)
    rtd_data = self.generate_rtd_data(docs_dir=docs_dir)
    with open(os.path.join(docs_path, 'readthedocs-data.js'), 'w') as f:
        f.write(rtd_data)
    dynamic_include = self.generate_dynamic_include()
    with open(os.path.join(docs_path, 'readthedocs-dynamic-include.js'), 'w') as f:
        f.write(dynamic_include)
