Skip to content

Commit

Permalink
Updated to new version
Browse files Browse the repository at this point in the history
  • Loading branch information
Fastbyte01 committed Oct 31, 2023
1 parent fad1bf3 commit 731caf8
Show file tree
Hide file tree
Showing 2,677 changed files with 52,547 additions and 8,342 deletions.
3 changes: 2 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
The MIT License (MIT)

Copyright (c) 2019 Giuseppe Pignataro
Copyright (c) 2018 LIUZHICHAO.COM
Copyright (c) 2019 DILLONZQ.COM

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down
20 changes: 0 additions & 20 deletions LICENSE.md

This file was deleted.

293 changes: 177 additions & 116 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,142 +1,203 @@
KeepIt Hugo Theme
========================

KeepIt is a clean, elegant, simple but not simpler blog theme for Hugo based on the original [LeaveIt Theme](https://github.com/liuzc/LeaveIt) developed by [LiuZhichao](https://github.com/liuzc).

![hugo-theme-KeepIt](https://github.com/Fastbyte01/KeepIt/blob/master/images/screenshot.png)

# Demo
To see this theme in action, Here is a live [demo site](https://suspicious-archimedes-ab369d.netlify.com) which is rendered with this theme.

People that are using **KeepIt**:

* [PapEr](https://page.codespaper.com)
* [SilkeHenderickx](http://www.silkehenderickx.be)
* [jmickey](https://mickey.dev/)
* [ssaraf](https://ssaraf.com/)

# Features

* Optimized for performance: 99/100 on mobile and 100/100 on desktop in Google PageSpeed Insights
* Optimized SEO performance with a correct SEO SCHEMA based on JSON-LD
* A More coerent style beetwen page and sections
* Multilanguage support
* Pagination support
* Google Analytics support
* Disqus Comment System
* Gitalk Comment System
* Valine Comment System
* Gitment Comment System
* Utterances Comment System
* Gravatar Support
* Local Avatar Support
* Share post support
* Search engine verification support (Google, Bind, Yandex and Baidu)
* Added configuration file for use on [Netlify](https://www.netlify.com)
* Dark/Light mode
* Up to 54 social sites supported out-of-the-box [see the list here](https://github.com/Fastbyte01/KeepIt/wiki/List-of-social-platforms-supported-out-of-box)
* Translation ready
* Wrap Image with Figure Tag without Shortcode. Thanks [Junian.Net](https://www.junian.net/hugo-image-figure-wrap/)
* Load images with Lazy Load By [lazysizes](https://github.com/aFarkas/lazysizes)
* Automatically highlighting code By [Google code-prettify](https://github.com/google/code-prettify), Customizable styles via CSS. See the [themes gallery](https://rawgit.com/google/code-prettify/master/styles/index.html).
* Automagical image gallery with [lightGallery](https://github.com/sachinchoolur/lightGallery)
# KeepIt Theme | Hugo [![Netlify Status](https://api.netlify.com/api/v1/badges/e60303f2-862c-4342-bf59-7c9adb10812e/deploy-status)](https://app.netlify.com/sites/hugo-keepit/deploys)

[![GitHub release (latest by date)](https://img.shields.io/github/v/release/dillonzq/KeepIt?style=flat-square)](https://github.com/Fastbyte01/KeepIt/releases)
[![Hugo](https://img.shields.io/badge/Hugo-%5E0.62.0-ff4088?style=flat-square&logo=hugo)](https://gohugo.io/)
[![License](https://img.shields.io/github/license/dillonzq/KeepIt?style=flat-square)](https://github.com/Fastbyte01/KeepIt/blob/master/LICENSE)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=dillonzq_KeepIt&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=dillonzq_KeepIt)
[![CircleCI](https://circleci.com/gh/dillonzq/KeepIt/tree/master.svg?style=svg)](https://circleci.com/gh/dillonzq/KeepIt/tree/master)

English README | [简体中文说明](https://github.com/Fastbyte01/KeepIt/blob/master/README.zh-cn.md)

> **KeepIt** is a **clean**, **elegant** but **advanced** blog theme for [Hugo](https://gohugo.io/).
It is based on the original [LeaveIt Theme](https://github.com/liuzc/LeaveIt) and [KeepIt Theme](https://github.com/Fastbyte01/KeepIt).

Since the three themes have a similar look, if you have questions about their differences,
read [Why choose KeepIt](#why-choose-keepit) so that you can choose the one that works best for you.

![Hugo Theme KeepIt](https://github.com/Fastbyte01/KeepIt/raw/master/images/Apple-Devices-Preview.png)

## [Demo Site](https://suspicious-archimedes-ab369d.netlify.app/)

To see this theme in action, here is a live [demo site](https://suspicious-archimedes-ab369d.netlify.app/) which is rendered with **KeepIt** theme.

## Why choose KeepIt

Compared to the original LeaveIt theme and the KeepIt theme, the KeepIt theme has the following modifications.

* Custom **Header**
* Custom **CSS Style**
* A new **home page**, compatible with the latest version of Hugo
* A lot of **style detail adjustments,** including color, font size, margins, code preview style
* More readable **dark mode**
* Some beautiful **CSS animations**
* Easy-to-use and self-expanding **table of contents**
* More **social links**, **share sites** and **comment system**
* **Search** supported by [Lunr.js](https://lunrjs.com/) or [algolia](https://www.algolia.com/)
* **Copy code** to clipboard with one click
* Extended Markdown syntax for **[Font Awesome](https://fontawesome.com/) icons**
* Extended Markdown syntax for **ruby annotation**
* Extended Markdown syntax for **fraction**
* **Mathematical formula** supported by [KaTeX](https://katex.org/)
* **Diagram syntax** shortcode supported by [mermaid](https://github.com/mermaid-js/mermaid)
* **Interactive data visualization** shortcode supported by [ECharts](https://echarts.apache.org/)
* **Mapbox** shortcode supported by [Mapbox GL JS](https://docs.mapbox.com/mapbox-gl-js)
* Embedded **music player** supported by [APlayer](https://github.com/MoePlayer/APlayer) and [MetingJS](https://github.com/metowolf/MetingJS)
* **Bilibili** player supported
* Kinds of **admonitions** shortcode supported
* Custom style shortcodes supported
* **CDN** for all third-party libraries supported
* ...

# Getting Started
Clone this repository to your hugo theme directory.
In short,
if you prefer the design language and freedom of the KeepIt theme,
if you want to use the extended Font Awesome icons conveniently,
if you want to embed mathematical formulas, flowcharts, music or Bilibili videos in your posts,
the KeepIt theme may be more suitable for you.

I hope you will KeepIt ❤️!

## Features

### Performance and SEO

* Optimized for **performance**: 99/100 on mobile and 100/100 on desktop in [Google PageSpeed Insights](https://developers.google.com/speed/pagespeed/insights)
* Optimized SEO performance with a correct **SEO SCHEMA** based on JSON-LD
* **[Google Analytics](https://analytics.google.com/analytics)** supported
* **[Fathom Analytics](https://usefathom.com/)** supported
* Search engine **verification** supported (Google, Bind, Yandex and Baidu)
* **CDN** for third-party libraries supported
* Automatically converted images with **Lazy Load** by [lazysizes](https://github.com/aFarkas/lazysizes)

### Appearance and Layout

* **Desktop/Mobile Responsive** layout
* **Light/Dark** mode
* Globally consistent **design language**
* **Pagination** supported
* Easy-to-use and self-expanding **table of contents**
* **Multilanguage** supported and i18n ready
* Beautiful **CSS animation**

### Social and Comment Systems

* **Gravatar** supported by [Gravatar](https://gravatar.com)
* Local **Avatar** supported
* Up to **64** social links supported
* Up to **24** share sites supported
* **Disqus** comment system supported by [Disqus](https://disqus.com)
* **Gitalk** comment system supported by [Gitalk](https://github.com/gitalk/gitalk)
* **Valine** comment system supported by [Valine](https://valine.js.org/)
* **Facebook comments** system supported by [Facebook](https://developers.facebook.com/docs/plugins/comments/)
* **Telegram comments** system supported by [Telegram Comments](https://comments.app/)
* **Commento** comment system supported by [Commento](https://commento.io/)
* **Utterances** comment system supported by [Utterances](https://utteranc.es/)

### Extended Features

* **Search** supported by [Lunr.js](https://lunrjs.com/) or [algolia](https://www.algolia.com/)
* **Twemoji** supported
* Automatically **highlighting** code
* **Copy code** to clipboard with one click
* **Images gallery** supported by [lightGallery](https://github.com/sachinchoolur/lightgallery)
* Extended Markdown syntax for **[Font Awesome](https://fontawesome.com/) icons**
* Extended Markdown syntax for **ruby annotation**
* Extended Markdown syntax for **fraction**
* **Mathematical formula** supported by [KaTeX](https://katex.org/)
* **Diagrams** shortcode supported by [mermaid](https://github.com/mermaid-js/mermaid)
* **Interactive data visualization** shortcode supported by [ECharts](https://echarts.apache.org/)
* **Mapbox** shortcode supported by [Mapbox GL JS](https://docs.mapbox.com/mapbox-gl-js)
* **Music player** shortcode supported by [APlayer](https://github.com/MoePlayer/APlayer) and [MetingJS](https://github.com/metowolf/MetingJS)
* **Bilibili player** shortcode
* Kinds of **admonitions** shortcode
* **Custom style** shortcode
* **Custom script** shortcode
* **Animated typing** supported by [TypeIt](https://typeitjs.com/)
* **Cookie consent banner** supported by [cookieconsent](https://github.com/osano/cookieconsent)
* ...

```bash
cd themes
git clone https://github.com/Fastbyte01/KeepIt.git
```
## [Documentation](https://suspicious-archimedes-ab369d.netlify.app/categories/documentation/)

Build Documentation Locally:

Next, open config.toml in the base of the Hugo site and ensure the theme option is set to KeepIt:
```bash
theme = "KeepIt"
hugo server --source=exampleSite
```
For more information read the [official setup guide](https://gohugo.io/documentation/) of Hugo.

# Site Configuration
Take a look in the `exampleSite` folder.

This directory contains an example config file and the content for the demo. It serves as an example setup for your documentation.

Copy the `config.toml` in the root directory of your website. Overwrite the existing config file if necessary.

# Content Suggestions

A few suggestions to help you get a good looking site quickly:

* Keep blog posts in the content/posts directory, for example: content/posts/my-first-post.md
* Keep static pages in the content directory, for example: content/about.md
* Keep media like images in the static directory, for example: static/images/2019/10/screenshot.png
## Multilingual and i18n

# Customizing styles for your website
KeepIt supports the following languages:

If you want to change some styling to fit your own website needs, you can edit them:
* English
* Simplified Chinese
* Traditional Chinese
* French
* Polish
* Brazilian Portuguese
* Italian
* Spanish
* German
* Serbian
* Russian
* Romanian
* Vietnamese
* [Contribute with a new language](https://github.com/Fastbyte01/KeepIt/pulls)

* `assets/css/_varibales/default.scss`: You can override the variables in `_variables.scss` to customize the style
* `assets/css/_custom.scss` : You can put your custom css in this file
[Languages Compatibility](https://suspicious-archimedes-ab369d.netlify.app/theme-documentation-basics/#language-compatibility)

# Favicons, Browserconfig, Manifest
## [Roadmap](https://github.com/Fastbyte01/KeepIt/projects/1)

It is recommended to put your own favicons
## Questions, ideas, bugs, pull requests

* apple-touch-icon.png (180x180)
* favicon-32x32.png (32x32)
* favicon-16x16.png (16x16)
* mstile-150x150.png (150x150)
* android-chrome-192x192.png (192x192)
* android-chrome-512x512.png (512x512)

into `/static`. They’re easily created via https://realfavicongenerator.net/.

Customize browserconfig.xml and site.webmanifest to set theme-color and background-color for example.
All feedback is welcome! Head over to the [issue tracker](https://github.com/Fastbyte01/KeepIt/issues).

# Tips
## License

#### Set production environment when generating site
KeepIt is licensed under the **MIT** license. Check the [LICENSE file](https://github.com/Fastbyte01/KeepIt/blob/master/LICENSE) for details.

Because some functions are only in production mode, So you **need to add a production** environment variables when generating your site.
```bash
HUGO_ENV=production hugo --gc --minify
```
## Special Thanks

#### Hugo “extended” Sass/SCSS version required
Thanks to the authors of following resources included in the theme:

This theme write style with scss, So you must download and install the “extended” Sass/SCSS version
* [normalize.css](https://github.com/necolas/normalize.css)
* [Font Awesome](https://fontawesome.com/)
* [Simple Icons](https://github.com/simple-icons/simple-icons)
* [Animate.css](https://daneden.github.io/animate.css/)
* [autocomplete](https://github.com/algolia/autocomplete)
* [Lunr.js](https://lunrjs.com/)
* [algoliasearch](https://github.com/algolia/algoliasearch-client-javascript)
* [lazysizes](https://github.com/aFarkas/lazysizes)
* [object-fit-images](https://github.com/fregante/object-fit-images)
* [Twemoji](https://github.com/twitter/twemoji)
* [emoji-data](https://github.com/iamcal/emoji-data)
* [lightGallery](https://github.com/sachinchoolur/lightgallery)
* [clipboard.js](https://github.com/zenorocha/clipboard.js)
* [Sharer.js](https://github.com/ellisonleao/sharer.js)
* [TypeIt](https://typeitjs.com/)
* [KaTeX](https://katex.org/)
* [mermaid](https://github.com/mermaid-js/mermaid)
* [ECharts](https://echarts.apache.org/)
* [Mapbox GL JS](https://docs.mapbox.com/mapbox-gl-js)
* [APlayer](https://github.com/MoePlayer/APlayer)
* [MetingJS](https://github.com/metowolf/MetingJS)
* [Gitalk](https://github.com/gitalk/gitalk)
* [Valine](https://valine.js.org/)
* [cookieconsent](https://github.com/osano/cookieconsent)

#### How to toggle dark-light mode
* You can click the sun logo to toggle dark-light mode. In the desktop version the sun logo is to the right and in the mobile version is positioned to the left, close to the site title.
* If you want to make your own theme toggle-able element, you can create an element with a class `.theme-switch`. See [here](https://github.com/Fastbyte01/KeepIt/blob/master/assets/js/main.js#L32)
## Author

# Home Post model
If you want to show posts on index instead of a personal profile, just open config.toml in the base of the Hugo site, add the following line to config.toml
```toml
[params]
home_mode = "post" # post or other
```
# Add logo and cover for SEO

Add a logo image (127x40) and a cover image (800x600). This images are used for SEO.

# Questions, ideas, bugs, pull requests?
All feedback is welcome! Head over to the [issue tracker](https://github.com/Fastbyte01/KeepIt/issues).
[Dillon](https://dillonzq.com)

For more configuration info or other tips you can see the [wiki](https://github.com/Fastbyte01/KeepIt/wiki).
## Sponsor

# License
LeaveIt is licensed under the MIT license. Check the LICENSE file for details.
The following resources are included in the theme:
If you enjoy the theme, please consider buying me a coffee ☕️.

* lazysizes - https://github.com/aFarkas/lazysizes
* lightGallery - https://github.com/sachinchoolur/lightGallery
* code-prettify - https://github.com/google/code-prettify
* [PayPal](https://paypal.me/dillonzq)
* [Alipay](https://github.com/Fastbyte01/KeepIt/raw/master/images/Alipay.jpg)
* [Wechat](https://github.com/Fastbyte01/KeepIt/raw/master/images/Wechat.jpg)

# Author
[Fastbyte01](https://github.com/Fastbyte01)
Thanks! ❤️

# See Also
## Stargazers over time

* [Hermitt](https://github.com/Track3/hermit)
* [Goa](https://github.com/shenoybr/hugo-goa)
[![Stargazers over time](https://starchart.cc/dillonzq/KeepIt.svg)](https://starchart.cc/dillonzq/KeepIt)
Loading

0 comments on commit 731caf8

Please sign in to comment.