Code Monkey home page Code Monkey logo

hugo-papermodx's Introduction

PaperModx 基于 PaperMod 做了个性化定制并加了些新特性

Features and changes:

可在 loyayz.com 查看这些改动

1. 怎么使用本主题

1.1 安装/更新

1.1.1 方式一(推荐)

# 安装
git submodule add --depth=1 https://github.com/loyayz/hugo-PaperModx.git themes/PaperModx
# 更新
git submodule update --remote --merge
# 假设你已经安装成功并且将你的仓库推送到远程,重新 clone 你的仓库后需执行这句
git submodule update --init --recursive --depth=1

1.2.1 方式二

# 进入你本机中的站点目录
cd blog
# 安装
git clone --depth=1 https://github.com/loyayz/hugo-PaperModx.git themes/PaperModx
# 更新
# 进入主题目录
cd themes/PaperModx
git pull

1.2 使用

修改站点配置config.yml

theme: "PaperModx"

其他详细配置请查看 PaperMod 示例

hugo-papermodx's People

Contributors

adityatelange avatar nanxiaobei avatar loyayz avatar kdkasad avatar jmooring avatar jannikarndt avatar geeqla avatar izdwuut avatar danielfdickinson avatar kdecherf avatar arkrz avatar northerner-coder avatar muhammadhanif avatar mohnoor94 avatar mehdy avatar ham1 avatar cbrownstein avatar cljoly avatar icy-comet avatar deining avatar rojvv avatar pxlfrk avatar pacientes avatar zhangyuannie avatar track3 avatar syphdias avatar rharter avatar rotzbua avatar richardslater avatar pinfel avatar

Stargazers

Royal Huang avatar

hugo-papermodx's Issues

文章元数据前添加图标-问题

按照教程来,使用papermod并非papermodx,出错,提示svg出问题,我是在博客根目录并非主题目录新建svg.html添加新添加的那几个svg数据,并非整个文件数据

添加的图标模板extend_svg.html内容

{{- else if (eq $icon_name "calendar") -}}
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2" fill="none"
     stroke-linecap="round" stroke-linejoin="round" class="feather feather-calendar" style="user-select: text;">
    <rect x="3" y="4" width="18" height="18" rx="2" ry="2" style="user-select: text;"></rect>
    <line x1="16" y1="2" x2="16" y2="6" style="user-select: text;"></line>
    <line x1="8" y1="2" x2="8" y2="6" style="user-select: text;"></line>
    <line x1="3" y1="10" x2="21" y2="10" style="user-select: text;"></line>
</svg>
{{- else if (eq $icon_name "file-text") -}}
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2" fill="none"
     stroke-linecap="round" stroke-linejoin="round" class="feather feather-file-text" style="user-select: text;">
    <path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" style="user-select: text;"></path>
    <polyline points="14 2 14 8 20 8" style="user-select: text;"></polyline>
    <line x1="16" y1="13" x2="8" y2="13" style="user-select: text;"></line>
    <line x1="16" y1="17" x2="8" y2="17" style="user-select: text;"></line>
    <polyline points="10 9 9 9 8 9" style="user-select: text;"></polyline>
</svg>
{{- else if (eq $icon_name "clock") -}}
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2" fill="none"
     stroke-linecap="round" stroke-linejoin="round">
    <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <circle cx="12" cy="12" r="9"></circle>
    <polyline points="12 7 12 12 15 15"></polyline>
</svg>
{{- else if (eq $icon_name "avatar") -}}
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2" fill="none"
     stroke-linecap="round" stroke-linejoin="round">
    <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
    <circle cx="12" cy="7" r="4"></circle>
    <path d="M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"></path>
</svg>
{{- else if (eq $icon_name "tag") -}}
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2" fill="none"
     stroke-linecap="round" stroke-linejoin="round" class="feather feather-tag meta-icon" style="user-select: text;">
    <path d="M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z" style="user-select: text;"></path>
    <line x1="7" y1="7" x2="7" y2="7" style="user-select: text;"></line>
</svg>

{{- else if $icon_name -}}
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
    stroke-linecap="round" stroke-linejoin="round">
    <path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path>
    <path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path>
</svg>
{{- end -}}

提示:

Error: add site dependencies: load resources: loading templates: "C:\hugo\blog\layouts\partials\extend_svg.html:1:1": parse failed: template: partials/extend_svg.html:1: unexpected {{else}}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.