Giter VIP home page Giter VIP logo

hexo-theme-a4's Introduction


👦 A man
🇨🇳 A Chinese guy who loves fresh things
🍹 An alcoholic who loves to drink cocktails
💻 A programmer who mainly uses Java
📖 A reader who loves to read literature and philosophy
🖊️ A person who loves to write everything.

🍺Now I am actively maintaining the hexo-theme-A4 project, a beautiful hexo-based blog theme.



📧If you have any questions, please send a message to my email📧

🧑‍🤝‍🧑Welcome to follow me. I love to make friends.🧑‍🤝‍🧑




hexo-theme-a4's People

Contributors

abdeeglr avatar athlan20 avatar fantasyleo avatar goal75kg avatar hankchow avatar hininojay avatar llsccm avatar sinzmise avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

hexo-theme-a4's Issues

代码块怎么没有渲染?

我的markdown代码块怎么没渲染?

答:检查你的_config.yml文件(注意不是A4的配置文件),将hexo自带的highlight和prismjs设置为false。

highlight:
  enable: false 
  line_number: true
  auto_detect: false
  tab_replace: ''
  wrap: true
  hljs: false
prismjs:
  enable: false 
  preprocess: true
  line_number: true
  tab_replace: ''

经A4使用者测试:hexo-blog-encrypt插件可能会与代码块渲染冲突,禁用插件后可以正常显示代码块,我目前暂时使用hexo-hide-posts插件暂时隐藏文章(-,-)

A4 1.8.5版本已解决代码块渲染问题,无需再做以上操作

🤔️常见问题

我的markdown代码块怎么没渲染?

答:检查你的_config.yml文件,将hexo自带的highlight和prismjs设置为false。

highlight:
  enable: false 
  line_number: true
  auto_detect: false
  tab_replace: ''
  wrap: true
  hljs: false
prismjs:
  enable: false 
  preprocess: true
  line_number: true
  tab_replace: ''

A4 v1.8.5版本已解决该问题,无需再做以上操作,记得恢复_config.yml为默认配置

在firefox上list文章高度异常

  • 版本v1.7.9
  • 浏览器firefox
    今天提交的时候突然发生的事情,手机上正常,edge正常,已尝试hexo clean无效,list.md没有写其他内容
    图片

Customized favicon 404 on Non-index pages -- Possible cause & Possible fix

Thanks for spending time viewing this issue, and hope this will be of some help.

After changing favicon in _config.a4.yml the theme will be unable to locate exact location of modified favicon path.

E.g. If the config is modified as follows:

# 相对于source目录下的头像url
favicon: /img/favicon.jpeg

This is what the page looks like:
ScreenCapture

The issue is possibly caused by codes in /blob/main/layout/_partial/post-header.ejs where the avatar is defined as follows:

    <div class="header-container">
        <img style="
        width: 56px;
        height: auto;" alt="^-^" cache-control="max-age=86400" class="header-img" src="<%- url_for('/img/favicon.webp') %>" width="10%"></img>
        <div class="header-content">
            <a class="logo" href="<%- url_for() %>"><%= config.title %></a> 
            <span class="description"><%= config.description %></span> 
        </div>
        
    </div>

Changing url_for('/img/favicon.webp') into url_for(theme.favicon) fixes this issue.
capt2

强制在每一页面进行数学公式渲染

每一篇文章都要在 front-matter 前加 mathjax: true 有点太麻烦了(因为之前用的其他主题写过很多文章都没加), 而且 mathjax 的配置项中

mathjax:
  tags: none # or 'ams' or 'all'
  single_dollars: true # enable single dollar signs as in-line math delimiters
  cjk_width: 0.9 # relative CJK char width
  normal_width: 0.6 # relative normal (monospace) width
  append_css: true # add CSS to pages rendered by MathJax
  every_page: true # if true, every page will be rendered by MathJax regardless the `mathjax` setting in Front-matter

里面是有 every_page 这一强制让每一个页面都用 mathjax 渲染的选项的 (不过这里改成 true 也没啥用就是了), 不知道能不能添加这一功能, 还是说本来能实现这个功能但我哪里没配置好?


什么时候能换其他英文字体(

hexo generate output

13|     

14| <% var array = pageTagData.posts.data %>
15| <% array.sort((a, b) => {
16| if (a.date > b.date) {
17| return -1;

Cannot read properties of undefined (reading 'posts')

why and how to solve?

fork了仓库准备魔改,有几点小想法

ejs语法我也不太熟悉...
layout.ejs 这里应该要设置config的language配置项吧
<html lang="<%= config.language || 'en' %>">

footer.ejs
<span style="border-top: 1px solid var(--line-1);margin-top: -30px;"></span>
这条线设置成.footer-last的样式比较好?

<div style="display: float;">
            <span style="float: left; font-size: 10px;">🌊看过大海的人不会忘记海的广阔🌊</span>
            <span class="footer-last-span-right"><i>本站由<a target="_blank" rel="noopener" href="https://hexo.io/zh-cn/index.html">Hexo</a>驱动|使用<a target="_blank" rel="noopener" href="https://github.com/HiNinoJay/hexo-theme-A4">Hexo-theme-A4</a>主题</i></span>
</div>

这里的样式我认为去掉div,不用float,用flex+text-align: right;(不过得把上面的线的样式改掉)

由于还魔改了一些其他地方的样式,不太好PR,就在issues里提提自己的想法

关于hexo-reference中引用的hint.min.css问题

最近发现页面加载很慢,经过排查是hint.min.css的请求速度很慢,发现该CDN: https://cdn.jsdelivr.net/hint.css/2.4.1/hint.min.css, 速度很慢,找到hexo-reference的原作者,发现已经在5年前就停更了,因此我fork了hexo-reference的代码,并修改了新版本的CDN,速度很快。

可直接 npm install hexo-reference-new --save 安装新插件

npmjs地址:https://www.npmjs.com/package/hexo-reference-new
github地址:https://github.com/AllenGo912/hexo-reference-new

旧:
image
image

新:
image
image

控制台启动报错?(分类标签相关)

文章含有多个category 后 启动 控制台警告?

答:目前A4仅支持文章含有一级分类(category),但可以含有多个标签(tag)。个人觉得嵌套分类的存在,使得分类和标签的区别模糊了。也许以后会支持多级分类

除此之外,请确保使用的是hexo v6.3.0版本,标签分类功能只支持该版本的hexo,可执行以下命令安装或者替换hexo版本

npm install [email protected]

A4 v1.8.5版本已解决该问题,无需再做以上操作

字体更换问题

pc端能正确显示,但移动端不能,比如我引入了楷体的ttf,然后配置好之后在pc上正确显示,手机上不能。

首页看起来很小

首页页面看起来很小,对比其他页面显得很突兀,是有意保留的么;
制作很棒,加油。

字体配置

你好,我英文界面字体显示偏小,我在style.css 中body 下调整字体大小,结果导致整体字体大小全都改变,这点怎么解决。谢谢。

本地部署正常,github action部署有问题

github action运行没问题,推到github pages仓库的时候能正常生成目录和文件

但是其中的文件内容为空,导致部署后的网站内容空白。

微信图片_20240228182959

原因是通过npm安装的需要将_config.yml配置文件中theme改为小写

通过git安装的需要将_config.yml配置文件中theme改为大写

image

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.