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

Existing favicon gets overwritten #1671

Closed
kjhoerr opened this issue Nov 1, 2018 · 5 comments · Fixed by #1672
Closed

Existing favicon gets overwritten #1671

kjhoerr opened this issue Nov 1, 2018 · 5 comments · Fixed by #1672
Labels

Comments

@kjhoerr
Copy link

@kjhoerr kjhoerr commented Nov 1, 2018

Apart from what the documentation says, any existing favicon gets overwritten when building or serving. This seems to have changed with 1.0.0 - the theme favicon always overwrites the favicon. I'm not using any plugins, and am using the default theme.

DEBUG   -  Loading configuration file: /workdir/mkdocs/mkdocs.yml
DEBUG   -  Loaded theme configuration for 'mkdocs' from '/usr/lib/python2.7/site-packages/mkdocs/themes/mkdocs/mkdocs_theme.yml': {u'hljs_languages': [], u'highlightjs': True, u'search_index_only': False, u'shortcuts': {u'search': 83, u'next': 78, u'help': 191, u'previous': 80}, u'hljs_style': u'github', u'static_templates': [u'404.html'], u'include_search_page': False}
DEBUG   -  Config value: 'site_name' = u'Documentation'
DEBUG   -  Config value: 'extra' = <mkdocs.config.config_options.SubConfig object at 0x7f64dcd77b50>
DEBUG   -  Config value: 'extra_javascript' = []
DEBUG   -  Config value: 'plugins' = PluginCollection([(u'search', <mkdocs.contrib.search.SearchPlugin object at 0x7f64dc792990>)])
DEBUG   -  Config value: 'extra_css' = []
DEBUG   -  Config value: 'config_file_path' = u'/workdir/mkdocs/mkdocs.yml'
DEBUG   -  Config value: 'copyright' = None
DEBUG   -  Config value: 'remote_branch' = u'gh-pages'
DEBUG   -  Config value: 'site_url' = u''
DEBUG   -  Config value: 'use_directory_urls' = True
DEBUG   -  Config value: 'strict' = False
DEBUG   -  Config value: 'theme' = Theme(name='mkdocs', dirs=['/usr/lib/python2.7/site-packages/mkdocs/themes/mkdocs', u'/usr/lib/python2.7/site-packages/mkdocs/templates'], static_templates=[u'404.html',u'ap.xml'], hljs_languages=[], highlightjs=True, search_index_only=False, shortcuts={u'search': 83, u'next': 78, u'help': 191, u'previous': 80}, hljs_style=u'github', include_search_page=False)
DEBUG   -  Config value: 'nav' = [{u'Home': u'index.md'}]
DEBUG   -  Config value: 'docs_dir' = u'/workdir/mkdocs/docs'
DEBUG   -  Config value: 'repo_name' = u''
DEBUG   -  Config value: 'site_dir' = u'/workdir/mkdocs/site'
DEBUG   -  Config value: 'dev_addr' = Address(host=u'127.0.0.1', port=8000)
DEBUG   -  Config value: 'repo_url' = u''
DEBUG   -  Config value: 'remote_name' = u'origin'
DEBUG   -  Config value: 'pages' = None
DEBUG   -  Config value: 'markdown_extensions' = [u'toc', u'tables', u'fenced_code']
DEBUG   -  Config value: 'site_description' = None
DEBUG   -  Config value: 'extra_templates' = []
DEBUG   -  Config value: 'site_author' = None
DEBUG   -  Config value: 'google_analytics' = None
DEBUG   -  Config value: 'mdx_configs' = {}
DEBUG   -  Config value: 'edit_uri' = u''
INFO    -  Cleaning site directory
INFO    -  Building documentation to directory: /workdir/mkdocs/site
DEBUG   -  Reading markdown pages.
DEBUG   -  Copying static assets.
DEBUG   -  Copying media file: 'img/burger.png'
DEBUG   -  Copying media file: 'img/edit-button.png'
DEBUG   -  Copying media file: 'img/favicon.ico'
DEBUG   -  Copying media file: 'img/invitations-tab.png'
DEBUG   -  Copying media file: 'css/base.css'
DEBUG   -  Copying media file: 'css/bootstrap-custom.min.css'
DEBUG   -  Copying media file: 'css/font-awesome.min.css'
DEBUG   -  Copying media file: 'fonts/fontawesome-webfont.eot'
DEBUG   -  Copying media file: 'fonts/fontawesome-webfont.svg'
DEBUG   -  Copying media file: 'fonts/fontawesome-webfont.ttf'
DEBUG   -  Copying media file: 'fonts/fontawesome-webfont.woff'
DEBUG   -  Copying media file: 'fonts/fontawesome-webfont.woff2'
DEBUG   -  Copying media file: 'fonts/glyphicons-halflings-regular.eot'
DEBUG   -  Copying media file: 'fonts/glyphicons-halflings-regular.svg'
DEBUG   -  Copying media file: 'fonts/glyphicons-halflings-regular.ttf'
DEBUG   -  Copying media file: 'fonts/glyphicons-halflings-regular.woff'
DEBUG   -  Copying media file: 'fonts/glyphicons-halflings-regular.woff2'
DEBUG   -  Copying media file: 'img/favicon.ico'
DEBUG   -  Copying media file: 'img/grid.png'
DEBUG   -  Copying media file: 'js/base.js'
DEBUG   -  Copying media file: 'js/bootstrap-3.0.3.min.js'
DEBUG   -  Copying media file: 'js/jquery-1.10.2.min.js'
DEBUG   -  Copying media file: 'search/lunr.js'
DEBUG   -  Copying media file: 'search/main.js'
DEBUG   -  Copying media file: 'search/worker.js'
DEBUG   -  Building theme template: 404.html
DEBUG   -  Building theme template: sitemap.xml
DEBUG   -  Gzipping template: sitemap.xml
DEBUG   -  Building markdown pages.
DEBUG   -  Building page index.md
@waylan
Copy link
Member

