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

Fixes and improvements. [3] #1175

Merged
merged 12 commits into from
Oct 18, 2016
Merged

Fixes and improvements. [3] #1175

merged 12 commits into from
Oct 18, 2016

Conversation

ivan-nginx
Copy link
Collaborator

@ivan-nginx ivan-nginx commented Oct 17, 2016

Part 1. Language updates and additions.

  1. Added some missed variables in "default" language. Update "en" and "ru" language.
  2. Add "sitemap" link menu in "_config.yml".

Part 2. Descriptions in posts & pages.

  1. Add meta descriptions on posts, if it was defined in post.md.
  2. Add meta descriptions on pages, if it was defined in page.md.
  3. Add titles on pages.

Usage:

example-post.md / example-page.md

---
title: About
description: Description about this site.

---

Descriptions on posts and pages will looks like that:

image

And like that:

image

It's important part of SEO and must be a vision on that parameter.

Titles on defined pages (tags, categories) looks like that:

image

Titles on custom pages (404, about) looks like that:

image

Part 3. Custom layout code.

As we know, theme Next allow to rewrite or add:

  1. Custom css-styles (next/source/css/_custom/custom.styl).
  2. Custom variables (next/source/css/_variables/custom.styl).

It's very good and important implementation for use your own individual blog style and make pulls/merges in global project throw git.

But 1 thing was wrong: before that time, u can't do your custom layout styles (div, span, counters, any scripts). So, i just added custom layout files in layout dir and u can add any html code there. And if file(s) will empty, code will not add.

Usage:

Simply add your html code in themes/next/layout/_custom/sidebar.swig, for example:

<div class="custom-code motion element" style="margin-top: 20px; padding-top: 18px; border-top: 1px dotted #ccc;">

<iframe id="ytplayer" type="text/html" width="215" height="auto" src="https://www.youtube.com/embed/A1Qb4zfurA8" frameborder="0"/>

</div>

image
In sidebar i use custom vision counter codes, like Yandex.

Custom layout files:

  • themes/next/layout/_custom/sidebar.swig
  • themes/next/layout/_custom/header.swig

Also, live demo is always on my site.

1. Update some words.
2. Add translate to "sitemap" menu.
3. Add translate to "modified" post.
1. Add translate to "sitemap" menu.
2. Add translate to "created/modified" post.
3. Add translate to "visitors" post.
1. Add translate to "sitemap" menu.
2. Add translate to "created/modified" post.
1. Show custom titles in "tags" and "categories" pages if titles defined in their *.md files.
2. Include "page-header" to all pages. Show defined titles and descriptions in all custom pages (like "404" or "about").
@ivan-nginx ivan-nginx changed the title Language updates and additions. Fixes and improvements. Oct 17, 2016
@ivan-nginx ivan-nginx changed the title Fixes and improvements. Global fixes and improvements. [2] Oct 17, 2016
@ivan-nginx ivan-nginx changed the title Global fixes and improvements. [2] Fixes and improvements. [2] Oct 17, 2016
@ivan-nginx ivan-nginx changed the title Fixes and improvements. [2] Fixes and improvements. [3] Oct 17, 2016
@iissnan iissnan merged commit 50296a9 into iissnan:5.1.0 Oct 18, 2016
@iissnan
Copy link
Owner

iissnan commented Oct 18, 2016

Great! Awesome enhancements~
Thanks @ivan-nginx

@ivan-nginx
Copy link
Collaborator Author

@iissnan actually, i need more time for remaking descriptions on posts, and i will do it some later.

And, yep, thank's u too for that great template. I was see that u working now for sticky block styles, called jeet, and this is really good and will make all blocks (specailly sidebar) fully responsive.

@iissnan iissnan added this to the v5.1.0 milestone Oct 19, 2016
habren pushed a commit to habren/hexo-theme-next that referenced this pull request Apr 9, 2017
snowyu pushed a commit to snowyu/hexo-theme-next that referenced this pull request Nov 23, 2019
snowyu pushed a commit to snowyu/hexo-theme-next that referenced this pull request Nov 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants