Posted in tools with : productivity
Contents:
This post is not for how to deploy the environment of writing posts in github pages, but how to use the environment you deployed before.
Assuming that you have deployed the following tools:
In Local:
In Remote:
use MarkdownPad in windows or Macdown in mac to open the md file you created, and put the yaml title on the top as follows (Note: three dashes at the top and bottom):
---
layout: default
comments: true
category: choose only one from /data/categories.yml
tags: [tag1, tag2, …, tagn] choose from /_data/tags.yml
title: How to write post in github pages
---
If you don’t have a local MarkdownPad, you can use online tools to edit the md file, like stackedit, a very powerful one. Five star recommended O(∩∩)O~!
For an alternative, you can using your local Jekyll to start a server and test the post you wrote. To do this:
If we want to add a new tag “java” into our blog, we should:
add the following content into the new file:
---
layout: blog_by_tag
tag: java
permalink: /blog/tag/java/
---
add the following content into tags.yml file (NOTE the indent and spaces):
- slug: java
name: java
For “category”, it is similar.
Improve Code Highlighting in a Jekyll-based Blog Site
1 <head>
2 ...
3 <link href="/css/syntax.css" rel="stylesheet">
4 ...
5 </head>
{\% highlight objc linenos \%}
and {\% endhighlight \%}
Liquid tags, Jekyll will (via Pygments highlighter) output color highlighted code based on chosen language scheme (e.g. objc in my case).There is a problem here: when you select code, the line numbers are also selected. There are two ways to solve this:
linenos=table
instead of linenos
in the directive {\% highlight objc linenos \%}
. The table may look ugly. 1 // hide line numbers in code pieces right before we copy the code
2 $(document).ready(function () {
3 $("code").bind("copy", function () {
4 var innerHtml = this.innerHTML;
5 $(this).find('.lineno').remove();
6 var that = this;
7 setTimeout(function(){
8 $(that).children().remove();
9 that.innerHTML = innerHtml;
10 },0);
11 });
12 });
Refer here.
Google crawls and ranks websites partially based on links to it from other websites. You should consider submitting it to some award websites, show-and-tells, etc to increase the value of the domain.
It can take a few days to a few months to be indexed, depending on several factors. It’s recommended that you use the submit URL tool, which may help speed up this process.
I tried the submit URL tool, and after hald day, my blogs can be searched in google. But you should use exactly the same words in your post to search, or your post may be very behind, as the value of your domain is very low.
To insert the image, just use the path under the base url, for me, it is */GitBlogs/images/
![image annotation](/GitBlogs/images/001_ios_frameworks.png)