超轻量级个人博客 pblog

码农软件 · 软件分类 · 开源博客系统 · 2020-01-19 07:59:00

软件介绍

pblog——超轻量级个人博客系统,采用PHP和MySQL开发,只保留博客最基本的功能——发表文章和留言互动,同时静态化博客,让天朝空间都可以快速运行的博客。Pblog第一正式版共近3千行代码,70个文件

  • apache rewrite
  • nginx rewrite
  • 让pblog支持邮件发送

Pblog的安装详见:http://pjiaxu.com/pblog/1.html

Pblog所有的文章都放置在/archives/ 文件夹内,为了减少url的层数,采用了rewrite ,即将静态的html重定向到/archives/文件夹内,这需要服务器的支持(绝大部分支持):

apache rewrite

#去掉注释重定向404页面到归档页面
ErrorDocument 404 /archives.html

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /archives/$1 [QSA,PT,L]

nginx rewrite

server{
	if (!-e $request_filename) {
		rewrite ^/(.*)$ /archives/$1 break;
	}
	error_page  404 /archives.html;
}

看到两个配置都是将archives.html作为404页面,这是因为archives.html就像网站的sitemap,在遇到404的时候,也可以访问到全站的链接。

让pblog支持邮件发送

打开/config.php 看到12行后的内容,大概如下:

// 在此配置你的邮箱,可以使用多个,避免发得太多会和谐了
// $mail_conf = array(
// 	'google'=>array(
// 		'secure'=>'ssl',
// 		'host'=>'smtp.gmail.com',
// 		'name'=>'',
// 		'pwd'=>'',
// 		'port'=>465
// 	),
// 	'qq'=>array(
// 		'secure'=>'ssl',
// 		'host'=>'smtp.qq.com',
// 		'name'=>'',
// 		'pwd'=>'',
// 		'port'=>465
// 	)
// );
//可以继续163 sina ====
// define('MAIL', serialize($mail_conf));

可以填满这些信息后,去掉注释,后台就会自动支持邮件发送了,我建议你多写几个免费的Email,特别是你的互动比较多时!

暂时就只要这些配置了,最好,祝你拥有一个值得回忆的博客。

本文地址:https://www.codercto.com/soft/d/23700.html

Ethnography and Virtual Worlds

Ethnography and Virtual Worlds

Tom Boellstorff、Bonnie Nardi、Celia Pearce、T. L. Taylor / Princeton University Press / 2012-9-16 / GBP 21.00

"Ethnography and Virtual Worlds" is the only book of its kind - a concise, comprehensive, and practical guide for students, teachers, designers, and scholars interested in using ethnographic methods t......一起来看看 《Ethnography and Virtual Worlds》 这本书的介绍吧!

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换