search
HomeWeb Front-endHTML Tutorial十分钟搭建个人网站:Jekyll主题BoHu_html/css_WEB-ITnose

最近花了三天时间制作了我的第一个jekyll theme——BoHu。一款知乎风格的模板,使用jekyll模板引擎,十分钟就能搭建属于你自己的静态博客网站。

本主题的特征为:


  1. 知乎风格

  2. 分页导航使用的是具体页码而不是单纯的上一页下一页

  3. 支持博文搜索功能

  4. 支持文章分类和显示近期文章

  5. 首页能统计博文数量

  6. 内置中文和英文的艺术字体

  7. 内置音乐播放器

  8. 支持多说和disqus评论系统

  9. 移动设备浏览效果良好

  10. 使用MIT许可

具体步骤如下:

  1. 首先,你需要有GitHub帐号。
  2. 到我的GitHub上的bohu-jekyll-theme仓库中fork本主题。
  3. 在bohu-jekyll-theme目录下找到_config.yml配置文件并打开。修改个人配置信息。
  4. 将修改完成的网站目录上传至自己的GitHub仓库生成自己的博客网站。
  5. 以后只要把你的博文放在_post文件夹下并上传至GitHub,网站就会自动更新内容啦。

必填信息
title: 博客的名字
author: 博主的名字
baseurl: 博客的根地址==你的文件夹名称(默认为bohu-jekyll-theme),如果你更改了文件夹名称,请把此处也修改掉。
description: head中的网页描述信息。简要描述你的网站,让搜索引擎能更好的收录你的网站。

选填信息
email: 你的邮箱地址
twitter_username: 你的推特用户名
weibo_username: 你的微博用户名
github_username: 你的github用户名
以上四项信息你填写了之后博主信息栏里会自动出现相应的链接图标,不填就不会出现。

disqus_shortname: 你的disqus帐号
duoshuo——shortname: 你的多说帐号
以上两项可以不填,选填任意一项会自动加载相应的评论插件。

url: 如果你有自己的个人网站就填写你自己的网站地址,如果没有,就填写http://你的github名字.github.io/主题文件夹根目录名字/home,将会指向一个内置的个人主页。
使用内置的个人主页之后你需要配置一下个人信息: place,domain,company,position,school,major,resume
性别图标修改方法:打开home文件夹下的index.html,搜索类名fa-mars,将其改成fa-venus即可。

paginate: 填写一个数值,决定分页导航每一页显示的博文数量,达到这个数值会自动分页。

profile: 你的座右铭

