How to write articles with Typora
2019-02-23 21:04 ≈ 2.4kWords ≈ 15Minutes

Note

This article was automatically translated using Google

Wedge

If you want to do your job well, you must first sharpen your tools. As a non-decent programmer who wants code, you must not use IDEA or Sublime IDEs. The ancient Evernote can also be discarded. , Long-term non-support of Markdown is estimated to have indeed lost a lot of users.

Markdown is a markup language that can be written by a common text editor. Through simple markup syntax, it can make common text content have a certain format. The syntax format is very simple. Most people try all the syntax against the list for about ten times. You can get started in about a minute.

As for why use Markdown to code text? It should be said that the most annoying thing about code text is format and typesetting. The average writer has to be distracted while writing, not to say that it cannot be done, but it is very inefficient.

As a person with obsessive-compulsive disorder, seeing this chaotic typesetting, you will definitely be distracted. For example, there are two empty lines here, and the spacing of this paragraph should be reduced. When you are satisfied, your inspiration has disappeared. .

While writing the content, adjusting the format at the same time, with one mind and two purposes. I am very distracted. I just want to focus on the content. What should I do? At this time, there are two choices: 1. Regardless of the form, write to a pile, and then uniformly adjust after writing; 2. Without affecting the writing, add a few simple marks to make the layout of the article you write clearer. And in the future, various formats needed for editing can be generated. The second method is the birth of Markdwon grammar.

The above paragraph can be written like this

While writing the content, adjusting the format at the same time, with one mind and two purposes. I am very distracted. I just want to focus on the content. What should I do?

There are two options at this time:

-Regardless of the form, write to a pile, and then adjust it uniformly after writing;
-Without affecting the writing, by adding a few simple marks, the layout of the articles written by yourself can be made clearer, and various formats required by the editor can be generated in the future. The second method was born Markdwon grammar.

The format of the previous article was not born like this, but the need for paper printing. For example: a paragraph should have two characters blank, no blank lines between paragraphs, and direct quotations are all mixed in a paragraph. These are not for ease of reading, but for saving paper.

In the era of electronic reading, the space of the screen can be infinitely large when scrolling, but compared with paper, the screen hurts our eyes and makes us tired. Therefore, people need clearer typesetting, which is the meaning of Markdown.

##Typora

The choice is not entangled. Although there are many Markdown tools under Mac OS, there are only two that are easy to use. Mou is the most useful and developed by Chinese, but Because it is very popular, the developers thought carefully, announced the new version in advance, and opened a wide range of pre-orders. After a round of money, there will be no more. Currently, the latest version of Mac OS is not supported.

Later, someone in the open source world really couldn’t see it. He developed a new open source App that imitated the function and UI of Mou, which is MacDown, but the technology may not be mature yet. The reason is that MacDown often hangs up for a period of time and requires a forced restart before it can be used again. This is fatal to the programmer. At this time, Typora appeared. , It’s like someone driving a colorful auspicious cloud in the dark to save sentient beings.

Typora has a very high appearance. Unlike the traditional Markdown editor, it does not preview while writing, but what you see is what you get. Check it out on its official website and you will be immediately attracted.

By the way, Typora’s official website is also very good… Apple, that page is really worth seeing

In addition to the basic functions of Mou, Typora also supports many other functions, such as generating directories, syntax shortcuts, etc. It is full of charging temperament, but it is now free!

Take a look at the code display that programmers value most. It supports a variety of mainstream code displays. The following is javascript

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//By bypassing Tencent's https mechanism through cloud functions, request the API of http
wx.cloud.callFunction({
name:'get_Parking_SpotCount',
data: {},
success: function(res) {
var xx = res.result.getParkingSpotCount
var yy = xx.split(":")[2]
//console.log(yy.split("}")[0])
that.setData({
carnumber: yy.split("}")[0]
})
wx.hideLoading()
},
fail: console.error
})

The next step is to talk about the key points. When writing an article, especially when you need to publish the article to a blog, WeChat public account, short book, etc., you will encounter a problem, inserting pictures.

Insert picture

What should we do if we usually need to insert articles?

  1. Get the link address of the picture directly from the Internet as your own picture link (in case the link changes, the picture will not be displayed)
  2. The relative path of the direct local file (in case the blog needs to be shared, naturally others cannot see the picture)
  3. Upload the picture through another platform first, and then copy the link address (the operation is more troublesome)
  4. Of course, you can drag and drop files directly on the short book to the editing interface (but you need to save half of the writing, you always feel uneasy in the cloud)

The optimized solution is:

  1. Use Typora for code text
  2. Use Picture Bed to save pictures
  3. Write the picture address on the picture bed into Typora
  4. After the article is finished, directly copy and paste to the blog, WeChat official account, short book, etc.

It sounds like the steps are very cumbersome, but rest assured, some people have thought of these, so they have developed a picture bed artifact, which can upload pictures through drag and drop, shortcut keys, etc., and supports Weibo, Qiniu, Youpai, and Alibaba Cloud. , Imgur, Flickr, Amazon S3 and other image beds, automatically save Markdown format links, giving you an unprecedented illustration experience.

Re-optimized solution

  1. Use Typora for code text
  2. Copy the picture to the content
  3. After the article is finished, copy and paste it directly to the blog, WeChat official account, short book, etc.

**For example, after setting it up, it only took three seconds to insert the picture above. How do I do it? **

  1. command + control shift + 4 screenshot
  2. command + u upload screenshots to Qiniuyun’s image bed
  3. command + v Paste the syntax commands of Markdown into the article, and you are done!

Qiniu Cloud

