yulijia / freshman21 Goto Github PK
View Code? Open in Web Editor NEWWelcome to use Jekyll theme Freshman21.
Home Page: http://yulijia.net/freshman21/
License: MIT License
Welcome to use Jekyll theme Freshman21.
Home Page: http://yulijia.net/freshman21/
License: MIT License
permalink: /tags/
in tags.md is mistyped to premalink: /tags/
.
It causes jekyll generates _site/tags.html if _config.yml sets permalink
to some style other than pretty
.
After correcting it, /tags/ will be generated in stead of /tags.html, which is expected and the same style as categories.md.
I found an interesting thing. When I added a markdown file
in the root of my GitHub Pages repo, the title of markdown was placed in the navigation automatically. Besides, all of navigation was placed according to the order of initial character of each words.
My question is, how to custom navigation? Any order, any words?
Thanks!
Sincerely,
Robin
I want to change markdown code highlight to GitHub style, but I don't know how to make it.
Thanks,
Sincerely,
Robin
Different forms of website in Mozilla Firefox and Google Chrome.
At first, they have different fonts.
Secondly, as you can see, there aren't icons under "You can contact me via:" in some case.
This form has your web site http://yulijia.net/freshman21 in Google Chrome:
This form has your web site http://yulijia.net/freshman21 in Mozilla Firefox:
This form has clone of your github project https://github.com/yulijia/freshman21 in Mozilla Firefox:
没看到页面上有对应的图片,去掉了貌似也可以
xx@kami:~/freshman21$ jekyll build --destination /var/www
Configuration file: /home/xx/blog/_config.yml
Source: /home/xx/freshman21
Destination: /var/www/
Incremental build: disabled. Enable with --incremental
Generating...
Conversion error: Jekyll::Converters::Scss encountered an error while converting 'css/main.scss':
Invalid US-ASCII character "\xE3" on line 324
jekyll 3.4.0 | Error: Invalid US-ASCII character "\xE3" on line 324
<div class="sidebar-module">
<h4>{{ site.locales[site.default_locale].Recent_Posts }}</h4>
{% for post in site.posts limit:5 %}
<li>
<a href="{{ site.baseurl }}/{{ post.url }}" title="{{ post.title }}" rel="bookmark">{{ post.title }}</a>
</li>
{% endfor %}
</div>
In the snippet above (Recent_Posts.html
) the {{ post.url }}
already comes with a prepending slash, so the compound `"{{ site.baseurl }}/{{ post.url }}`` gets one extra slash between the baseurl and the post url.
If the baseurl is not empty, the URL still works. If the baseurl is empty, the url won't be interpreted as relative path and the link will be broken.
I clone the code and run [jekyll build], it shows
$ jekyll build
Configuration file: D:/GitHub/richeir.github.io/freshman21/_config.yml
Source: D:/GitHub/richeir.github.io/freshman21
Destination: D:/GitHub/richeir.github.io/freshman21/_site
Incremental build: disabled. Enable with --incremental
Generating...
Conversion error: Jekyll::Converters::Scss encountered an error while converting 'css/main.scss':
Invalid GBK character "\xE3" on line 324
jekyll 3.4.3 | Error: Invalid GBK character "\xE3" on line 324
As I understand, in the file _layouts/page.html
you apply class "about" to all "page"s:
<article class="post-content about">
{{ content }}
</article>
And in case I would like to add new page, for example, "Collections.md" with some images, then all images are in a circle.
I delete "about" in the file _layouts/page.html
:
<article class="post-content">
{{ content }}
</article>
and in case if I would like to make image in circle, like in your example in http://yulijia.net/freshman21/about, I add new class in _sass/_layout.scss
:
.img-about
{
height: 128px;
width: 128px;
border-radius:50%;
margin: 0 auto;
display: block;
}
And in 2_about.md
use markdown syntax:
![麋鹿](https://i.imgur.com/Mdc4szJl.jpg){: .img-about}
Maybe there is more elegant solution for this problem.
Hello!
Many thanks for the neat and useful theme for Jekyll. For me it turned out to be one of the best! I’m not a web programmer, but still would like to express some of my preferences with respect to the theme.
I would like to suggest an improvement to the theme localisation, adding the opportunity to change "Read more"
For example, in the file /index.html
change the line
<p style="text-align: right"><a href="{{ post.url | prepend: site.baseurl }}">Read more</a></p>
to
<p style="text-align: right"><a href="{{ post.url | prepend: site.baseurl }}">{{ site.locales[site.default_locale].ReadMore }}</a></p>
And to the file /_config.yml
add a variable to each language:
en:
ReadMore: "Read more"
ru:
ReadMore: "Читать далее" (one of "Далее", "Читать дальше", "Читать далее", "Подробнее")
Additionally, in my view, russian localisation is not translated quite correctly
Google_search: "Поиск на Google"
I would change to Google_search: "Поиск по сайту"
Recent_Posts: "Свежие посты"
I would change to Recent_Posts: "Свежие записи"
Taggedwith: "с тегами"
I would change to Taggedwith: "с метками"
Tags: "Теги"
I would change to Tags: "Метки"
Here we have examples of translation of a few terms into russian: https://codex.wordpress.org/Вниманию_переводчиков
"Теги" and "Посты" - this is anglicism (words taken from english), which have the following equivalents "Метки" and "Записи".
On the main page, a multiple option should be present:
Previous: "Предыдущие записи"
, instead of Previous: "Предыдущий пост"
Next: "Следующие записи"
, and not Next: "Следующий пост"
In the case of freestanding posts, it should be just:
Previous: "Предыдущая запись"
Next: "Следующая запись"
Here, perhaps, it would be convenient to introduce separate parameters for Previous and Next, for example:
PreviousPost: "Предыдущие записи"
NextPost: "Следующие записи"
PreviousPage: "Предыдущая запись"
NextPage: "Следующая запись"
Alternatively you can use a "universal" (more general) translation:
Previous: "Назад"
Next: "Вперёд"
But in my view this isn’t very elegant.
I think it would be a good idea to localise the publication date as well. For example like here:
In the file index.html
I changed
<time itemprop="datePublished" datetime="{{ post.date | date: '%Y-%m-%d' }}">
{{ site.locales[site.default_locale].PostDate }}{{ post.date | date: "%b %-d, %Y" }}
</time>
to
<time itemprop="datePublished" datetime="{{ post.date | date: '%Y-%m-%d' }}">
{{ site.locales[site.default_locale].PostDate }}
{% if site.locales[site.default_locale].months %}
{% case site.default_locale %}
{% when 'ru' %}
{{ post.date | date: "%-d" }}
{% assign month = post.date | date: '%-m' %}
{% case month %}
{% when '1' %} {{ site.locales[site.default_locale].months.January }}
{% when '2' %} {{ site.locales[site.default_locale].months.February }}
{% when '3' %} {{ site.locales[site.default_locale].months.March }}
{% when '4' %} {{ site.locales[site.default_locale].months.April }}
{% when '5' %} {{ site.locales[site.default_locale].months.May }}
{% when '6' %} {{ site.locales[site.default_locale].months.June }}
{% when '7' %} {{ site.locales[site.default_locale].months.July }}
{% when '8' %} {{ site.locales[site.default_locale].months.August }}
{% when '9' %} {{ site.locales[site.default_locale].months.September }}
{% when '10' %} {{ site.locales[site.default_locale].months.October }}
{% when '11' %} {{ site.locales[site.default_locale].months.November }}
{% when '12' %} {{ site.locales[site.default_locale].months.December }}
{% endcase %}
{{ post.date | date: "%Y" }}
{% else %}
{{ post.date | date: "%b %-d, %Y" }}
{% endcase %}
{% else %}
{{ post.date | date: "%b %-d, %Y" }}
{% endif %}
</time>
and in the file _layouts/post.html
I changed
<time itemprop="datePublished" datetime="{{ page.date | date: '%Y-%m-%d' }}">
{{ site.locales[site.default_locale].PostDate }}{{ page.date | date: "%b %-d, %Y" }}
</time>
to
<time itemprop="datePublished" datetime="{{ page.date | date: '%Y-%m-%d' }}">
{{ site.locales[site.default_locale].PostDate }}
{% if site.locales[site.default_locale].months %}
{% case site.default_locale %}
{% when 'ru' %}
{{ page.date | date: "%-d" }}
{% assign month = page.date | date: '%-m' %}
{% case month %}
{% when '1' %} {{ site.locales[site.default_locale].months.January }}
{% when '2' %} {{ site.locales[site.default_locale].months.February }}
{% when '3' %} {{ site.locales[site.default_locale].months.March }}
{% when '4' %} {{ site.locales[site.default_locale].months.April }}
{% when '5' %} {{ site.locales[site.default_locale].months.May }}
{% when '6' %} {{ site.locales[site.default_locale].months.June }}
{% when '7' %} {{ site.locales[site.default_locale].months.July }}
{% when '8' %} {{ site.locales[site.default_locale].months.August }}
{% when '9' %} {{ site.locales[site.default_locale].months.September }}
{% when '10' %} {{ site.locales[site.default_locale].months.October }}
{% when '11' %} {{ site.locales[site.default_locale].months.November }}
{% when '12' %} {{ site.locales[site.default_locale].months.December }}
{% endcase %}
{{ page.date | date: "%Y" }}
{% else %}
{{ page.date | date: "%b %-d, %Y" }}
{% endcase %}
{% else %}
{{ page.date | date: "%b %-d, %Y" }}
{% endif %}
</time>
also I added to _config.yml
:
months:
January: "января"
February: "февраля"
March: "марта"
April: "апреля"
May: "мая"
June: "июня"
July: "июля"
August: "августа"
September: "сентября"
October: "октября"
November: "ноября"
December: "декабря"
Also it would be good to localise the heading “Table of Contents” which is written in the file "_sass/_layout.scss":
#markdown-toc:before{
content:"Table of Contents";
In russian it would be:
#markdown-toc:before{
content:"Содержание";
Ap categories.md and tags.md, creating post links with {{site.url}} always direct the link to external website.
In the situation that user would like to preview posts at localhost, change {{site.url}} to {{site.baseurl}} helps to make the theme work at both localhost and remote server.
Adding 404 page to website is common sense, and this is useful for user experience. We are lucky that GitHub provides 404 page. But I want to custom 404 page, how to implement it? By the way, I tried to add custom 404 page by adding 404.md
file, but the title of this file(Page Not Found) was placed in the navigation automatically, this is so bad, so I remove it.
Thanks!
Sincerely,
Robin
I used So Simple Theme
before and I changed it to your theme yesterday. But I found a problem which worked well before. I added Back to Top feature by myself. The operations are follows:
Step 1, placed custom java script of backing to top feature. This java script can be shown at: http://git.io/xX5b
Step 2, added scroll up image
, and this image can be obtained at: http://git.io/xXdk
Step 3, added custom div at footer.html
, the code is follows:
<script src="/assets/js/vendor/jquery-1.9.1.min.js"></script>
<script src="/assets/js/totop.js"></script>
<footer class="site-footer">
<div id="totop" style="position:fixed;bottom:150px;right:50px;cursor: pointer;">
<a title="Back To Top"><img src="/images/scrollup.png"/></a>
</div>
</footer>
After this three steps, the custom feature of backing to top finished. But it didn't work. It shown when I open any pages of my website, and when I click the scroll up image, nothing happened.
I am not familiar with java script, could you please help me? Thanks.
Sincerely,
Robin
Hi, there. I dig out a problem which troubles me.
Categories of my blog:
tree _posts/ | more
_posts/
├── Linux
│ ├── xxx.md
│ └── xxx.md
├── MySQL
│ ├── xxx.md
│ └── xxx.md
├── Other
│ ├── xxx.md
│ └── xxx.md
└── Python
├── xxx.md
└── xxx.md4 directories, 121 files
But it displays in the page as follows:
I want to make the category of my blog case sensitive, like Linux, MySQL, Other, Python etc. How to make it? Thanks.
Sincerely,
Robin
It seems, that conditional operator is unnecessary in _includes/footer.html
:
{% if site.github_username %}
<a href="https://github.com/">Github</a>
{% else %}
GitHub
{% endif %}
That's enough:
<a href="https://github.com/">GitHub</a>
Can't build this theme on Jekyll because of this error:
Could not locate Gemfile
Thanks for you excellent work.
I discovered a typo. When we express some post which published lately, we use recent posts
, not resent.
All typo of resent are follows:
grep -rn Resent ./*
./_config.yml:33: Resent_Posts: "Resent Posts"
./_config.yml:46: Resent_Posts: "近期文章"
./_includes/Resent_Posts.html:2:{{ site.locales[site.default_locale].Resent_Posts }}
./_includes/sidebar.html:4:{% include Resent_Posts.html %}
./_posts/2014-12-19-freshman21-structure.md:44:│ ├── Resent_Posts.html # right column sidebar content
./_posts/2014-12-19-freshman21-structure.md:102:│ ├── Resent_Posts.html
./_posts/2014-12-19-how-to-set-the-config-file.md:77: {% include Resent_Posts.html %}
I am looking forward to fix this typo. Thanks.
Sincerely,
Robin
Thanks for adding Google search feature. I've tried to add full-text search feature via jekyll-lunr-js-search
, but failed. Jekyll by GitHub don't support this plugin.
I add Goole search by myself according to your code. But it didn't work properly. I add hidden form parameter which is called site, yet I input search content, the results that provided by Google did't display the content of my own website. That is to say, the hidden form parameter site did't accept by Google search url.
I'm looking forward to fix this bug. Thanks.
Robin
I add Google Analytics
by tutorial(See at: http://t.cn/RwR2q7P), But it didn't work. Because I could not see any data from this custom feature. How to fix it? Thanks.
Sincerely,
Robin
Hi, I am new to jekyll and really enjoying your theme. But I've face some problem when trying to jekyll serve
the template on localhost and the following message showed.
Conversion error: Jekyll::Converters::Scss encountered an error while converting 'blog/css/main.scss':
File to import not found or unreadable: base. on line 53
jekyll 3.8.5 | Error: File to import not found or unreadable: base. on line 53
Do you have any idea how to fix it?
I tried to update font size of my website, and I updated this font size: title of site, link of post and title of post. But I am in a puzzle about font size of post content
. Thanks.
Sincerely,
Robin
Your theme has been listed on http://jekyllthemes.ru/
I am looking forward to add search feature, thanks. Of course, I will try it by myself.
Sincerely,
Robin
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.