Skip to content
This repository was archived by the owner on Mar 9, 2022. It is now read-only.

Commit

Permalink
chore: changed theme name in files
Browse files Browse the repository at this point in the history
fix #23
  • Loading branch information
victor-pogor committed Nov 11, 2020
1 parent d210c76 commit c1bd293
Show file tree
Hide file tree
Showing 13 changed files with 55 additions and 57 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

> **CodeIT** is a **clean**, **elegant** but **advanced** blog theme for [Hugo](https://gohugo.io/).
It is based on the original [LoveIt Theme](https://github.com/dillonzq/CodeIT), [LeaveIt Theme](https://github.com/liuzc/LeaveIt) and [KeepIt Theme](https://github.com/Fastbyte01/KeepIt).
It is based on the original [LoveIt Theme](https://github.com/dillonzq/LoveIt), [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 CodeIT](#why-choose-CodeIT) so that you can choose the one that works best for you.
Expand Down
2 changes: 1 addition & 1 deletion exampleSite/content/about/index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ math:

> [:(fas fa-laptop-code fa-fw): CodeIT](https://github.com/sunt-programator/CodeIT) is a **clean**, **elegant** but **advanced** blog theme for [Hugo](https://gohugo.io/).
>
> It is based on the original [LoveIt Theme](https://github.com/dillonzq/CodeIT), [LeaveIt Theme](https://github.com/liuzc/LeaveIt) and [KeepIt Theme](https://github.com/Fastbyte01/KeepIt).
> It is based on the original [LoveIt Theme](https://github.com/dillonzq/LoveIt), [LeaveIt Theme](https://github.com/liuzc/LeaveIt) and [KeepIt Theme](https://github.com/Fastbyte01/KeepIt).
![Hugo Theme CodeIT](/images/Apple-Devices-Preview.png "Hugo Theme CodeIT")

Expand Down
4 changes: 2 additions & 2 deletions exampleSite/content/posts/basic-markdown-syntax/index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ title: "Basic Markdown Syntax"
date: 2019-12-01T21:57:40+08:00
lastmod: 2020-01-01T16:45:40+08:00
draft: false
author: "Dillon"
authorLink: "https://dillonzq.com"
author: "Sunt Programator!"
authorLink: "https://suntprogramator.dev/"
description: "This article shows the basic Markdown syntax and format."
resources:
- name: "featured-image"
Expand Down
4 changes: 2 additions & 2 deletions exampleSite/content/posts/emoji-support/index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ title: "Emoji Support"
date: 2019-10-01T17:55:28+08:00
lastmod: 2019-10-01T17:55:28+08:00
draft: false
author: "Dillon"
authorLink: "https://dillonzq.com"
author: "Sunt Programator!"
authorLink: "https://suntprogramator.dev/"
description: "Guide to emoji usage in Hugo and CodeIT."
resources:
- name: "featured-image"
Expand Down
44 changes: 22 additions & 22 deletions exampleSite/content/posts/theme-documentation-basics/index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ title: "Theme Documentation - Basics"
date: 2020-03-06T21:29:01+08:00
lastmod: 2020-03-06T21:29:01+08:00
draft: false
author: "Dillon"
authorLink: "https://dillonzq.com"
description: "Discover what the Hugo - LoveIt theme is all about and the core-concepts behind it."
author: "Sunt Programator!"
authorLink: "https://suntprogramator.dev/"
description: "Discover what the Hugo - CodeIT theme is all about and the core-concepts behind it."
resources:
- name: "featured-image"
src: "featured-image.jpg"
Expand All @@ -20,7 +20,7 @@ toc:
auto: false
---

Discover what the Hugo - **LoveIt** theme is all about and the core-concepts behind it.
Discover what the Hugo - **CodeIT** theme is all about and the core-concepts behind it.

<!--more-->

Expand Down Expand Up @@ -53,26 +53,26 @@ cd my_website

### 2.2 Install the Theme

The **LoveIt** theme’s repository is: [https://github.com/sunt-programator/CodeIT](https://github.com/sunt-programator/CodeIT).
The **CodeIT** theme’s repository is: [https://github.com/sunt-programator/CodeIT](https://github.com/sunt-programator/CodeIT).

You can download the [latest release :(far fa-file-archive fa-fw): .zip file](https://github.com/sunt-programator/CodeIT/releases) of the theme and extract it in the `themes` directory.

Alternatively, clone this repository to the `themes` directory:

```bash
git clone https://github.com/sunt-programator/CodeIT.git themes/LoveIt
git clone https://github.com/sunt-programator/CodeIT.git themes/CodeIT
```

Or, create an empty git repository and make this repository a submodule of your site directory:

```bash
git init
git submodule add https://github.com/sunt-programator/CodeIT.git themes/LoveIt
git submodule add https://github.com/sunt-programator/CodeIT.git themes/CodeIT
```

### 2.3 Basic Configuration {#basic-configuration}

The following is a basic configuration for the LoveIt theme:
The following is a basic configuration for the CodeIT theme:

```toml
baseURL = "http://example.org/"
Expand All @@ -83,10 +83,10 @@ languageCode = "en"
title = "My New Hugo Site"

# Change the default theme to be use when building the site with Hugo
theme = "LoveIt"
theme = "CodeIT"

[params]
# LoveIt theme version
# CodeIT theme version
version = "0.2.X"

[menu]
Expand Down Expand Up @@ -188,13 +188,13 @@ Alternatively, you can use [AWS Amplify](https://gohugo.io/hosting-and-deploymen

### 3.1 Site Configuration {#site-configuration}

In addition to [Hugo global configuration](https://gohugo.io/overview/configuration/) and [menu configuration](#basic-configuration), **LoveIt** lets you define the following parameters in your site configuration (here is a `config.toml`, whose values are default).
In addition to [Hugo global configuration](https://gohugo.io/overview/configuration/) and [menu configuration](#basic-configuration), **CodeIT** lets you define the following parameters in your site configuration (here is a `config.toml`, whose values are default).

Please open the code block below to view the complete sample configuration :(far fa-hand-point-down fa-fw)::

```toml
[params]
# {{< version 0.2.0 changed >}} LoveIt theme version
# {{< version 0.2.0 changed >}} CodeIT theme version
version = "0.2.X"
# site description
description = "This is My New Hugo Site"
Expand All @@ -215,7 +215,7 @@ Please open the code block below to view the complete sample configuration :(far
# {{< version 0.2.0 >}} App icon config
[params.app]
# optional site title override for the app when added to an iOS home screen or Android launcher
title = "LoveIt"
title = "CodeIT"
# whether to omit favicon resource links
noFavicon = false
# modern SVG favicon to use in place of older style .png and .ico files
Expand Down Expand Up @@ -528,7 +528,7 @@ Please open the code block below to view the complete sample configuration :(far
serverURLs = ""
# {{< version 0.2.6 >}} emoji data file name, default is "google.yml"
# ("apple.yml", "google.yml", "facebook.yml", "twitter.yml")
# located in "themes/LoveIt/assets/data/emoji/" directory
# located in "themes/CodeIT/assets/data/emoji/" directory
# you can store your own data files in the same path under your project:
# "assets/data/emoji/"
emoji = ""
Expand Down Expand Up @@ -635,7 +635,7 @@ Please open the code block below to view the complete sample configuration :(far
[params.cdn]
# CDN data file name, disabled by default
# ("jsdelivr.yml")
# located in "themes/LoveIt/assets/data/cdn/" directory
# located in "themes/CodeIT/assets/data/cdn/" directory
# you can store your own data files in the same path under your project:
# "assets/data/cdn/"
data = ""
Expand Down Expand Up @@ -747,7 +747,7 @@ You could enable these features with `hugo serve -e production`.
data = ""
````

The default CDN data file is located in `themes/LoveIt/assets/data/cdn/` directory.
The default CDN data file is located in `themes/CodeIT/assets/data/cdn/` directory.
You can store your own data file in the same path under your project: `assets/data/cdn/`.
{{< /admonition >}}

Expand Down Expand Up @@ -778,7 +778,7 @@ Or You can set more options through a dict:
title = "Mastodon"
```

The default data of all supported social links is located in `themes/LoveIt/assets/data/social.yaml`,
The default data of all supported social links is located in `themes/CodeIT/assets/data/social.yaml`,
which is you can refer to.
{{< /admonition >}}

Expand Down Expand Up @@ -807,11 +807,11 @@ Customize `browserconfig.xml` and `site.webmanifest` to set theme-color and back
Hugo **extended** version is necessary for the style customization.
{{< /admonition >}}

**LoveIt** theme has been built to be as configurable as possible by defining custom `.scss` style files.
**CodeIT** theme has been built to be as configurable as possible by defining custom `.scss` style files.

The directory including the custom `.scss` style files is `assets/css` relative to **your project root directory**.

In `assets/css/_override.scss`, you can override the variables in `themes/LoveIt/assets/css/_variables.scss` to customize the style.
In `assets/css/_override.scss`, you can override the variables in `themes/CodeIT/assets/css/_variables.scss` to customize the style.

Here is a example:

Expand All @@ -824,7 +824,7 @@ In `assets/css/_custom.scss`, you can add some css style code to customize the s

## 4 Multilingual and i18n

**LoveIt** theme is fully compatible with Hugo multilingual mode, which provides in-browser language switching.
**CodeIT** theme is fully compatible with Hugo multilingual mode, which provides in-browser language switching.

![Language Switch](language-switch.gif "Language Switch")

Expand Down Expand Up @@ -973,15 +973,15 @@ Use [Front Matter parameter](https://gohugo.io/content-management/multilingual#t

Translations strings are used for common default values used in the theme. Translations are available in [some languages](#language-compatibility), but you may use another language or want to override default values.

To override these values, create a new file in your local i18n folder `i18n/<languageCode>.toml` and inspire yourself from `themes/LoveIt/i18n/en.toml`.
To override these values, create a new file in your local i18n folder `i18n/<languageCode>.toml` and inspire yourself from `themes/CodeIT/i18n/en.toml`.

By the way, as these translations could be used by other people, please take the time to propose a translation by [:(fas fa-code-branch fa-fw): making a PR](https://github.com/sunt-programator/CodeIT/pulls) to the theme!

## 5 Search

{{< version 0.2.0 >}}

Based on [Lunr.js](https://lunrjs.com/) or [algolia](https://www.algolia.com/), searching is supported in **LoveIt** theme.
Based on [Lunr.js](https://lunrjs.com/) or [algolia](https://www.algolia.com/), searching is supported in **CodeIT** theme.

### 5.1 Output Configuration

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ title: "Theme Documentation - Built-in Shortcodes"
date: 2020-03-04T16:29:41+08:00
lastmod: 2020-03-04T16:29:41+08:00
draft: false
author: "Dillon"
authorLink: "https://dillonzq.com"
author: "Sunt Programator!"
authorLink: "https://suntprogramator.dev/"
description: "Hugo provides multiple built-in shortcodes for author convenience and to keep your markdown content clean."
resources:
- name: "featured-image"
Expand Down
22 changes: 11 additions & 11 deletions exampleSite/content/posts/theme-documentation-content/index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ title: "Theme Documentation - Content"
date: 2020-03-05T15:58:26+08:00
lastmod: 2020-03-05T15:58:26+08:00
draft: false
author: "Dillon"
authorLink: "https://dillonzq.com"
description: "Find out how to create and organize your content quickly and intuitively in LoveIt theme."
author: "Sunt Programator!"
authorLink: "https://suntprogramator.dev/"
description: "Find out how to create and organize your content quickly and intuitively in CodeIT theme."
resources:
- name: "featured-image"
src: "featured-image.jpg"
Expand All @@ -22,7 +22,7 @@ math:
enable: true
---

Find out how to create and organize your content quickly and intuitively in **LoveIt** theme.
Find out how to create and organize your content quickly and intuitively in **CodeIT** theme.

<!--more-->

Expand Down Expand Up @@ -184,7 +184,7 @@ resources:
## 3 Content Summaries
**LoveIt** theme uses the summary of the content to display abstract information in the home page. Hugo can generate summaries of your content.
**CodeIT** theme uses the summary of the content to display abstract information in the home page. Hugo can generate summaries of your content.
![Summary Preview](summary.png "Summary Preview")
Expand Down Expand Up @@ -214,7 +214,7 @@ You might want your summary to be something other than the text that starts the

You might want your description in the `description` variable of the article front matter as the summary.

You may add the `<!--more-->` summary divider at the start of the article. Keep content that comes before the summary divider empty. Then **LoveIt** theme will use your description as the summary.
You may add the `<!--more-->` summary divider at the start of the article. Keep content that comes before the summary divider empty. Then **CodeIT** theme will use your description as the summary.

### Priority Order of Summary Selection

Expand All @@ -235,15 +235,15 @@ This part is shown in the [basic markdown syntax page](../basic-markdown-syntax/

## 5 Extended Markdown Syntax {#extended-markdown-syntax}

**LoveIt** theme has some extended syntax elements for you to write articles.
**CodeIT** theme has some extended syntax elements for you to write articles.

### Emoji Support

This part is shown in the [emoji support page](../emoji-support/).

### Mathematical Formula

**LoveIt** theme supports mathematical formulas based on [$ \KaTeX $](https://katex.org/).
**CodeIT** theme supports mathematical formulas based on [$ \KaTeX $](https://katex.org/).

Set the property `enable = true` under `[params.math]` in your [site configuration](../theme-documentation-basics#site-configuration)
and the property `math: true` of the article front matter to enable the automatic rendering of mathematical formulas.
Expand Down Expand Up @@ -316,7 +316,7 @@ $$ \ce{Hg^2+ ->[I-] HgI2 ->[I-] [Hg^{II}I4]^2-} $$

### Ruby Annotation {#ruby}

An extended Markdown syntax for **ruby annotation** is supported in **LoveIt** theme:
An extended Markdown syntax for **ruby annotation** is supported in **CodeIT** theme:

```markdown
[Hugo]{?^}(An open-source static site generator)
Expand All @@ -330,7 +330,7 @@ The rendered output looks like this:

{{< version 0.2.0 >}}

An extended Markdown syntax for **fraction** is supported in **LoveIt** theme:
An extended Markdown syntax for **fraction** is supported in **CodeIT** theme:

```markdown
[Light]{?/}[Dark]
Expand All @@ -346,7 +346,7 @@ The rendered output looks like this:

### Font Awesome {#fontawesome}

**LoveIt** theme uses [Font Awesome](https://fontawesome.com/) as the icon library.
**CodeIT** theme uses [Font Awesome](https://fontawesome.com/) as the icon library.
You can easily use these icons in your articles.

Get the `class` of icons you wanted from the [Font Awesome website](https://fontawesome.com/icons?d=gallery).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ title: "Theme Documentation - Extended Shortcodes"
date: 2020-03-03T16:29:41+08:00
lastmod: 2020-03-03T16:29:41+08:00
draft: false
author: "Dillon"
authorLink: "https://dillonzq.com"
description: "LoveIt theme provides multiple shortcodes on top of built-in ones in Hugo."
author: "Sunt Programator!"
authorLink: "https://suntprogramator.dev/"
description: "CodeIT theme provides multiple shortcodes on top of built-in ones in Hugo."
resources:
- name: "featured-image"
src: "featured-image.jpg"
Expand All @@ -19,7 +19,7 @@ categories: ["documentation"]
lightgallery: true
---

**LoveIt** theme provides multiple shortcodes on top of built-in ones in Hugo.
**CodeIT** theme provides multiple shortcodes on top of built-in ones in Hugo.

<!--more-->

Expand Down Expand Up @@ -1284,12 +1284,12 @@ Example `script` input:

```markdown
{{</* script */>}}
console.log('Hello LoveIt!');
console.log('Hello CodeIT!');
{{</* /script */>}}
```

You can see the output in the console of the developer tool.

{{< script >}}
console.log('Hello LoveIt!');
console.log('Hello CodeIT!');
{{< /script >}}
4 changes: 2 additions & 2 deletions exampleSite/static/site.webmanifest
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "LoveIt",
"short_name": "LoveIt",
"name": "CodeIT",
"short_name": "CodeIT",
"icons": [
{
"src": "/android-chrome-192x192.png",
Expand Down
4 changes: 2 additions & 2 deletions layouts/partials/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
</div>
{{- end -}}

{{- /* Hugo and LoveIt */ -}}
{{- /* Hugo and CodeIT */ -}}
{{- if ne .Site.Params.footer.hugo false -}}
<div class="footer-line">
{{- $hugo := printf `<a href="https://gohugo.io/" target="_blank" rel="noopener noreferrer" title="Hugo %v">Hugo</a>` hugo.Version -}}
{{- $theme := .Scratch.Get "version" | printf `<a href="https://github.com/sunt-programator/CodeIT" target="_blank" rel="noopener noreferrer" title="LoveIt %v"><i class="far fa-kiss-wink-heart fa-fw"></i> LoveIt</a>` -}}
{{- $theme := .Scratch.Get "version" | printf `<a href="https://github.com/sunt-programator/CodeIT" target="_blank" rel="noopener noreferrer" title="CodeIT %v"><i class="fas fa-notebook fa-fw"></i> CodeIT</a>` -}}
{{- dict "Hugo" $hugo "Theme" $theme | T "poweredBySome" | safeHTML }}
</div>
{{- end -}}
Expand Down
2 changes: 0 additions & 2 deletions layouts/partials/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
<i class="fas fa-chevron-right fa-fw"></i>
<select class="language-select" id="language-select-desktop" onchange="location = this.value;">
{{- if eq .Kind "404" -}}
{{- /* https://github.com/dillonzq/LoveIt/issues/378 */ -}}
{{- range .Sites -}}
{{- $link := printf "%v/404.html" .LanguagePrefix -}}
<option value="{{ $link }}"{{ if eq . $.Site }} selected{{ end }}>
Expand Down Expand Up @@ -155,7 +154,6 @@
<i class="fas fa-chevron-right fa-fw"></i>
<select class="language-select" onchange="location = this.value;">
{{- if eq .Kind "404" -}}
{{- /* https://github.com/dillonzq/LoveIt/issues/378 */ -}}
{{- range .Sites -}}
{{- $link := printf "%v/404.html" .LanguagePrefix -}}
<option value="{{ $link }}"{{ if eq . $.Site }} selected{{ end }}>
Expand Down
6 changes: 3 additions & 3 deletions layouts/partials/init.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{{- .Scratch.Set "version" "0.2.10" -}}

{{- /* LoveIt theme version detection */ -}}
{{- /* CodeIT theme version detection */ -}}
{{- $VERSION := "0.2.X" -}}
{{- if eq .Site .Sites.First -}}
{{- if not .Site.Params.version -}}
{{- errorf "Configuration Error 配置文件错误\n\nYou haven't configured the LoveIt version param correctly yet. See https://hugoloveit.com/theme-documentation-basics/#basic-configuration\n你还没有正确配置 LoveIt 的版本参数. 参考 https://hugoloveit.com/zh-cn/theme-documentation-basics/#basic-configuration\n" -}}
{{- errorf "Configuration Error 配置文件错误\n\nYou haven't configured the CodeIT version param correctly yet. See https://codeit.suntprogramator.dev/theme-documentation-basics/#basic-configuration\n你还没有正确配置 CodeIT 的版本参数. 参考 https://hugoCodeIT.com/zh-cn/theme-documentation-basics/#basic-configuration\n" -}}
{{- else if ne .Site.Params.version $VERSION -}}
{{- errorf (printf "Compatibility Error 兼容性错误\n\n%v -> %v:\nYou have an incompatible update. See https://github.com/dillonzq/LoveIt/releases\n你进行了一次不兼容的更新. 参考 https://github.com/dillonzq/LoveIt/releases\n" .Site.Params.version $VERSION) -}}
{{- errorf (printf "Compatibility Error 兼容性错误\n\n%v -> %v:\nYou have an incompatible update. See https://github.com/suntprogramator/CodeIT/releases\n你进行了一次不兼容的更新. 参考 https://github.com/suntprogramator/CodeIT/releases\n" .Site.Params.version $VERSION) -}}
{{- end -}}
{{- end -}}

Expand Down
Loading

0 comments on commit c1bd293

Please sign in to comment.