ResumeCard 开源项目使用教程

随笔3周前发布 何一凡
32 0 0

ResumeCard 开源项目使用教程

resumecardYou can see the live demo项目地址:https://gitcode.com/gh_mirrors/re/resumecard

1. 项目的目录结构及介绍

ResumeCard 项目的目录结构如下:

  1. resumecard/

  2. ├── _config.yml

  3. ├── _data/

  4. │ └── members.yml

  5. ├── _includes/

  6. │ ├── footer.html

  7. │ ├── head.html

  8. │ ├── header.html

  9. │ └── scripts.html

  10. ├── _layouts/

  11. │ └── default.html

  12. ├── _posts/

  13. │ └── 2014-11-01-about.md

  14. ├── assets/

  15. │ ├── css/

  16. │ │ └── main.scss

  17. │ ├── images/

  18. │ └── js/

  19. ├── index.html

  20. └── README.md

目录结构介绍

  • _config.yml: 项目的配置文件。
  • _data/: 存放数据文件,例如 members.yml 用于存储成员信息。
  • _includes/: 包含页面的各个部分,如页眉 (header.html)、页脚 (footer.html) 和脚本 (scripts.html)。
  • _layouts/: 页面布局文件,例如 default.html 是默认布局。
  • _posts/: 存放博客文章,例如 about.md 是关于页面的内容。
  • assets/: 存放静态资源,包括 CSS、图片和 JavaScript 文件。
  • index.html: 项目的主页文件。
  • README.md: 项目的说明文档。

2. 项目的启动文件介绍

项目的启动文件是 index.html,它是整个项目的入口文件。该文件包含了页面的基本结构和引用,通过加载 _includes/ 目录下的各个部分来构建页面。

  1. <!DOCTYPE html>

  2. <html lang="en">

  3. {% include head.html %}

  4. <body>

  5. {% include header.html %}

  6. <div class="content">

  7. {{ content }}

  8. </div>

  9. {% include footer.html %}

  10. {% include scripts.html %}

  11. </body>

  12. </html>

启动文件介绍

  • {% include head.html %}: 引入页面的头部信息,包括 CSS 文件和元数据。
  • {% include header.html %}: 引入页面的头部导航栏。
  • {{ content }}: 插入页面的主要内容。
  • {% include footer.html %}: 引入页面的底部信息。
  • {% include scripts.html %}: 引入页面的 JavaScript 文件。

3. 项目的配置文件介绍

项目的配置文件是 _config.yml,它包含了项目的全局配置信息。

  1. title: ResumeCard

  2. email: your-email@example.com

  3. description: >- # this means to ignore newlines until "baseurl:"

  4. Write an awesome description for your new site here. You can edit this

  5. line in _config.yml. It will appear in your document head meta (for

  6. Google search results) and in your feed.xml site description.

  7. baseurl: "" # the subpath of your site, e.g. /blog

  8. url: "http://yourdomain.com" # the base hostname & protocol for your site, e.g. http://example.com

  9. twitter_username: jekyllrb

  10. github_username: jekyll

  11. # Build settings

  12. markdown: kramdown

  13. theme: minima

  14. plugins:

  15. - jekyll-feed

配置文件介绍

  • title: 网站的标题。
  • email: 联系邮箱。
  • description: 网站的描述信息。
  • baseurl: 网站的子路径。
  • url: 网站的域名。
  • twitter_username: Twitter 用户名。
  • github_username: GitHub 用户名。
  • markdown: 使用的 Markdown 解析器。
  • theme: 使用的主题。
  • plugins: 使用的插件列表。

通过修改 _config.yml 文件,可以自定义网站的各项配置信息。

resumecardYou can see the live demo项目地址:https://gitcode.com/gh_mirrors/re/resumecard

© 版权声明

相关文章

暂无评论

您必须登录才能参与评论!
立即登录
暂无评论...