The Good Parts of Your WordPress Zwei
This project is for you to show specified posts of your WordPress. The name is a meme of O’Reilly: The Good Parts, and German, Zwei as Two in English.
The posts are read from your own WordPress, so the access of MySQL of your WordPress is needed.
The purpose of the project is for showing specified posts of your WordPress in some complicated situations. One like me, posts almost everything like 'eating, gaming, developing' in WordPress, that makes awkward in some special situations, such as job-hunting. With this project, you can create a standalone page to show specified posts of your WordPress to avoid the embarrassing situations.
This is the second project of this case. Compared with the previous, this new project includes some new features, like Responsive web design and Lazyload.
Last project: goodparts-of-your-wordpress (Archived)
Requirements & Build & Usage
- WordPress(HTTP Service + PHP + MySQL), the access of MySQL of WordPress is needed.
All the API files are in the
api/ directory, please copy all of them on your server, and edit
Vue.prototype.$siteconf in file
$allowed_referers to allow your domain to request(http_referer), and
$mysqli to access WordPress.
Then run(use cli, or browser)
generate_list.php to generate a json list. Copy the output to
api\list.json. Only copy the parts of which you want to show.
You can rename or remove the
generate_list.php in case of security now.
Change the title in
components/Welcome.vue. Feel free to custom your Welcome.
Serve & build
- yarn run serve
- yarn run build
Serve over HTTPS
Notice version after 0.3.0, the file
vue.config.js has option that make you able to run serve over HTTPS. It's disabled by default. Enable it and you can now test some feature which only avaliable on HTTPS, such as "fake fullscreen"
The project includes a localhost cert-pack, includes cert, key, CA, CA-key, generated by FiloSottile/mkcert. You can and should use your own certificates for your goal.
- Doesn't support any version of IE. Any versions of IE will got an Alert.
- Some says iOS 11 have trouble. I don't have any iOS devices, nor any Mac devices. If anyone has trouble about it, please report it on the Issue.
- API CORS code not finished.
- If there are anchors links in the post, when click and jump, the Fixed page header overlaps in-page anchors. No idea how to fix this now. Use opacity to reduce this issue for this moment.