From df760f2c8786f0bdb11550ad07fe4e766afa78f6 Mon Sep 17 00:00:00 2001 From: Eltrac Date: Thu, 28 Nov 2024 22:50:39 +0800 Subject: remove(theme): unused file --- themes/yinyang/archetypes/default.md | 2 - themes/yinyang/exampleSite/.gitignore | 27 -- themes/yinyang/exampleSite/LICENSE | 21 -- themes/yinyang/exampleSite/README.md | 26 -- themes/yinyang/exampleSite/config.toml | 32 -- themes/yinyang/exampleSite/content/about.md | 18 -- themes/yinyang/exampleSite/content/cn/posts/cn.md | 17 - .../exampleSite/content/en/posts/goisforlovers.md | 343 --------------------- .../content/en/posts/hugoisforlovers.md | 88 ------ .../content/en/posts/migrate-from-jekyll.md | 159 ---------- themes/yinyang/exampleSite/layouts/.gitkeep | 0 themes/yinyang/exampleSite/static/.gitignore | 0 themes/yinyang/images/screenshot.png | Bin 16867 -> 0 bytes themes/yinyang/images/tn.png | Bin 9668 -> 0 bytes themes/yinyang/layouts/partials/disqus.html | 19 -- themes/yinyang/static/fonts/Arvo.woff2 | Bin 10600 -> 0 bytes .../static/fonts/PermanentMarker-Regular.woff2 | Bin 29352 -> 0 bytes themes/yinyang/static/images/tag.svg | 1 - themes/yinyang/static/js/lazyload.min.js | 2 - themes/yinyang/theme.toml | 25 -- 20 files changed, 780 deletions(-) delete mode 100644 themes/yinyang/archetypes/default.md delete mode 100644 themes/yinyang/exampleSite/.gitignore delete mode 100644 themes/yinyang/exampleSite/LICENSE delete mode 100644 themes/yinyang/exampleSite/README.md delete mode 100644 themes/yinyang/exampleSite/config.toml delete mode 100644 themes/yinyang/exampleSite/content/about.md delete mode 100644 themes/yinyang/exampleSite/content/cn/posts/cn.md delete mode 100644 themes/yinyang/exampleSite/content/en/posts/goisforlovers.md delete mode 100644 themes/yinyang/exampleSite/content/en/posts/hugoisforlovers.md delete mode 100644 themes/yinyang/exampleSite/content/en/posts/migrate-from-jekyll.md delete mode 100644 themes/yinyang/exampleSite/layouts/.gitkeep delete mode 100644 themes/yinyang/exampleSite/static/.gitignore delete mode 100644 themes/yinyang/images/screenshot.png delete mode 100644 themes/yinyang/images/tn.png delete mode 100644 themes/yinyang/layouts/partials/disqus.html delete mode 100644 themes/yinyang/static/fonts/Arvo.woff2 delete mode 100644 themes/yinyang/static/fonts/PermanentMarker-Regular.woff2 delete mode 100644 themes/yinyang/static/images/tag.svg delete mode 100644 themes/yinyang/static/js/lazyload.min.js delete mode 100644 themes/yinyang/theme.toml (limited to 'themes') diff --git a/themes/yinyang/archetypes/default.md b/themes/yinyang/archetypes/default.md deleted file mode 100644 index ac36e062..00000000 --- a/themes/yinyang/archetypes/default.md +++ /dev/null @@ -1,2 +0,0 @@ -+++ -+++ diff --git a/themes/yinyang/exampleSite/.gitignore b/themes/yinyang/exampleSite/.gitignore deleted file mode 100644 index ca4d540a..00000000 --- a/themes/yinyang/exampleSite/.gitignore +++ /dev/null @@ -1,27 +0,0 @@ -# Compiled Object files, Static and Dynamic libs (Shared Objects) -*.o -*.a -*.so - -# Folders -_obj -_test - -# Architecture specific extensions/prefixes -*.[568vq] -[568vq].out - -*.cgo1.go -*.cgo2.c -_cgo_defun.c -_cgo_gotypes.go -_cgo_export.* - -_testmain.go - -*.exe -*.test - -/public -/themes -.DS_Store diff --git a/themes/yinyang/exampleSite/LICENSE b/themes/yinyang/exampleSite/LICENSE deleted file mode 100644 index 4527efb9..00000000 --- a/themes/yinyang/exampleSite/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Steve Francia - -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 the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/themes/yinyang/exampleSite/README.md b/themes/yinyang/exampleSite/README.md deleted file mode 100644 index 49eb04a2..00000000 --- a/themes/yinyang/exampleSite/README.md +++ /dev/null @@ -1,26 +0,0 @@ -# hugoBasicExample - -This is an example site for [Hugo](https://gohugo.io/). - -It is intended to be a demo site for the various [Hugo themes](https://themes.gohugo.io/). - -# Using - -1. [Install Hugo](https://gohugo.io/overview/installing/) -2. Clone this repository -```bash -git clone https://github.com/gohugoio/hugoBasicExample.git -cd hugoBasicExample -``` -3. Clone the repository you want to test. If you want to test all hugo themes, you can clone [the full list](https://github.com/gohugoio/hugoThemes) -```bash -git clone --recursive https://URL/OF/YOUR/THEME themes/YOURTHEME -``` -or -```bash -git clone --recursive https://github.com/gohugoio/hugoThemes.git themes -``` -4. Run Hugo and select the theme of your choosing -```bash -hugo server -t YOURTHEME -``` diff --git a/themes/yinyang/exampleSite/config.toml b/themes/yinyang/exampleSite/config.toml deleted file mode 100644 index 8af9b605..00000000 --- a/themes/yinyang/exampleSite/config.toml +++ /dev/null @@ -1,32 +0,0 @@ -baseURL = "https://example.com" -languageCode = "en-us" -title = "Example YinYong Blog" -theme = "yinyang" -DefaultContentLanguage = "en" - -[author] - name = "Joway Wang" - homepage = "https://joway.io/" - -[languages] - [languages.en] - contentDir = "content/en" - languageName = "English" - weight = 1 - [languages.cn] - contentDir = "content/cn" - languageName = "Chinese" - weight = 1 - -[params] -disqus = "joway" # disqus account name -extraHead = '' -mainSections = ["posts"] - -[[params.socials]] -name = "RSS" -link = "/index.xml" - -[[params.socials]] -name = "About" -link = "https://joway.io" diff --git a/themes/yinyang/exampleSite/content/about.md b/themes/yinyang/exampleSite/content/about.md deleted file mode 100644 index 77adcf16..00000000 --- a/themes/yinyang/exampleSite/content/about.md +++ /dev/null @@ -1,18 +0,0 @@ -+++ -title = "About Hugo" -date = "2014-04-09" -menu = "main" -+++ - -Hugo is the **world’s fastest framework for building websites**. It is written in Go. - -It makes use of a variety of open source projects including: - -* https://github.com/russross/blackfriday -* https://github.com/alecthomas/chroma -* https://github.com/muesli/smartcrop -* https://github.com/spf13/cobra -* https://github.com/spf13/viper - -Learn more and contribute on [GitHub](https://github.com/gohugoio). - diff --git a/themes/yinyang/exampleSite/content/cn/posts/cn.md b/themes/yinyang/exampleSite/content/cn/posts/cn.md deleted file mode 100644 index 94f27abf..00000000 --- a/themes/yinyang/exampleSite/content/cn/posts/cn.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: 赤壁赋 -date: 2018-03-04 -categories: ['诗歌'] -draft: false ---- - -## 原文 - -壬戌之秋,七月既望,蘇子與客泛舟遊於赤壁之下。清風徐來,水波不興。舉酒屬客,誦明月之詩,歌窈窕之章。少焉,月出於東山之上,徘徊於斗牛之間。白露橫江,水光接天。縱一葦之所如,凌萬頃之茫然。浩浩乎如馮虛御風,而不知其所止;飄飄乎如遺世獨立,羽化而登仙。 - -於是飲酒樂甚,扣舷而歌之。歌曰:“桂棹兮蘭槳,擊空明兮溯流光。渺渺兮予懷,望美人兮天一方。”客有吹洞簫者,倚歌而和之。其聲嗚嗚然,如怨如慕,如泣如訴;餘音嫋嫋,不絕如縷。舞幽壑之潛蛟,泣孤舟之嫠婦。 - -蘇子愀然,正襟危坐,而問客曰:“何爲其然也?”客曰:“‘月明星稀,烏鵲南飛。’此非曹孟德之詩乎?西望夏口,東望武昌,山川相繆,鬱乎蒼蒼,此非孟德之困於周郎者乎?方其破荊州,下江陵,順流而東也,舳艫千里,旌旗蔽空,釃酒臨江,橫槊賦詩,固一世之雄也,而今安在哉?況吾與子漁樵於江渚之上,侶魚蝦而友麋鹿,駕一葉之扁舟,舉匏樽以相屬。寄蜉蝣於天地,渺滄海之一粟。哀吾生之須臾,羨長 江之無窮。挾飛仙以遨遊,抱明月而長終。知不可乎驟得,託遺響於悲風。” - -蘇子曰:“客亦知夫水與月乎?逝者如斯,而未嘗往也;盈虛者如彼,而卒莫消長也。蓋將自其變者而觀之,則天地曾不能以一瞬;自其不變者而觀之,則物與我皆無盡也,而又何羨乎!且夫天地之間,物各有主,苟非吾之所有,雖一毫而莫取。惟江上之清風,與山間之明月,耳得之而爲聲,目遇之而成色,取之無禁,用之不竭。是造物者之無盡藏也,而吾與子之所共適。”(共適 一作:共食) -客喜而笑,洗盞更酌。餚核既盡,杯盤狼籍。相與枕藉乎舟中,不知東方之既白。 diff --git a/themes/yinyang/exampleSite/content/en/posts/goisforlovers.md b/themes/yinyang/exampleSite/content/en/posts/goisforlovers.md deleted file mode 100644 index 5171f65c..00000000 --- a/themes/yinyang/exampleSite/content/en/posts/goisforlovers.md +++ /dev/null @@ -1,343 +0,0 @@ -+++ -title = "(Hu)go Template Primer" -description = "" -tags = [ - "go", - "golang", - "templates", - "themes", - "development", -] -date = "2014-04-02" -categories = [ - "Develop", -] -menu = "main" -+++ - -Hugo uses the excellent [Go][] [html/template][gohtmltemplate] library for -its template engine. It is an extremely lightweight engine that provides a very -small amount of logic. In our experience that it is just the right amount of -logic to be able to create a good static website. If you have used other -template systems from different languages or frameworks you will find a lot of -similarities in Go templates. - -This document is a brief primer on using Go templates. The [Go docs][gohtmltemplate] -provide more details. - -## Introduction to Go Templates - -Go templates provide an extremely simple template language. It adheres to the -belief that only the most basic of logic belongs in the template or view layer. -One consequence of this simplicity is that Go templates parse very quickly. - -A unique characteristic of Go templates is they are content aware. Variables and -content will be sanitized depending on the context of where they are used. More -details can be found in the [Go docs][gohtmltemplate]. - -## Basic Syntax - -Golang templates are HTML files with the addition of variables and -functions. - -**Go variables and functions are accessible within {{ }}** - -Accessing a predefined variable "foo": - - {{ foo }} - -**Parameters are separated using spaces** - -Calling the add function with input of 1, 2: - - {{ add 1 2 }} - -**Methods and fields are accessed via dot notation** - -Accessing the Page Parameter "bar" - - {{ .Params.bar }} - -**Parentheses can be used to group items together** - - {{ if or (isset .Params "alt") (isset .Params "caption") }} Caption {{ end }} - - -## Variables - -Each Go template has a struct (object) made available to it. In hugo each -template is passed either a page or a node struct depending on which type of -page you are rendering. More details are available on the -[variables](/layout/variables) page. - -A variable is accessed by referencing the variable name. - - {{ .Title }} - -Variables can also be defined and referenced. - - {{ $address := "123 Main St."}} - {{ $address }} - - -## Functions - -Go template ship with a few functions which provide basic functionality. The Go -template system also provides a mechanism for applications to extend the -available functions with their own. [Hugo template -functions](/layout/functions) provide some additional functionality we believe -are useful for building websites. Functions are called by using their name -followed by the required parameters separated by spaces. Template -functions cannot be added without recompiling hugo. - -**Example:** - - {{ add 1 2 }} - -## Includes - -When including another template you will pass to it the data it will be -able to access. To pass along the current context please remember to -include a trailing dot. The templates location will always be starting at -the /layout/ directory within Hugo. - -**Example:** - - {{ template "chrome/header.html" . }} - - -## Logic - -Go templates provide the most basic iteration and conditional logic. - -### Iteration - -Just like in Go, the Go templates make heavy use of range to iterate over -a map, array or slice. The following are different examples of how to use -range. - -**Example 1: Using Context** - - {{ range array }} - {{ . }} - {{ end }} - -**Example 2: Declaring value variable name** - - {{range $element := array}} - {{ $element }} - {{ end }} - -**Example 2: Declaring key and value variable name** - - {{range $index, $element := array}} - {{ $index }} - {{ $element }} - {{ end }} - -### Conditionals - -If, else, with, or, & and provide the framework for handling conditional -logic in Go Templates. Like range, each statement is closed with `end`. - - -Go Templates treat the following values as false: - -* false -* 0 -* any array, slice, map, or string of length zero - -**Example 1: If** - - {{ if isset .Params "title" }}