Speaking of Qiniu Cloud, it can be regarded as a model of industry conscience. In the early days, it started as a video streaming cloud service. When I was in Shenzhen, I almost cooperated for their streaming media service.

At present, Qiniu Cloud’s object storage and fusion CDN are free as long as they are personally authenticated. Object storage is free of 10GB, uploading unlimited data, CDN’s monthly free data of 10G, and other cloud products are free for limited time Trial, once again emphasized is the conscience of the industry.

PS: There is 20G of free space for enterprise certification, which can be used by companies with tight funds.

Being able to reach the top ten in the cloud service industry, in addition to the technology leader, the vision and mind of the enterprise are more important, and those enterprises that are unable to take advantage of the disadvantages and stand still can only live under the protection of policies.

OK, back to the topic.

  1. Register Qiniu Cloud account
  2. Perform personal real-name authentication, and use Alipay with personal authentication to submit quickly (Ali-a socially responsible technical man)
  3. Create a new storage space
  4. Assign a domain name that is integrated with CDN (if you don’t have a domain name, you can use a temporary domain name, which will be updated every 30 days, so it is recommended to apply for a domain name. If you don’t have your own domain name these days, it’s not embarrassing to say that you are a programmer. Ah, the domain name you registered in Alibaba Cloud can also be used, just need to perform CNAME resolution)

Picture bed tool

Once you have free cloud storage space, you can save your pictures. But if you click upload on the web page every time, and then copy the link to the article, it would be too troublesome, so at this time we need a tool that can automatically upload pictures to our Qiniu cloud storage, and Save the picture address in the clipboard to simplify our operations.

It is also the domestic product image bed artifact IPic. Regardless of screenshots or copying pictures, you can automatically upload and save the link in Markdown format, and paste and insert directly, just like The animation below, drag the image and paste it into the article, it’s that simple, of course, it also supports uploading the image in the clipboard. Just like the two images above, I only need to configure one upload The shortcut keys will do.

but! Yes, but here comes, is such a useful tool free?

Of course not. If you are only for the image bed function, IPic uses Weibo image bed by default, which is a public image bed, and it is indeed usable. If you want to use your own private cloud storage, such as the one mentioned above Qiniu cloud storage, then you need to upgrade the paid version, 60 yuan a year.

It’s not expensive. As a supporter of open source developers, the money is indeed worth spending. The problem is that if it is a one-time buyout of 60 yuan, I think it is worth it. The annual fee is a bit unreasonable, and if you have two Macs , If one is at home and the other is in the company…you know that the hot indie game Taiwu Scroll on Steam is only 68 yuan for permanent use. The development cost of an independent game is of course not the same as that of a swift gadget. Language, but in any case, IPic is indeed the best of the current image bed tools on Mac OS.

The open source world is indeed a turbulent arena. Since some people think that your charges are unreasonable, then some people will jump out to challenge you. As for whether it is worth it or not, the world is in charge of things, [PicGo](https://github.com/Molunerfinn /PicGo/releases) was born in this way. It was developed by a front-end technician who is not familiar with Swift. Therefore, PicGo is implemented using Electron-vue as a development scaffold, which perfectly replicates most of the functions of IPic. , But due to commercial reasons, one of the most convenient functions PicGo cannot be realized, that is, drag the picture directly into Typora, it will trigger IPic to upload automatically and then replace the picture address with the picture bed address. I believe this is the result of the communication between the IPic author and the Typora development team.

The flaws are not concealed, as the author of PicGo wrote in his blog:

At present, PicGo is still a very young project. There are definitely a lot of bugs and lack of functions. So it needs to be continuously improved. I hope you can put forward any comments or suggestions in the process of using it in issues in the project repository~

Upload the article to WeChat official account

At present, the articles edited by Typora can be directly copied into MD and uploaded to the simple book and other places that support markdown syntax, but! The WeChat official account still does not support markdwon syntax. Fortunately, someone in the open source community has already completed this conversion tool, and it is more convenient to use:

Online-markdown This is the source code of the online conversion tool authored by little beard brother, you can Clone it directly and use it after npm install, or you can directly visit online address to use it. I recommend cloning to use it on this machine because there are many people who use it. Sometimes this webpage will get stuck. I encapsulated a Mac OS App with electron, which can be directly used by double-clicking it. It has been shared to Baidu Netdisk, password Yes: kjyh, welcome to download and use.

to sum up

Since 2014, I have always hoped to write something, but every time I turn over an earlier article, I retreat again. My personality is flawed and I am not persistent enough. Recently, there are too many trivial matters, but the code After the development is picked up, I can calm my mind during the development process, so I am very happy to pick up the technology, just like when I was in junior high school, I played the Legend of Jin Yong and the Legend of Sword and Fairy for the first time. Others may focus on the game. , But my gaze is in Heluo Studio.

What kind of great god can make such a game, and what is computer programming?

The times are advancing. When we were doing development, it only took two hours to configure a Java web development environment, plus the import of databases and jar packages.

Now, with Vue on the front end, Springboot on the back end, and template engine on the back end, various bases on the mobile end, as well as small program development SDKs and IDEs, development has become easier and easier, and you can concentrate on business implementation. Like code text, with Markdown syntax and this series of tools, life is really getting better and better.

It’s happier than many people. The technology I love can give me a bite of food, which is great.

OK, finally summarize the tools I used:

-Typora|The best Markdown editor for Mac OS currently
-Qiniu Cloud|The Unicorn of Free Cloud Storage
-IPic|Currently the best image bed tool in the industry
-PicGo|The best free alternative to IPic