用Hexo的方式管理WordPress(使用Github Actions自动更新文章到WordPress)

Overview

方圆小站Github仓库

---start---

目录(2021年02月17日更新)

《刺杀小说家》一个勇士屠恶龙救苍生的故事

衡水的中学为高考服务,996.icu为人民企业家服务

轻薄的代价(纪念不足两岁MacBook轻薄本的陨落)

PP鸭最佳替代品!《图压》批量压缩图片而不损失画质,支持JPG,PNG,GIF,SVG

解决Chrome开发中http强制跳转https

Node.js爬虫获取漫威超级英雄电影海报

InDesign转曲字体 导出PDF的技巧

Python写给前端的脚本!网站图片素材中文转英文

B站黑白滤镜

简单三步, 搭建全平台私有同步网盘

让Css3动画变得有趣WOWjs

193MB的 Office 2016 四合一精简珍藏版,支持 win7 win8 win8.1 win10 x86/x64 系统

使用Github Actions 动态更新Github主页

《百度网盘闲时下载卡》别家公司996, 我百度凌晨1点刚上线,如何改进闲时下载卡?Make Baidu Great Again!

从「我的代码要改变世界」到「代码也不是最重要滴」

用Github Actions运行Python脚本更新仓库博客到WordPress,手机写Markdown同步更新到Github和WordPress攻略

Xbox 2020 series手柄体验实录(附自制Xbox体感射击技巧)

建立个人独立博客有什么好处?

zhaoolee的Github主页

---end---

用Github Actions写Markdown文章,自动更新到WordPress

  • 写博客最舒服的格式是Markdown;

  • 管理博客站最省心的方式是WordPress;

  • 推广博客站最好的平台是Github;

这个项目可以让你用Markdown写博客,push更新到Github后,Github Actions自动将文章更新到WordPress,并将WordPres站的文章索引更新到Github仓库的README.md,供搜索引擎收录。

image-20210119181051609

程序永久开源更新地址

https://github.com/zhaoolee/WordPressXMLRPCTools

如何实现WordPress登录授权?

WordPress默认开启了xmlrpc服务,xmlrpc是一套的统用的博客更新标准,允许用户以POST方式自动对文章内容进行增删改查。授权方式为 用户名 和 密码, 在WordPress中是后台登录的账户名和密码

我的WordPress网站为 https://fangyuanxiaozhan.com

image-20210119180338929

它的xmlrpc服务地址为 https://fangyuanxiaozhan.com/xmlrpc.php

image-20210119180403270

使用Github Actions 有什么好处?

Github Actions 可以让我们无需安装开发环境,即可完成代码的运行。

image-20210119180656968

对于本项目而言,我可以用手机版Git App,或者Github网页完成新建文章, 然后push到仓库,Github Actions会自动帮我完成相关代码运行,代码可以帮我更新文章到WordPress网站,并生成新的文章目录索引,并自动给你更新到README.md, 供搜索引擎收录。

image-20210119180529083

如何保护自己的WordPress账户密码?

Github 有一个secrets 功能,可以将用户名密码等关键信息保护起来,只有Github Actions可以读取到关键信息。

本项目需要设置三个secret

  • WordPress登录用户名, 变量名为 USERNAME
  • WordPress登录密码,变量名为 PASSWORD
  • WordPress的xmlrpc.php,变量名为 XMLRPC_PHP

image-20210119173133800

如何新建文章?

_post 目录下新建 后缀为 .md 的markdown文件即可

image-20210119181544158

文章管理:如何为文章分类/加关键词标签?

.md 文件顶部填写以下初始化信息,即可完成标题(title),标签(tags),分类(categories)的设置,其中title为必填项目(这些关键词不是我定义的,我借用了著名静态博客构建工具 hexo 的标准)

---
title: 我是标题
tags: 
- 我是0号标签关键词
- 我是1号标签关键词
- 我是2号标签关键词
categories:
- 我是1号分类
- 我是2号分类
---

标签(tags)和分类(categories)有什么区别?

标签(tags)是针对单篇文章的关键词,比如香蕉的标签有 黄色味甜 (标签是香蕉的属性) 分类(categories)是本篇文章的归属,比如香蕉的分类为 水果植物

image-20210119182027684

如何设置固定链接?

对于博客而言,文章拥有一个固定的链接,是很重要的,我经过各种尝试,最终借鉴了 简书 的文章url形式,域名后加 /p/ , 再加英文文件名,只要不改变英文文件名,文章就有固定的链接,我在_posts 目录下新建一个 2020-01-18-blog.md 文件,同步后的文章url为

https://fangyuanxiaozhan.com/p/2020-01-18-blog/

文件名与网站url严格对应,既方便了修改,又可以在网站数据库出事故后,迅速从github仓库迅速恢复文章内容(容灾),连url都不会变。

image-20210119171713841

如何使用?

完成以上配置后

每次在_posts 文件夹新增或更新文章后,运行

git pull && git add _posts && git commit -m "update" && git push

image-20210119182503520

即可!

image-20210119182653436

Github README.md显示效果,(新增的文章排在首位)

image-20210119184015781

WordPress网站也同步发布了文章

image-20210119182849720

https://fangyuanxiaozhan.com/p/2020-01-19-18-00-wordpressxmlrpctools/

如何用手机完成博客更新操作?

微信图片_20210119192838

用锤子便签,可以优雅舒适地写Markdown,手机App很好用,还有网页版可以用,有5GB的免费空间,能写到锤子倒闭。

如果遇到插入图片的问题,可以使用 免费图床图壳