{{ index .Params "title" }}

{{ end }} - -**Example 2: If -> Else** - - {{ if isset .Params "alt" }} - {{ index .Params "alt" }} - {{else}} - {{ index .Params "caption" }} - {{ end }} - -**Example 3: And & Or** - - {{ if and (or (isset .Params "title") (isset .Params "caption")) (isset .Params "attr")}} - -**Example 4: With** - -An alternative way of writing "if" and then referencing the same value -is to use "with" instead. With rebinds the context `.` within its scope, -and skips the block if the variable is absent. - -The first example above could be simplified as: - - {{ with .Params.title }}

{{ . }}

{{ end }} - -**Example 5: If -> Else If** - - {{ if isset .Params "alt" }} - {{ index .Params "alt" }} - {{ else if isset .Params "caption" }} - {{ index .Params "caption" }} - {{ end }} - -## Pipes - -One of the most powerful components of Go templates is the ability to -stack actions one after another. This is done by using pipes. Borrowed -from unix pipes, the concept is simple, each pipeline's output becomes the -input of the following pipe. - -Because of the very simple syntax of Go templates, the pipe is essential -to being able to chain together function calls. One limitation of the -pipes is that they only can work with a single value and that value -becomes the last parameter of the next pipeline. - -A few simple examples should help convey how to use the pipe. - -**Example 1 :** - - {{ if eq 1 1 }} Same {{ end }} - -is the same as - - {{ eq 1 1 | if }} Same {{ end }} - -It does look odd to place the if at the end, but it does provide a good -illustration of how to use the pipes. - -**Example 2 :** - - {{ index .Params "disqus_url" | html }} - -Access the page parameter called "disqus_url" and escape the HTML. - -**Example 3 :** - - {{ if or (or (isset .Params "title") (isset .Params "caption")) (isset .Params "attr")}} - Stuff Here - {{ end }} - -Could be rewritten as - - {{ isset .Params "caption" | or isset .Params "title" | or isset .Params "attr" | if }} - Stuff Here - {{ end }} - - -## Context (aka. the dot) - -The most easily overlooked concept to understand about Go templates is that {{ . }} -always refers to the current context. In the top level of your template this -will be the data set made available to it. Inside of a iteration it will have -the value of the current item. When inside of a loop the context has changed. . -will no longer refer to the data available to the entire page. If you need to -access this from within the loop you will likely want to set it to a variable -instead of depending on the context. - -**Example:** - - {{ $title := .Site.Title }} - {{ range .Params.tags }} -
  • {{ . }} - {{ $title }}
  • - {{ end }} - -Notice how once we have entered the loop the value of {{ . }} has changed. We -have defined a variable outside of the loop so we have access to it from within -the loop. - -# Hugo Parameters - -Hugo provides the option of passing values to the template language -through the site configuration (for sitewide values), or through the meta -data of each specific piece of content. You can define any values of any -type (supported by your front matter/config format) and use them however -you want to inside of your templates. - - -## Using Content (page) Parameters - -In each piece of content you can provide variables to be used by the -templates. This happens in the [front matter](/content/front-matter). - -An example of this is used in this documentation site. Most of the pages -benefit from having the table of contents provided. Sometimes the TOC just -doesn't make a lot of sense. We've defined a variable in our front matter -of some pages to turn off the TOC from being displayed. - -Here is the example front matter: - -``` ---- -title: "Permalinks" -date: "2013-11-18" -aliases: - - "/doc/permalinks/" -groups: ["extras"] -groups_weight: 30 -notoc: true ---- -``` - -Here is the corresponding code inside of the template: - - {{ if not .Params.notoc }} -
    - {{ .TableOfContents }} -
    - {{ end }} - - - -## Using Site (config) Parameters -In your top-level configuration file (eg, `config.yaml`) you can define site -parameters, which are values which will be available to you in chrome. - -For instance, you might declare: - -```yaml -params: - CopyrightHTML: "Copyright © 2013 John Doe. All Rights Reserved." - TwitterUser: "spf13" - SidebarRecentLimit: 5 -``` - -Within a footer layout, you might then declare a `