@waylan waylan commented Nov 1, 2018

Yep, that's a bug. It appears that the files collection contains two File objects with the same path, one which points to img/favicon.ico in the docs_dir and one which points to img/favicon.ico in a theme dir. We should not be adding the one from the theme dir (here) if such a path already exists in the collection.

@waylan waylan closed this Nov 1, 2018
@waylan waylan added the Bug label Nov 1, 2018
@waylan waylan reopened this Nov 1, 2018
waylan added a commit to waylan/mkdocs that referenced this issue Nov 2, 2018
waylan added a commit to waylan/mkdocs that referenced this issue Nov 2, 2018
waylan added a commit to waylan/mkdocs that referenced this issue Nov 2, 2018
@waylan waylan closed this in #1672 Nov 2, 2018
@tomkralidis
Copy link
Contributor

@tomkralidis tomkralidis commented Feb 14, 2019

Is it possible to get a bugfix release? Having the same issue here w/ 1.0.4

@waylan
Copy link
Member

@waylan waylan commented Feb 14, 2019

@tomkralidis unfortunately, that is not going to speed things up. I can either use my time to finalize the 1.1 release, or to backport the fix and release 1.0.5. I expect either to take about the same amount of time. And as I'm a volunteer who works on this in my spare time, I haven't had any time to devote to this project in some time. Therefore, backporting isn't going to get a fix out any sooner.

@tomkralidis
Copy link
Contributor

@tomkralidis tomkralidis commented Feb 14, 2019

Thanks @waylan for your efforts. A 1.1 release works just as well.

@EdyJ
Copy link

@EdyJ EdyJ commented Oct 17, 2019

Workaround: If you're using custom_dir for overriding specific theme files, simply create an img subdirectory in your custom_dir and copy your favicon.ico file to that directory. That works in 1.0.4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

4 participants