CPress 中的 url 与模板对应关系

CPress 生成的链接默认使用 plain 风格

http://example.com/?aid=123
http://example.com/?cid=123
http://example.com/?pid=123

说明:

aid 单篇文章详情(articleId)

cid 指定分类文章列表(categoryId)

pid 指定页面(pageId)

 

对应渲染的模板文件:

index.twig 首页

single.twig 单篇文章详情

category.twig 分类文章列表

page.twig 页面

 

对于普通的模板文件,直接用对应文件名,作为 url 即可访问,例如:

hello.twig 模板,对应 url 为 http://example.com/hello