Skip to content

Commit

Permalink
add functions
Browse files Browse the repository at this point in the history
添加如下功能:
feed订阅
主页面和文章页面区分级别
文章页面固定左边栏
  • Loading branch information
Petalzu committed Apr 25, 2024
1 parent 77285bb commit a6f35cc
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 32 deletions.
43 changes: 23 additions & 20 deletions _config.icarus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,9 @@ widgets:
RSS:
icon: fas fa-rss
url: /sitemap.xml



# Table of contents widget configurations
-
# Where should the widget be placed, left sidebar or right sidebar
Expand All @@ -277,7 +280,14 @@ widgets:
collapsed: true
# Maximum level of headings to show (1-6)
depth: 3

# Recommendation links widget configurations
-
# Where should the widget be placed, left sidebar or right sidebar
position: left
type: links
# Names and URLs of the sites
links:
兰州大学开源软件镜像站: https://mirror.lzu.edu.cn/
# Categories widget configurations
-
# Where should the widget be placed, left sidebar or right sidebar
Expand All @@ -286,41 +296,34 @@ widgets:
# Recent posts widget configurations
-
# Where should the widget be placed, left sidebar or right sidebar
position: left
position: right
type: recent_posts
# Archives widget configurations
-
# Where should the widget be placed, left sidebar or right sidebar
position: left
position: right
type: archives
# Tags widget configurations
-
# Where should the widget be placed, left sidebar or right sidebar
position: left
position: right
type: tags
# How to order tags. For example 'name' to order by name in ascending order, and '-length' to order by number of posts in each tags in descending order
order_by: name
# Amount of tags to show. Will show all if not set.
amount:
# Whether to show tags count, i.e. number of posts in the tag.
show_count: true
# Recommendation links widget configurations
-
# Where should the widget be placed, left sidebar or right sidebar
position: left
type: links
# Names and URLs of the sites
links:
兰州大学开源软件镜像站: https://mirror.lzu.edu.cn/

# Google FeedBurner email subscription widget configurations
-
#-
# Where should the widget be placed, left sidebar or right sidebar
position: left
type: subscribe_email
#position: left
#type: subscribe_email
# Hint text under the email input
description:
#description:
# Feedburner ID
feedburner_id: ''
#feedburner_id:
# Google AdSense unit configurations
#-
# Where should the widget be placed, left sidebar or right sidebar
Expand All @@ -336,11 +339,11 @@ widgets:
position: left
type: followit
# Hint text under the email input
description:
description: 输入您的电子邮件
# Subscription form action URL
action_url: ''
action_url: https://api.follow.it/subscription-form/UzJ2TWhwMkN5d3F1YTJKSUw1aEl2YVg0Ujl1WjJtZXMrU2lCbjFnNUt1eVF0KzBtZE9UYklaMnI2Z28rejhMQ3BxYkdydFRBNG1aT09QdWpjVGtKdWJ6VlVINTQ2dWlCcDBHbFVuQjV2eFdmbzFoUUNoTUVsa3hySmxvb0hWVkx8YUNRWmgyWjEvVHk0dmhhRlA3Q0k2K0cwVVFUcTNCV2ZHREFGVDJrTE1Obz0=/8
# Feed claiming verification code
verification_code: ''
verification_code: etnv9aFRd5ASLnr26cAq
# Plugin configurations
# https://ppoffice.github.io/hexo-theme-icarus/categories/Plugins/
plugins:
Expand Down
24 changes: 24 additions & 0 deletions _config.post.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
sidebar:
# Left sidebar configurations
left:
# Whether the sidebar sticks to the top when page scrolls
sticky: true
# Right sidebar configurations
right:
# Whether the sidebar sticks to the top when page scrolls
sticky: false
widgets:
-
type: toc
position: left
# 是否显示目录项目的序号
index: true
-
type: recent_posts
position: left
-
type: categories
position: left
-
type: tags
position: left
23 changes: 11 additions & 12 deletions source/_posts/hello-world.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ title: Welcome
author: Petalzu
categories: [笔记]
tags: [Hexo]
excerpt: "
欢迎来到兰州大学开源社区网站。
"
excerpt: "欢迎来到兰州大学开源社区网站。"
date: 2024-04-24 16:00:00
---

欢迎来到兰州大学开源社区网站。
Expand All @@ -25,15 +24,15 @@ Git

执行如下命令:
```bash
$ npm install hexo
npm install hexo
```
添加Hexo 所在的目录下的 node_modules 添加到环境变量之中

在想要建立hexo的 <folder>下执行如下命令:
```bash
$ hexo init <folder>
$ cd <folder>
$ npm install
hexo init <folder>
cd <folder>
npm install
```

在 Hexo 根目录执行以下命令安装主题,有两种方式:
Expand All @@ -47,25 +46,25 @@ theme: icarus
```
或执行命令:
```bash
$ hexo config theme icarus
hexo config theme icarus
```

添加新页:
```bash
$ hexo new page
hexo new page
```

启动hexo服务器,访问 localhost:4000 查看效果:
```bash
$ hexo server
hexo server
```

### 推送
建立存储库,名为 <你的 GitHub 用户名>.github.io

将 main 分支 push 到 GitHub仓库:
```bash
$ git push -u origin main
git push -u origin main
```
或者使用GitHub Desktop等工具进行推送。

Expand Down Expand Up @@ -119,7 +118,7 @@ jobs:
### RSS
在 Hexo 根目录执行以下命令安装插件:
```bash
$ npm install hexo-generator-feed --save
npm install hexo-generator-feed --save
```

在 Hexo 根目录的 _config.yml 文件中,添加以下内容:
Expand Down

0 comments on commit a6f35cc

Please sign in to comment.