Skip to content

use vue and vuex create wordpress frontend page | 通过 Vue 实现前端驱动数据、后台使用的是WordPress 实现前后端分离

License

Notifications You must be signed in to change notification settings

crlang/VueWordPress

Repository files navigation

logo

VueWPress

中文简述 ~ VueWPress

Prerequisites

  1. First, You must Star this repository. (* ̄︶ ̄)
  1. Need to install and running WordPress above version 4.4 ,and open REST API.
  1. modify src/utils/api.js file, change youre config. 「E.g: site url, site language, site protocol etc.」
  1. After vueWPress 0.23 release, you need to install a plugin JWT Authentication for WP-API, Can be downloaded via background plugin search or check here

4.1 Modify the wp-config.php file in Wordpress root

4.1.2 Find: define('NONCE_SALT'

4.1.3 Add the following to the line under define('NONCE_SALT'

define('JWT_AUTH_SECRET_KEY', 'you-64-secret-key');
#the random key here https://api.wordpress.org/secret-key/1.1/salt/
define('JWT_AUTH_CORS_ENABLE', true);

4.1.4 you-64-secret-key Is a 64-bit random key, more: check here

Build Setup

# install dependencies
npm install

# serve with hot reload at localhost:8088
npm run start

#  build for development
npm run dev

# build for production
npm run build

What Can I Do ?

  1. Show home on the home page. jump 「ver: 0.1」
  1. Show post on the article page. jump 「ver: 0.1」
  1. Show topic on the topic page. jump 「ver: 0.12」
  1. Show topic detail on the detail page. 「ver: 0.12」
  1. Show tags on the tags page. jump 「ver: 0.16」
  1. Show tag detail on the detail page. 「ver: 0.16」
  1. Show All media on the gallery page. 「ver: 0.16」
  1. Show All comment on the comments page. 「ver: 0.19」
  1. Show article on the articles page. jump 「ver: 0.23」
  1. Added comments on article page. jump 「ver: 0.31」
  1. Increase article publishing capabilities. jump 「ver: 0.31」
  1. Added user center to display nicknames, avatars, and logouts. jump 「ver: 0.31」
  1. Added login and registration functions. jump 「ver: 0.31」
  1. More features are in development ...

Preview Me

Home

home

Back Up


Articles

home

Back Up


Article

home

Back Up


Topic

topic

Back Up


Tags

page

Back Up


Member

page

Back Up


Login

page

Back Up


Post

page

Back Up


Comment

page

Back Up