其他修改项目


  • 网站图标和自定义头像在assets文件夹下,你也可以把路径设置为任何站外图片链接。

  • 使用SCSS预编译,要修改样式优先修改SCSS文件。

  • 搜索插件需要手动配置路径,找到search文件夹,将其中JS文件夹里的cb-search.js中第66行bohu-jekyll-theme改成博客网站根目录的名字。

  • 本主题的后续维护和更新内容请关注GitHub项目主页bohu-jekyll-theme。

    Statement
    The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
    The Future of HTML, CSS, and JavaScript: Web Development TrendsThe Future of HTML, CSS, and JavaScript: Web Development TrendsApr 19, 2025 am 12:02 AM

    The future trends of HTML are semantics and web components, the future trends of CSS are CSS-in-JS and CSSHoudini, and the future trends of JavaScript are WebAssembly and Serverless. 1. HTML semantics improve accessibility and SEO effects, and Web components improve development efficiency, but attention should be paid to browser compatibility. 2. CSS-in-JS enhances style management flexibility but may increase file size. CSSHoudini allows direct operation of CSS rendering. 3.WebAssembly optimizes browser application performance but has a steep learning curve, and Serverless simplifies development but requires optimization of cold start problems.

    HTML: The Structure, CSS: The Style, JavaScript: The BehaviorHTML: The Structure, CSS: The Style, JavaScript: The BehaviorApr 18, 2025 am 12:09 AM

    The roles of HTML, CSS and JavaScript in web development are: 1. HTML defines the web page structure, 2. CSS controls the web page style, and 3. JavaScript adds dynamic behavior. Together, they build the framework, aesthetics and interactivity of modern websites.

    The Future of HTML: Evolution and Trends in Web DesignThe Future of HTML: Evolution and Trends in Web DesignApr 17, 2025 am 12:12 AM

    The future of HTML is full of infinite possibilities. 1) New features and standards will include more semantic tags and the popularity of WebComponents. 2) The web design trend will continue to develop towards responsive and accessible design. 3) Performance optimization will improve the user experience through responsive image loading and lazy loading technologies.

    HTML vs. CSS vs. JavaScript: A Comparative OverviewHTML vs. CSS vs. JavaScript: A Comparative OverviewApr 16, 2025 am 12:04 AM

    The roles of HTML, CSS and JavaScript in web development are: HTML is responsible for content structure, CSS is responsible for style, and JavaScript is responsible for dynamic behavior. 1. HTML defines the web page structure and content through tags to ensure semantics. 2. CSS controls the web page style through selectors and attributes to make it beautiful and easy to read. 3. JavaScript controls web page behavior through scripts to achieve dynamic and interactive functions.

    HTML: Is It a Programming Language or Something Else?HTML: Is It a Programming Language or Something Else?Apr 15, 2025 am 12:13 AM

    HTMLisnotaprogramminglanguage;itisamarkuplanguage.1)HTMLstructuresandformatswebcontentusingtags.2)ItworkswithCSSforstylingandJavaScriptforinteractivity,enhancingwebdevelopment.

    HTML: Building the Structure of Web PagesHTML: Building the Structure of Web PagesApr 14, 2025 am 12:14 AM

    HTML is the cornerstone of building web page structure. 1. HTML defines the content structure and semantics, and uses, etc. tags. 2. Provide semantic markers, such as, etc., to improve SEO effect. 3. To realize user interaction through tags, pay attention to form verification. 4. Use advanced elements such as, combined with JavaScript to achieve dynamic effects. 5. Common errors include unclosed labels and unquoted attribute values, and verification tools are required. 6. Optimization strategies include reducing HTTP requests, compressing HTML, using semantic tags, etc.

    From Text to Websites: The Power of HTMLFrom Text to Websites: The Power of HTMLApr 13, 2025 am 12:07 AM

    HTML is a language used to build web pages, defining web page structure and content through tags and attributes. 1) HTML organizes document structure through tags, such as,. 2) The browser parses HTML to build the DOM and renders the web page. 3) New features of HTML5, such as, enhance multimedia functions. 4) Common errors include unclosed labels and unquoted attribute values. 5) Optimization suggestions include using semantic tags and reducing file size.

    Understanding HTML, CSS, and JavaScript: A Beginner's GuideUnderstanding HTML, CSS, and JavaScript: A Beginner's GuideApr 12, 2025 am 12:02 AM

    WebdevelopmentreliesonHTML,CSS,andJavaScript:1)HTMLstructurescontent,2)CSSstylesit,and3)JavaScriptaddsinteractivity,formingthebasisofmodernwebexperiences.

    See all articles

    Hot AI Tools

    Undresser.AI Undress

    Undresser.AI Undress

    AI-powered app for creating realistic nude photos

    AI Clothes Remover

    AI Clothes Remover

    Online AI tool for removing clothes from photos.

    Undress AI Tool

    Undress AI Tool

    Undress images for free

    Clothoff.io

    Clothoff.io

    AI clothes remover

    AI Hentai Generator

    AI Hentai Generator

    Generate AI Hentai for free.

    Hot Tools

    mPDF

    mPDF

    mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

    SublimeText3 English version

    SublimeText3 English version

    Recommended: Win version, supports code prompts!

    SublimeText3 Chinese version

    SublimeText3 Chinese version

    Chinese version, very easy to use

    Dreamweaver Mac version

    Dreamweaver Mac version

    Visual web development tools

    VSCode Windows 64-bit Download

    VSCode Windows 64-bit Download

    A free and powerful IDE editor launched by Microsoft