https://imgkr.com/#upload

Pocket Git 和 MT管理器可以配合完成Git 文件的新增更新和上传。

程序永久开源更新地址(求Star):

https://github.com/zhaoolee/WordPressXMLRPCTools

当我们把毕生所学,通过几十年如一日的博客更新,逐步开源到互联网上时,必将会造福更多志同道合的人。

Owner
zhaoolee
不要因为走的太远,就忘了当初为什么出发。(指「为人民服务」)
zhaoolee
plumi video sharing

December 2017 update We are moving tickets from the Plumi tracker (trac.plumi.org) here, for historical reasons. Plumi video sharing system Plumi is a

Plumi 111 Dec 15, 2022
LibreLingo🐢 🌎 📚 a community-owned language-learning platform

LibreLingo's mission is to create a modern language-learning platform that is owned by the community of its users. All software is licensed under AGPLv3, which guarantees the freedom to run, study, s

Daniel Kantor 1.4k Jan 09, 2023
Abilian Social Business Engine - an enterprise social networking / collaboration platform.

About Abilian SBE (Social Business Engine) is a platform for social business applications, and more specifically collaborative / enterprise 2.0 busine

Abilian open source projects 63 Dec 29, 2022
CSM: Construction Safety Management system

CSM: Construction Safety Management system 1. 서비스 소개 개요: 공사현장에서의 최적의 안전진단기술을 통한 고도화된 시스템으로 개선하고자 함 목표: 안전 관련 주요 시각데이터를 Cross-Domain으로 활용하여 통합 안전 관리기술의

5 Jul 29, 2022
Set of Web-backend projects to implement micro-blogging site

Mini-Twitter This repository contains a set of projects covered for CPSC-449 Web-Backend development under the guidance of Prof. Kenytt Avery at CSU,

1 Nov 07, 2021
ConnectLearn is an easy to use and deploy Open-Source Project meant to make it easier for the right students to find the right teachers online.

ConnectLearn ConnectLearn is an easy to use and deploy Open-Source Project meant to make it easier for the right students to find the right teachers o

Aditya 5 Oct 24, 2021
Backend routes and database for an abstract theoretical app that relates a database of courses, users, and assignments.

Backend routes and database for an abstract theoretical app that relates a database of courses, users, and assignments.

Sean Wiesner 0 Dec 27, 2021
用Hexo的方式管理WordPress(使用Github Actions自动更新文章到WordPress)

方圆小站Github仓库 ---start--- 目录(2021年02月17日更新) 《刺杀小说家》一个勇士屠恶龙救苍生的故事 衡水的中学为高考服务,996.icu为人民企业家服务 轻薄的代价(纪念不足两岁MacBook轻薄本的陨落) PP鸭最佳替代品!《图压》批量压缩图片而不损失画质,支持JPG,

zhaoolee 166 Jan 06, 2023
Flask-SQLAlchemy implementation of nested/threaded comment replies.

Threaded comments using Common Table Expressions (CTE) for a MySQL Flask blog or CMS Credits to peterspython Also read more about the implementation h

ONDIEK ELIJAH OCHIENG 5 Nov 12, 2022
Website for PyCon

PyCon 2019 Web Site Built by the Python Community atop the Django web framework. Rather than use this as the basis for your conference site directly,

PyCon 155 Nov 05, 2022
VaporCMS - The greatest content management system that will never exist

The greatest content management system that will never exist Overview WordPress is a huge success but could it be done better? Maybe being mo

Andrew Dailey 4 Jan 06, 2022
Simple yet powerful and really extendable application for managing a blog within your Django Web site.

Django Blog Zinnia Simple yet powerful and really extendable application for managing a blog within your Django Web site. Zinnia has been made for pub

Julien Fache 2.1k Dec 24, 2022
A course management web application

umber a course management web app built with python Flask, sqlite3, and git. installation Tested on Ubuntu 18 with python 3.5. # -- Install the system

Jim Mahoney 6 Jun 03, 2022
Oppia a free, online learning platform to make quality education accessible for all.

Oppia is an online learning tool that enables anyone to easily create and share interactive activities (called 'explorations'). These activities simulate a one-on-one conversation with a tutor, makin

Oppia 4.8k Dec 28, 2022
Django content management as it should be

Django content management as it should be. Documentation Read the full documentation or get a quick brief below. Install $ pip install djedi-cms Confi

5 Monkeys 75 Dec 13, 2022
Crypt Wiki - VimWiki with added support for encryption/decryption

Crypt Wiki - VimWiki with added support for encryption/decryption This project is meant to solve an issue I have ran into recently. I wanted to have a

Adrian Costin 6 Dec 18, 2022
Indico - A feature-rich event management system, made @ CERN, the place where the Web was born.

Indico Indico is: ? a general-purpose event management tool; ? fully web-based; ? feature-rich but also extensible through the use of plugins; ⚖️ O

Indico 1.4k Dec 31, 2022
The easy-to-use and developer-friendly CMS

django CMS Open source enterprise content management system based on the Django framework and backed by the non-profit django CMS Association. Get inv

django CMS Association 9.1k Jan 08, 2023
CMS framework for Django

Created by Stephen McDonald Overview Mezzanine is a powerful, consistent, and flexible content management platform. Built using the Django framework,

Stephen McDonald 4.6k Dec 29, 2022
A Django blog app implemented in Wagtail

Puput Puput is a powerful and simple Django app to manage a blog. It uses the awesome Wagtail CMS as content management system. Puput is the catalan n

APSL 535 Jan 08, 2023