How to use Gitblog and markdown to build your own blog, gitblogmarkdown_php tutorial

Source: Internet
Author: User

How to use Gitblog and markdown to build your own blog, Gitblogmarkdown


Below to share with you how to use Gitblog and markdown to build their own blog, how everyone has a server or cloud platform provided by the cloud host, I recommend you use linux+ Nginx to run the Gitblog, if we are only Apache environment is also possible.

Domain Name resolution

Resolve your prepared domain name to your host IP, it is recommended to use Dnspod to manage and monitor your domain name, the specific use method reference Dnspod official documentation, very simple.

nginx+php Operating Environment

First of all install your nginx and PHP environment, PHP version requires more than 5.3. If you haven't installed it, you can search for tutorials on Google, or you can refer to Nginx and the official PHP documentation. This is the first step, there is a normal nginx + PHP operating environment.

Configure Nginx

Nginx can refer to the following configuration:

server {listen    ; server_name jockchou.gitblog.cn; root/data/vhosts/jockchou.gitblog.cn; index index.html Index.htm index.php; Location ~ \. (Jpg|png|gif|js|css|swf|flv|ico) $ {   expires 12h;} location/{  if (!-e $request _filename) {     rewrite ^ (. *) $/ Index.php?$1 last;     break;  } ~* ^/(Doc|logs|app|sys)/{  return 403;} location ~ *\. ( PHP|PHP5)? $ {  fastcgi_connect_timeout;  Fastcgi_send_timeout;  Fastcgi_read_timeout;  Fastcgi_pass  127.0.0.1:9000;  Fastcgi_index index.php;  Fastcgi_param script_filename $document _root$fastcgi_script_name;  Include Fastcgi_params; }}

Change the server_name and root in the above configuration to your own, fastcgi_pass to your CGI process port.

Permissions Configuration

Since the Gitblog caching mechanism requires writing the App/cache directory, please review and modify the permissions of this directory if necessary to ensure that your PHP has permission to write this directory. Usually you only need to modify the owner and group of this directory into a CGI run account.

Run

After the above configuration, start your nginx and CGI services, upload gitblog source code to the site directory, through the browser to access the domain name to the local view page effect. If the page does not display properly, check your CGI and Nginx configuration with the error code.

Gitblog Introduction

I. INTRODUCTION

Gitblog is a simple and easy-to-use Markdown blog system, it does not need a database, no management background functions, update blog only need to add your written markdown files can be. It is out of the online editor layout difficulties, not real-time preview of the shortcomings, all to markdown to complete, a blog is a markdown file. Also supports comments, code highlighting, mathematical formulas, page PV statistics and other commonly used functions. Gitblog offers different theme styles that you can configure according to your preferences, which is also very easy if you want to create your own blog theme. Gitblog also supports static export of the entire station, you can fully export the entire station static page deployment to GitHub pages.

Two. Functional characteristics

Using Markdown
Comment Box
Code highlighting
PV statistics
Latex Mathematical formula
Homemade Themes
Response type
Full station static export
Good SEO
Three. Gitblog Advantages

No database, lighter system, easier porting
Use Markdown to write, get rid of the background editing typesetting difficulties, unable to preview the shortcomings of real-time
Full station static export
Flexible configuration, free to switch some functions
Multi-theme support, self-made themes
Blogs, categories, tags, archives
Four. Environmental requirements

PHP 5.2.4+

Five. Installation steps

Download Gitblog Source code
Unzip upload to your PHP website root directory
Open your browser and visit the homepage
Uploading markdown files to the posts folder

The above is how to use Gitblog and markdown to build their own blog of all the content, I hope you can enjoy.

http://www.bkjia.com/PHPjc/1041329.html www.bkjia.com true http://www.bkjia.com/PHPjc/1041329.html techarticle How to use Gitblog and markdown to build their own blog, Gitblogmarkdown below to share with you how to use Gitblog and markdown to build their own blog, how everyone has a server or cloud platform ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.