野生程序员
发布于 2022-08-20 / 311 阅读 / 0 评论 / 0 点赞

halo一些笔记

等待验证

./themes/joe2.0/source
把这个目录的文件 上传的 git 
然后 公开仓库 
然后 后台-->外观-->主题设置-->其他-->自定义 CDN 域名

例
复制
//142536.vip/themes/joe2.0/source/
上传到
//仓库/themes/joe2.0/source/
创建pages选部署目录根目录或不填

自定义 CDN 域名   填部署后显示的地址
如
//xxx.gitee.io/halo-theme-joe2.0

注意
CDN 域名类型:选自定义


Plain text

image-1661084399862
image-1661084300452

前端模板

判断是否为写博客的用户

  <#if settings.show_blogger!true>
    <#include "../module/blogger.ftl">
  </#if>
HTML

自定义页面模板

目录
./templates/themes/joe2.0
创建文件
sheet_xxx.ftl
xxx 为模板名称
然后到后台发布一个自定义页面 选择xxx模板
image-1661005886944

导航和页脚

<!DOCTYPE html>
<html lang="zh-CN">
  <#import "template/common/header.ftl" as headInfo>
  <@headInfo.head title="${sheet.title}" type="sheet" id=sheet.id />
  <#import "template/macro/tail.ftl" as tailInfo>
  <body>
    <div id="Joe">
      <#include "template/common/navbar.ftl">
      <div class="joe_container joe_main_container page-sheet${settings.enable_show_in_up?then(' animated showInUp','')}">
      我是一个只有导航和页脚的页面
      </div>
      <#include "template/common/actions.ftl">
      <#include "template/common/footer.ftl">
    </div>
    <@tailInfo.tail type="sheet" subType="only_header_footer" />
  </body>
</html>
HTML

评论