Null characters being written to CSS files. #5035

Closed
Ashwinning opened this Issue Jun 26, 2016 · 7 comments

Comments

Projects
None yet
3 participants
@Ashwinning

My css code keeps being overwritten with null characters on running jekyll build.

I am not using sass/scss etc. Just pure css.

Encountering the same issue when I put my css files in the assets folder.

What I am doing :

  • I create a css file, add some code to it.

  • Build

    $ jekyll build
  • And this is what Jekyll outputs to _site/css

    Running on the official Jekyll docker image on Windows 10.


  • I believe this to be a bug, not a question about using Jekyll.
  • I Updated to the latest Jekyll (or) if on Github Pages to the latest github-pages
  • I Read the CONTRIBUTION file at https://jekyllrb.com/docs/contributing/
  • This is a feature request.

  • I am on (or have tested on) _macOS_ 10+
  • I am on (or have tested on) _Debian/Ubuntu_ GNU/Linux
  • I am on (or have tested on) _Fedora_ GNU/Linux
  • I am on (or have tested on) _Arch_ GNU/Linux
  • I am on (or have tested on) _Other_ GNU/Linux
  • I am on (or have tested on) _Windows_ 10+

  • I was trying to install.
  • There is a broken Plugin API.
  • I had an error on Github Pages, and I have not tested locally.
  • I had an error on Github Pages, and Github Support said it was a Jekyll Bug.
  • I had an error on Github Pages and I did not test it locally.
  • I was trying to build.
  • It was another bug.

How to reproduce

  • Run a container with Jekyll from the docker image
 $ docker run jekyll/jekyll
  • Inside the container, at srv/jekyll create a new jekyll project
 $ jekyll new . --force
  • In srv/jekyll/index.html add
<div class="NewDiv">
Some other text.
</div>

between the lines

<h1 class="page-heading">Posts</h1>

and

<ul class="post-list">
  • Add a class called underline to the ul
 <ul class="post-list underline">
  • Now create a css file rules.css at css/rules.css which contains the following
.underline {
    text-decoration: underline;
}

.NewDiv {
    text-align: center;
}
  • Now we build the project
$ jekyll build
  • On building the project, _site/css/rules.css looks like the following
.underline {
    text-decoration: underline;
}

Where the css code for NewDiv at has been replaced with null characters.

@parkr

This comment has been minimized.

Show comment
Hide comment
@parkr

parkr Jun 27, 2016

Member

@envygeeks have you ever seen this before between Windows & Linux (docker)? I can only imagine that the linux newline LF is being represented as NUL by the Docker sync to Windows.

Member

parkr commented Jun 27, 2016

@envygeeks have you ever seen this before between Windows & Linux (docker)? I can only imagine that the linux newline LF is being represented as NUL by the Docker sync to Windows.

@parkr parkr added the undetermined label Jun 27, 2016

@envygeeks

This comment has been minimized.

Show comment
Hide comment
@envygeeks

envygeeks Jun 27, 2016

Contributor

@parkr @Ashwinning I've not seen Docker do anything like that but I do have a few questions that might help me track down where the problem is coming from:

  1. Are you using Native Docker?
  2. OR Are you using Docker through Ubuntu GNU term on Linux?
  3. Are you using Docker Toolbox with Docker Machine?

I noticed a lack of there being anything like docker-machine in there so I assume maybe not but that assumption might be wrong some people create wrappers (I know we do for our Window's users.) The null-characters makes me think that Jekyll isn't even getting a proper copy of the file at all to begin with, which would make that Docker problem (or more or less probably a bug between the native FS and the FS within whatever lays between Docker and Docker Image (if using Ubuntu GNU term in Windows.)

Contributor

envygeeks commented Jun 27, 2016

@parkr @Ashwinning I've not seen Docker do anything like that but I do have a few questions that might help me track down where the problem is coming from:

  1. Are you using Native Docker?
  2. OR Are you using Docker through Ubuntu GNU term on Linux?
  3. Are you using Docker Toolbox with Docker Machine?

I noticed a lack of there being anything like docker-machine in there so I assume maybe not but that assumption might be wrong some people create wrappers (I know we do for our Window's users.) The null-characters makes me think that Jekyll isn't even getting a proper copy of the file at all to begin with, which would make that Docker problem (or more or less probably a bug between the native FS and the FS within whatever lays between Docker and Docker Image (if using Ubuntu GNU term in Windows.)

@Ashwinning

This comment has been minimized.

Show comment
Hide comment
@Ashwinning

Ashwinning Jun 28, 2016

@envygeeks sorry I forgot to mention, I'm using Docker Toolbox with Docker Machine - (Kitematic + Virtualbox).
New to docker here so still learning about it, I'll try to eliminate some more variables to see if I can still replicate the issue outside of Jekyll.
Thanks!

@envygeeks sorry I forgot to mention, I'm using Docker Toolbox with Docker Machine - (Kitematic + Virtualbox).
New to docker here so still learning about it, I'll try to eliminate some more variables to see if I can still replicate the issue outside of Jekyll.
Thanks!

@Ashwinning

This comment has been minimized.

Show comment
Hide comment
@Ashwinning

Ashwinning Jun 28, 2016

@parkr I still got the issue on forcing LF line endings though my IDE and the setting in .gitattributes.

@parkr I still got the issue on forcing LF line endings though my IDE and the setting in .gitattributes.

@parkr

This comment has been minimized.

Show comment
Hide comment
@parkr

parkr Jun 29, 2016

Member

@Ashwinning Are you able to test on another supported platform? I am not sure how to isolate the issue to Docker, Virtualbox, or Jekyll.

Member

parkr commented Jun 29, 2016

@Ashwinning Are you able to test on another supported platform? I am not sure how to isolate the issue to Docker, Virtualbox, or Jekyll.

@envygeeks

This comment has been minimized.

Show comment
Hide comment
@envygeeks

envygeeks Jun 29, 2016

Contributor

It can't be Jekyll. If Jekyll does not behave like that outside of Docker or Virtualbox it's one of those. To isolate it between those you'll need to install Docker Native and see if it still happens. If it does then it's Docker and the ticket will need to go there. If it doesn't then it's probably one of the many many many (literally there are hundreds) of issues that VirtualBox has that has forced Docker to go Native on OS X and Windows.

Contributor

envygeeks commented Jun 29, 2016

It can't be Jekyll. If Jekyll does not behave like that outside of Docker or Virtualbox it's one of those. To isolate it between those you'll need to install Docker Native and see if it still happens. If it does then it's Docker and the ticket will need to go there. If it doesn't then it's probably one of the many many many (literally there are hundreds) of issues that VirtualBox has that has forced Docker to go Native on OS X and Windows.

@parkr

This comment has been minimized.

Show comment
Hide comment
@parkr

parkr Jun 29, 2016

Member

Ok cool, that's what I thought. I'm going to close this but feel free to keep working on the issue if you wish :)

Member

parkr commented Jun 29, 2016

Ok cool, that's what I thought. I'm going to close this but feel free to keep working on the issue if you wish :)

@parkr parkr closed this Jun 29, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment