All Projects → zhangximufeng → Vuepress Theme Mufeng

zhangximufeng / Vuepress Theme Mufeng

Licence: mit
a blog for vuepress theme https://zhangximufeng.github.io

Projects that are alternatives of or similar to Vuepress Theme Mufeng

Nabo
Nabo (納博) - dead simple blog engine
Stars: ✭ 103 (-7.21%)
Mutual labels:  blog
Vue Blog Index
laravel+vue 个人博客,项目地址:http://www.golang365.com
Stars: ✭ 107 (-3.6%)
Mutual labels:  blog
Benbalter.github.com
The personal website of Ben Balter. Built using Jekyll and GitHub Pages. See humans.txt for more infos.
Stars: ✭ 109 (-1.8%)
Mutual labels:  blog
Teahouse Wordpress Theme
🍵 Wordpress blog theme Teahouse
Stars: ✭ 104 (-6.31%)
Mutual labels:  blog
Blog
Lightweight self-hosted facebook-styled PHP blog.
Stars: ✭ 106 (-4.5%)
Mutual labels:  blog
Startblog
Startblog is a simple Markdown blog system based on the CodeIgniter!
Stars: ✭ 107 (-3.6%)
Mutual labels:  blog
Viki
A simple Wiki page in Markdown from notebook of VNote.
Stars: ✭ 103 (-7.21%)
Mutual labels:  blog
Alenqi.github.io
🏠 this is my blog
Stars: ✭ 110 (-0.9%)
Mutual labels:  blog
Yanhaijing.github.io
知名技术博主,开源达人,《React状态管理与同构实战》作者,颜海镜的个人博客
Stars: ✭ 106 (-4.5%)
Mutual labels:  blog
Spring Blog
Spring Boot base Blog
Stars: ✭ 109 (-1.8%)
Mutual labels:  blog
Weblorg
Static Site Generator for Emacs
Stars: ✭ 103 (-7.21%)
Mutual labels:  blog
Liweimin1996.github.io
Min's blog 欢迎访问我的博客主页!(Welcome to my blog website !)https://liweimin1996.github.io/ 百度云资源持续更新中,欢迎点赞star
Stars: ✭ 106 (-4.5%)
Mutual labels:  blog
Flatpress
FlatPress is a lightweight, easy-to-set-up flat-file blogging engine.
Stars: ✭ 107 (-3.6%)
Mutual labels:  blog
Ashen Blog
使用koa 2 + vue 2搭建自己的博客系统
Stars: ✭ 104 (-6.31%)
Mutual labels:  blog
Blog With Github Boilerplate
这是博客文章《完全用 GitHub 写博客》所提出流程的示例仓库。
Stars: ✭ 110 (-0.9%)
Mutual labels:  blog
Ghost Azure
Production ready Ghost for Azure 👻
Stars: ✭ 103 (-7.21%)
Mutual labels:  blog
Tableless
O site do Tableless em Hugo. Mais leve, impossível.
Stars: ✭ 107 (-3.6%)
Mutual labels:  blog
Wujunchuan.github.io
John Trump's personal blog in issues
Stars: ✭ 110 (-0.9%)
Mutual labels:  blog
Spring Boot Examples
🥗​ Spring/SpringBoot/SpringCloud 实践学习案例,从入门到精通,持续更新中,欢迎交流学习🍺 !
Stars: ✭ 110 (-0.9%)
Mutual labels:  blog
Wordpress App With Flutter
Fully Functional IOS/Android App for WordPress Website with Flutter
Stars: ✭ 109 (-1.8%)
Mutual labels:  blog

vuepress-theme-mufeng

我的博客

Installation

yarn add vuepress-theme-mufeng -S

or with npm

npm install vuepress-theme-mufeng --save-dev

Article

Render an overview of the article To generate a preview of the post on the cards, use excerpt by adding <!-- more --> after the first paragraph or first few introductory lines in your post.

## What is Vue.js -
In this post I will talk about Vue.js
<!-- more -->
Vue.js is awesome

As in the above form, adding the <!-- more --> tag to the md file, will render the content before this tag into the articles list as their preview.

Articles meta-data

Use mufengblog shell to generate a new post with automatic date-time stamp, title and metadata etc. this helps the cards to sort according to date automatically, also filter the posts by tags etc.

install shell with

yarn global add mufengblog-shell

and then from your project's root dir, run

mufengblog post -p <post-name> --page README.md

like if your post is named javascript, just run

mufengblog post -p javascript --page README.md

this will create a folder called javascript and a README.md file in it with required data automatically. You can then make changes to this file like changing the title and metadata, tags etc.

