8000 GitHub - Staaaaaaaaar/Staaaaaaaaar.github.io: 个人主页模版
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Staaaaaaaaar/Staaaaaaaaar.github.io

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

谈谈我对这个项目的理解

academicpages没有系统性的官方文档, 我在diy的时候遇到了很多困难, 因此撰写了这个文档用以参考

一. academicpages的文件系统

本章可以跳过

系统

  • _sass
  • _site : 本地运行生成的网站文件,网络部署无需此文件夹
  • assets : 核心代码
  • talkmap

设置

  • _data
    • _commets
    • _authors.yml
    • _navigation.yml
    • _ui-text.yml
  • _includes
  • config.dev.yml
  • config.yml : 核心的设置文件

网站内容

  • images : 放图片
  • files : 放文件
  • _draft,_talks,_teaching,_publications,_portfolio,_posts : 每个导航栏单独一个文件夹,存放markdown
  • _pages : 页面内容,放markdown和html
  • _layouts

其他

  • markdown_generatot : md生成器

二. 配置

云端部署

使用github代理部署即可,想换域名也可以,网上都有教程,推荐一个校友的教程,和本项目是配套的 戳这里

本地运行

  • 必须用linux,在windows上配置是极为困难的
  • academicpagesd的readme提供的环境配置很不仔细,遇到诸多版本问题,我使用了RVM调整ruby的版本,并手动加了一些包

1. 更新系统包列表并安装 GnuPG 2

sudo apt update
sudo apt install gnupg2

2. 导入 RVM 的 GPG 密钥并安装 RVM

command curl -sSL https://rvm.io/mpapis.asc | gpg --import -
command curl -sSL https://rvm.io/pkuczynski.asc | gpg --import -
\curl -sSL https://get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm

3. 装ruby

rvm install ruby
rvm docs generate-ri
rvm use ruby --default

装成功了belike:

4. 安装项目依赖

bundle install
bundle add webrick faraday-retry

5. 运行代码

bundle exec jekyll liveserve

然后就可以在http://localhost:4000/看到我们的网站了,这个进程你不关闭它是不会停的,且会在运行中输出一些报错

三. diy方法

🌟 基本信息设置

  • 请打开 _config.yml
  • 这个文件里有大量个人信息, 建议从头开始改, 直到 author: 模块
  • 注意照片文件用png, 放在image文件夹

🌟 在主页加一个记录访问情况的世界地图

点这里

  • 在这个网站整一个,输出一个html对象,复制到 about.md 即可

🌟 在任意页添加评论区

点这里

  • 在这个网站整一个,输出一个html对象,复制到对应页的 md 文件即可

🌟 如何在导航栏中增加 Repositories 栏目

以下代码块中的都需要添加, Repositories 可以根据需要修改为其他名称

1. config.yml

Collections模块

  Repositories:
    output: true
    permalink: /:collection/:path/

Defaults模块

  - scope:
      path: ""
      type: Repositories
    values:
      layout: single
      author_profile: true
      share: true
      comments: true

2. _data/navigation.yml

  - title: "Repositories"
    url: /Repositories/

3. _pages/Repositories.md

这个文件需要自行添加,参考代码如下:

---
layout: archive
title: "Repositories"
permalink: /Repositories/
author_profile: true
---

{% include base_path %}

{% for post in site.Repositories reversed %}
  {% include archive-single.html %}
{% endfor %}

4. _Repositories

该栏目下的md文件需要放在根目录下的_Repositories文件夹中, 请自行创建, 例如PKU-2024-IBAL-cracked-version.md

---
title: "PKU-2024-IBAL-cracked-version"
collection: Repositories
type: "Repositories"
permalink: /Repositories/PKU-2024-IBAL-cracked-version
venue: "Peking Univercity"
date: 2024-07-28
location: "Beijing, China"
---
英美文学概况的资料以及课程攻略,包含大模型写作业,给英文原著作摘要等功能
- 状态 : 完结,开源
- 链接 : [https://github.com/ICUlizhi/PKU-2024-IBAL-cracked-version](https://github.com/ICUlizhi/PKU-2024-IBAL-cracked-version)

参考效果

🌟 导航页代码参考

以Notes页为例:

Front Matter

定义页面的元数据和布局信息

---
layout: archive
title: "Notes"
permalink: /Notes/
author_profile: true
---

展示指定的md文件

{% include base_path %}
{% assign paths = "概论统计A(现为信概统).md,hjfpython.md" | split: "," %}
{% for post in site.Notes reversed %}
  {% for path in paths %}
    {% if post.path contains path %}
      {% include archive-single.html %}
      {% break %}
    {% endif %}
  {% endfor %}

这些md文件需要出现在根目录下_Notes文件夹中, 也可以直接遍历

md文件的内容

其实就是Front Matter+自由发挥的markdown,可参考模版

效果展示:

About

个人主页模版

Resources

License

Stars

Watchers

< 4492 h3 class="sr-only">Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 38.7%
  • HTML 22.5%
  • SCSS 19.4%
  • Jupyter Notebook 12.1%
  • Python 4.5%
  • CSS 2.6%
  • Ruby 0.2%
0