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

Unnecessary leading empty lines in index.html #2020

Closed
5 tasks done
pwwang opened this issue Oct 28, 2020 · 3 comments
Closed
5 tasks done

Unnecessary leading empty lines in index.html #2020

pwwang opened this issue Oct 28, 2020 · 3 comments
Labels
bug Issue reports a bug needs reproduction Issue lacks a minimal reproduction .zip file

Comments

@pwwang
Copy link

pwwang commented Oct 28, 2020

I've found a bug and checked that ...

  • ... the problem doesn't occur with the default MkDocs template
  • ... the problem is not in any of my customizations (CSS, JS, template)
  • ... the documentation does not mention anything about my problem
  • ... there are no open or closed issues that are related to my problem

Description

Unnecessary leading empty lines in index.html causing 404 in GH pages.

Expected behavior

<!doctype ... should be in the first line of the output HTML files.

Actual behavior

Leading empty lines observed.

Steps to reproduce the bug

  1. mkdocs build
  2. head site/index.html

Package versions

  • Python: python --version 3.7.3
  • MkDocs: mkdocs --version 1.1.2
  • Material: pip show mkdocs-material | grep -E ^Version 6.1.0

Project configuration

site_name: liquidpy
theme:
    name: 'material'
markdown_extensions:
    - markdown.extensions.admonition
    - pymdownx.superfences:
        preserve_tabs: true
    - toc:
        baselevel: 2
extra_css:
    - style.css
nav:
    - 'Home': 'index.md'

And the head of my index.md (no leading empty lines):

# liquidpy
A port of [liquid][1] template engine for python

System information

Also refer to this issue: mkdocs/mkdocs#2180

@pwwang pwwang added the bug Issue reports a bug label Oct 28, 2020
@squidfunk
Copy link
Owner

I see one empty line, when building the official documentation. Interestingly, it's been a long, long time like this and nobody had any problems. I've searched for an example that reproduces your issue and have found only counter examples, e.g.:

https://ing-bank.github.io/baker/

The project is hosted on GitHub pages and has the empty lines at the beginning, yet it doesn't 404:

Bildschirmfoto 2020-10-29 um 10 24 00

@squidfunk squidfunk added the needs reproduction Issue lacks a minimal reproduction .zip file label Oct 29, 2020
@pwwang
Copy link
Author

pwwang commented Oct 29, 2020

Thanks for the investigation.

Let me see if I can create a minimal repo to reproduce this.

@pwwang
Copy link
Author

pwwang commented Oct 29, 2020

I myself could not reproduce it with this minimal repo:

https://github.com/pwwang/mkdocs-material-2020

I am closing this, as the issue is not caused by the theme.

Thank you.

@pwwang pwwang closed this as completed Oct 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue reports a bug needs reproduction Issue lacks a minimal reproduction .zip file
Projects
None yet
Development

No branches or pull requests

2 participants