title: Article title
# date is used for article sorting
date: 2017-08-15 10:27:26
tag: # Article tag, can be a String or an Array
  - js
  - react
# Meta tags that can be used to crawl by search engines
meta:
  - name: description
    content: Some description about your post
  - name: keywords # keywords Tags, will be queried when searching within pages
    content: theme vuepress

To let the theme filter by tags, add the following information alongside your previous themeConfig in config.js inside .vuepress folder

tags

module.exports = {
  themeConfig: {
    tags: true,
    nav: [
      { text: 'TAGS', link: '/tags/', tags: true }
    ]
  }
}

the above configuration let's theme know that TAGS field in the navbar is specifically for browsing tags from posts. When you visit the above path, it looks like following:

Comment System

Use gitalk for comment system, click gitalk for more details.

But, don't support flipMoveOptions and render instane method

Configuration

For your reference, I have put the configuration of my blog (.vuepress/config.js) here:

module.exports = {
  // Enable custom themes
  theme: 'mufeng',
  title: 'mufeng',
  description: 'vuepress theme mufeng',
  head: [
      ['link', { rel: 'icon', href: `/favicon.ico` }]
  ],
  port: 3000,
  // Google Analytics ID
  ga: 'xxxxx',
  // PWA support
  serviceWorker: true,
  // fuck IE
  evergreen: true,
  markdown: {
    // markdown-it-anchor options
    anchor: { permalink: true },
    // markdown-it-toc options
    toc: { includeLevel: [1, 2] },
    config: md => {
      md.use(require('markdown-it-task-lists')) // a checkbox TODO List plugin
        .use(require('markdown-it-imsize'), { autofill: true }) // Support for custom md image size ![test](image.png =100x200)
    }
  },
  // Yubisaki theme specific configuration
  themeConfig: {
    // Blog background image
    background: '/background/path',
    tags: true,
    // github card
    github: 'github username',
    // favicon image (logo)
    logo: '/logo/path',
    // Custom article title color
    accentColor: '#ac3e40',
    // Number of articles displayed per page
    per_page: 5,
    // The time format for creating an article. If not set, it will not be displayed. Optional [yyyy-MM-dd HH:mm:ss]
    date_format: 'yyyy-MM-dd',
    // options for comment (gitalk), don't support flipMoveOptions and render instane method
    comment: {
      clientID: 'GitHub Application Client ID',
      clientSecret: 'GitHub Application Client Secret',
      repo: 'GitHub repo',
      owner: 'GitHub repo owner',
      admin: ['GitHub repo owner and collaborators, only these guys can initialize github issues'],
      perPage: 5,
      distractionFreeMode: false  // Facebook-like distraction free mode
    },
    // customize the links on the navigation bar
    nav: [
        { text: 'HOME', link: '/', root: true }, // Specify this as the root directory of the blog post
        { text: 'TAGS', link: '/tags/', tags: true }, // Specify the tags directory
        { text: 'GITHUB', link: 'https://github.com/zhangximufeng' },
        { text: 'about me', link: '/about/' },
    ]
  }
}

customize the layout

Besides the basic yaml config generated by mufengblog-shell, you can add the following information to customize the layout as you want:

to customize the layout, add the following to the header of the markdown file

heroText: Mufeng # title
activity: true # Use a custom activity layout that will collapse the card bar on the right
hidden: true # Set whether to display in the article list
tagline: Vuepress blog theme # description
heroImage: /static/logo.png # logo
# Refer to the configuration of the official default theme for service static files
actionText: Learn about →
actionLink: /mufeng/usage.html
# If you want to have more than one action button (in this case actionText and actionLink will be ignored):
# actions :
#    - text : Action1
#      link : /mufeng/action1.html
#    - text : Action2
#      link : /mufeng/action2.html
features:
  - title: what is this
    details: A vuepress-based blog theme based on the default theme provided by vuepress
  - title: What are the characteristics?
    details: Provide article list, article pagination, article details, github card, custom event page layout, etc.
  - title: TODO
    details: Tag cloud, TAG ARCHIVE, some scripts, some out of the box layout
footer: by stickmy

Development, deployment

In the docs directory (or the root of your project), be sure to put a markdown file called README.md for generating the root path, which can be an empty file

You can use the following scripts to run the vuepress commands or you can run them directly, whichever you prefer

package.json:

{
  "scripts": {
    "docs:dev": "vuepress dev {dirName}",
    "docs:build": "vuepress build {dirName}"
  }
}

If you haven't installed vuepress gloablly, these scripts will be helpful to find the vuepress binaries from node_modules/.bin directory and execute them on shell. to execute above scripts, run:

npm run docs:dev

or

npm run docs:build

Accordingly.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].