jekyll and github.io build problems encountered blog

Blog address can be found https://xisynotz.xyz/

1. debugging, does not reflect the modified page

This is because the browser (chrome) cache sake.
1. You can clear the browser cache before commissioning, or ctrl + shift + delete.
2. Forced to refresh the page using ctrl + shift + r to force a refresh, do not use the browser cache to refresh the page.
3. You can also set your browser, check the Disable cache in debugging page.

2. Install jekyll in the windows

Look at the trouble originally installed windows, so use jekyll In ubuntu, installation takes just a sudo apt-get install. But every time the virtual machine feel very convenient, virtual machine up and sometimes also some Caton. We still intend to configure what jekyll in the win.
I did not know anything about this, at first follow a tutorial on the book do Jane ( link: jekyll installed under Windows ), no more than three steps: 1. Install Ruby 2. Installation DevKit 3. Installation Jekyll, talk about experiencing below The problem.
①Ruby official website address: http: //rubyinstaller.org/downloads/ download when there is no progress, start from 0% stuck, so I had to find elsewhere installer (later found seemingly addition to some other speed version can also accept ?)
when ② execution gem install jektll of error, garbled, can not read, check it.

C:\User>gem install jekyll
Temporarily enhancing PATH for MSYS/MINGW...
Building native extensions. This could take a while...
ERROR:  Error installing jekyll:
    ERROR: Failed to build gem native extension.

    current directory: C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser
C:/Ruby25-x64/bin/ruby.exe -r ./siteconf20180308-3672-ueo7ea.rb extconf.rb
creating Makefile

current directory: C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser
 make "DESTDIR=" clean
 'make' �����ڲ����ⲿ���Ҳ���ǿ����еij���
���������ļ���

current directory: C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser
make "DESTDIR="
'make' �����ڲ����ⲿ���Ҳ���ǿ����еij���
 ���������ļ���

 make failed, exit code 1

Gem files will remain installed in C:/Ruby24-x64/bin/ruby_builtin_dlls/Ruby24-x6
4/lib/ruby/gems/2.4.0/gems/http_parser.rb-0.6.0 for inspection.
Results logged to C:/Ruby24-x64/bin/ruby_builtin_dlls/Ruby24-x64/lib/ruby/gems/2
.4.0/extensions/x64-mingw32/2.4.0/http_parser.rb-0.6.0/gem_make.out

It took quite a long time to find a solution . OF also reference oneclick / rubyinstaller2 of  Issue # 98 
③ ② in accordance with the solution, the following input commands in cmd install msys2:

$ ridk install

Even if the results are slow, mainly because every time

error: failed retrieving file 'xxx.db' from [url]

Think about or want to change the image source, Baidu to - to MSYS2 USTC source added , according to a source change, then install the problem is solved.

3.jekyll not a local file preview Chinese

Submitted a blog would like local preview, the results can not be viewed. Rule of thumb is feeling md Chinese name's sake, checked really the case, but reportedly submitted to it can be resolved correctly on github.
One way to find is: modify the installation directory \ Ruby22-x64 \ lib \ ruby \ 2.2.0 \ webrick \ httpservlet filehandler.rb files, it is recommended that you back up. Locate the following two, add a (+ add behavior of a section)

1.

path = req.path_info.dup.force_encoding(Encoding.find("filesystem"))
+ path.force_encoding("UTF-8") # 加入编码
if trailing_pathsep?(req.path_info)

2.

break if base == "/"
+ base.force_encoding("UTF-8") #加入編碼
break unless File.directory?(File.expand_path(res.filename + base))

You modify the re-jekyll serve to support Chinese file name. 
Seem reliable, there is no try, after all, the English name is not strenuous.

4. pictures of different size screen display problems

In fact, my cell phone and pc, the pc just mobile phone to see when the image size will exceed, in fact, is quite simple front-end problem.

<div align='center'><img width="70%" src= "/styles/images/2018-07-05/rwx.png"></div>

<div align='center'><img src= "/styles/images/2018-07-05/rwx.png"></div>

5. a question about the picture can not be displayed

When a local test showed normal, the picture in gitpage damaged, but the image file has been uploaded intact.

Later found .md file referenced using a xxx.png, and the file format itself is xxx.PNG-- name is not the same case.

However, this issue will not be exposed in the local, specific do not know why.

Guess you like

Origin blog.csdn.net/saber_jk/article/details/92700119