diff --git a/README.md b/README.md index 55f585f92..ddb6e9614 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ +English | [简体中文](https://github.com/nunocoracao/blowfish/blob/main/README.zh-cn.md) # Blowfish [![Deploy Production to Firebase](https://github.com/nunocoracao/blowfish/actions/workflows/firebase-production.yml/badge.svg)](https://github.com/nunocoracao/blowfish/actions/workflows/firebase-production.yml) [![Deploy Production to GitHub pages](https://github.com/nunocoracao/blowfish/actions/workflows/pages.yml/badge.svg)](https://github.com/nunocoracao/blowfish/actions/workflows/pages.yml) @@ -141,7 +142,7 @@ blowfish-tools new mynewsite 3. Start your server using `hugo server` and the theme will be downloaded automatically. -4. In the root folder of your website, delete the `config.toml` file that was generated by Hugo. Copy the `*.toml` config files from the theme into your `config/_default/` folder. +4. In the root folder of your website, delete the `hugo.toml` file that was generated by Hugo. Copy the `*.toml` config files from the theme into your `config/_default/` folder. > **Note:** Do not overwrite the `module.toml` file you created above! diff --git a/README.zh-cn.md b/README.zh-cn.md new file mode 100644 index 000000000..6e965df11 --- /dev/null +++ b/README.zh-cn.md @@ -0,0 +1,176 @@ +[English](https://github.com/nunocoracao/blowfish/blob/main/README.md) | 简体中文 +# Blowfish +[![Deploy Production to Firebase](https://github.com/nunocoracao/blowfish/actions/workflows/firebase-production.yml/badge.svg)](https://github.com/nunocoracao/blowfish/actions/workflows/firebase-production.yml) +[![Deploy Production to GitHub pages](https://github.com/nunocoracao/blowfish/actions/workflows/pages.yml/badge.svg)](https://github.com/nunocoracao/blowfish/actions/workflows/pages.yml) +[![Minimum Hugo Version](https://img.shields.io/static/v1?label=min-HUGO-version&message=0.87.0&color=blue&logo=hugo)](https://github.com/gohugoio/hugo/releases/tag/v0.87.0) +[![GitHub](https://img.shields.io/github/license/nunocoracao/blowfish)](https://github.com/nunocoracao/blowfish/blob/main/LICENSE) +[![Blowfish](https://img.shields.io/badge/Hugo--Themes-@Blowfish-blue)](https://themes.gohugo.io/themes/blowfish/) +![code-size](https://img.shields.io/github/languages/code-size/nunocoracao/blowfish) + +Blowfish 是一个轻量有力的 Hugo 主题。它使用 Tailwind CSS 构建,洁净而富有极简主义,是你网站内容载体的不二之选。 + +![blowfish screenshot](https://github.com/nunocoracao/blowfish/blob/main/images/screenshot.png?raw=true) + + +🌏 [示例站点](https://blowfish.page/zh-cn/) +📑 [主题文档](https://blowfish.page/zh-cn/docs/) +💎 [周边商店](http://tee.pub/lic/qwSlWVBL5zc) +🐛 [Bug 问题报告](https://github.com/nunocoracao/blowfish/issues) +💡 [问答和功能需求](https://github.com/nunocoracao/blowfish/discussions) + + + +Buy Me A Coffee + + + + +## 特性 + +- 使用 Tailwind CSS 3.0 构建全面响应式布局 +- 多种配色方案,亦可完全由你定义 +- 夜间模式支持(手动开启/关闭或根据用户设备自动切换) +- 高度自主的配置方式 +- 集成 Firebase 以支持动态数据统计 +- 集成浏览次数统计和点赞机制 +- “相关文章”列表生成 +- 多种主页布局 +- 多作者模式支持 +- 可将文章整理成选集列表 +- 禅模式支持 +- 可灵活定义各种内容类型、分类标准和菜单 +- 页眉和页脚双重菜单可选 +- 支持嵌套菜单和子导航菜单 +- 支持多语言内容,包括 RTL 语言 +- 可链接到第三方网站上的帖子 +- 支持多种简码,如图库、时间轴、GitHub 卡片和图片灯箱 +- 支持 Buymeacoffee +- 拥有由 Fuse.js 支持的客户端一侧网站搜索功能 +- 植入了基于 Mermaid 的图表功能 +- 植入了基于 Chart.js 的图表功能 +- 集成逼真的自动打字效果 +- 集成性能优化的 Youtube 卡片简码 +- 集成 KaTeX 的公式 +- 集成 FontAwesome 6 的矢量图标引用 +- 使用 Hugo Pipes 自动调整图像大小 +- 拥有标题锚点、目录、代码复制、按钮、分类徽章等功能 +- 文章内部支持 HTML 和 Emoji 🎉 +- 便于搜索引擎优化,文章可一键分享到社交媒体 +- 支持 Fathom Analytics 和 Google Analytics +- 支持 RSS 订阅、网站图标和评论功能 +- 可使用简单的 Tailwind 对颜色和样式进行高级定制 +- 优化了性能和可访问性,拥有极高的 Lighthouse 评分 +- 文档齐全,定期更新 + +--- + +![blowfish logo](https://github.com/nunocoracao/blowfish/blob/main/logo.png?raw=true) + +## 文档 +Blowfish 有 [全面的文档](https://blowfish.page/zh-cn/docs/),覆盖主题的任何一个方面。 请确保 [阅读文档](https://blowfish.page/zh-cn/docs/) 以详细了解本主题有哪些功能。 + +--- + +## 安装 + +Blowfish 支持多种安装方式,既能作为 git 子模块、Hugo 模块,也可完全手动安装。 + +每种方法的详细说明都可以在 [安装](https://blowfish.page/zh-cn/docs/installation) 文档中找到。为了获得最简单的安装体验,请查阅文档。如果你使用的是 git,请阅读下面使用子模块的快速开始指南;如果你能安装 Hugo 主题,请阅读下面 Hugo 模块的快速开始指南。 + +### 使用 Blowfish Tools 快速开始 + +> **注:** 请确保你已安装 **Node.js**、 **Git**、 **Go** 和 **Hugo** ,且已经创建了一个 Hugo 工程。 + +我们最新推出了一个新的 CLI 工具,帮助你开始使用 Blowfish。它将为你创建一个新的 Hugo 项目、安装主题并设置主题配置文件。它仍处于测试阶段,因此请 [报告你发现的任何问题](https://github.com/nunocoracao/blowfish-tools)。 + +使用 npm(或其他软件包管理器)全局安装 CLI 工具: +```shell +npm i -g blowfish-tools +``` + +然后运行 "blowfish-tools "命令,开启一个交互式进程,引导你完成创建和配置。 +```shell +blowfish-tools +``` + +你也可以运行命令 `blowfish-tools new` 来创建一个新的 Hugo 项目,并一次性安装主题。更多信息请查看 CLI 帮助。 +```shell +blowfish-tools new mynewsite +``` + +### 使用 git 子模块快速开始 + +> **注:** 请确保你已安装 **Node.js**、 **Git**、 **Go** 和 **Hugo** ,且已经创建了一个 Hugo 工程。 + +1. 从你工程的所在目录初始化 git 仓库 + + ```shell + git init + ``` + +2. 配置 Blowfish 作为 git 子模块 + + ```shell + git submodule add -b main https://github.com/nunocoracao/blowfish.git themes/blowfish + ``` + +3. 在你网站的根目录中删除由 Hugo 自动生成的 `config.toml`文件,并把主题文件夹中的`*.toml`配置文件复制到你的 `config/_default/`文件夹中 + + 你可在 Hugo 缓存目录中找到主题配置文件,或者也可以从[这里](https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/nunocoracao/blowfish/tree/main/config/_default)下载一份。 + +4. 按照[入门指南](https://blowfish.page/zh-cn/docs/getting-started/)来配置你的网站 + +### 使用 Hugo 快速开始 + +> **注:** 确保你已经安装了 **Go** 和 **Hugo**,且已创建了一个 Hugo 工程。 + +1. 从你工程的所在目录初始化 Hugo 模块 + + ```shell + hugo mod init github.com/<用户名>/<仓库名> + ``` + +2. 新建 `config/_default/module.toml` 并写入以下内容: + + ```toml + [[imports]] + path = "github.com/nunocoracao/blowfish/v2" + ``` + +3. 运行 `hugo server` 启动你的本地服务器,本主题就会自动下载。 + +4. 在你网站的根目录中删除由 Hugo 自动生成的 `config.toml`文件,并把主题文件夹中的`*.toml`配置文件复制到你的 `config/_default/`文件夹中 + + > **注** 不要覆盖之前的 `module.toml` ! + + 你可在 Hugo 缓存目录中找到主题配置文件,或者也可以从[这里](https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/nunocoracao/blowfish/tree/main/config/_default)下载一份。 + +5. 按照[入门指南](https://blowfish.page/zh-cn/docs/getting-started/)来配置你的网站 + +### Installing theme updates + +当新的主题版本发布,你可以在你网站的根目录使用 Hugo 命令`hugo mod get -u`来简单地把主题更新到最新版本。 + +详细的[更新指南](https://blowfish.page/zh-cn/docs/installation/#%E6%9B%B4%E6%96%B0%E4%B8%BB%E9%A2%98)在文档中。 + +--- + +## 贡献 + +Blowfish 将会持续进化。我打算不断增加功能,并按需进行修改。 + +如有任何问题或对新功能的建议,请随时联系我。 + +- 🐛 **Bug 问题报告** 使用 [GitHub Issues](https://github.com/nunocoracao/blowfish/issues) +- 💡 **发表关于新功能的想法:** 在 [GitHub Discussions](https://github.com/nunocoracao/blowfish/discussions) 发起讨论 +- 🙋‍♀️ **一般问题:** 查看 [GitHub Discussions](https://github.com/nunocoracao/blowfish/discussions) + +如果你有能力修补 Bug 或者实现新功能,欢迎提交 PR。[了解更多](https://github.com/nunocoracao/blowfish/blob/main/CONTRIBUTING.md). + +--- + +## Star 数量统计 + +[![Stargazers over time](https://starchart.cc/nunocoracao/blowfish.svg)](https://starchart.cc/nunocoracao/blowfish) + +Mastodon diff --git a/assets/css/compiled/main.css b/assets/css/compiled/main.css index 39360000d..e25ddcc10 100644 --- a/assets/css/compiled/main.css +++ b/assets/css/compiled/main.css @@ -14,7 +14,7 @@ body.zen-mode-enable { } } -/*! tailwindcss v3.4.6 | MIT License | https://tailwindcss.com */ +/*! tailwindcss v3.4.7 | MIT License | https://tailwindcss.com */ /* 1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4) @@ -3163,6 +3163,13 @@ body button { width:1em } +/* Scale SVG logos to appropriate size */ + +.logo svg { + height:5rem; + width:5rem +} + /* Search */ #search-query::-webkit-search-cancel-button, @@ -3346,6 +3353,14 @@ code { /* Renamed property in CSS3 draft spec */ } +/* Fix long URLs breaking out of article bounds on mobile */ + +a { + word-break: break-word; + word-wrap: break-word; + overflow-wrap: break-word; +} + /* -- Chroma Highlight -- */ /* Background */ @@ -5339,6 +5354,10 @@ pre { left:0px } + .lg\:top-10 { + top:2.5rem + } + .lg\:top-\[140px\] { top:140px } diff --git a/assets/css/main.css b/assets/css/main.css index 7f46d01e4..6db696095 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -16,6 +16,11 @@ body button { @apply h-[1em] w-[1em]; } +/* Scale SVG logos to appropriate size */ +.logo svg { + @apply h-[5rem] w-[5rem]; +} + /* Search */ #search-query::-webkit-search-cancel-button, #search-query::-webkit-search-decoration, @@ -128,6 +133,13 @@ code { overflow-wrap: break-word; /* Renamed property in CSS3 draft spec */ } +/* Fix long URLs breaking out of article bounds on mobile */ +a { + word-break: break-word; + word-wrap: break-word; + overflow-wrap: break-word; +} + /* -- Chroma Highlight -- */ /* Background */ .prose .chroma { diff --git a/assets/icons/forgejo.svg b/assets/icons/forgejo.svg new file mode 100644 index 000000000..495ac8b8e --- /dev/null +++ b/assets/icons/forgejo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/icons/gitea.svg b/assets/icons/gitea.svg new file mode 100644 index 000000000..7985d9335 --- /dev/null +++ b/assets/icons/gitea.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/lib/typeit/typeit.umd.js b/assets/lib/typeit/typeit.umd.js index afd060fdc..453d618c9 100644 --- a/assets/lib/typeit/typeit.umd.js +++ b/assets/lib/typeit/typeit.umd.js @@ -1,2 +1,2 @@ // TypeIt by Alex MacArthur - https://typeitjs.com -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).TypeIt=t()}(this,(function(){"use strict";const e=e=>Array.isArray(e),t=t=>e(t)?t:[t];const s="data-typeit-id",i="ti-cursor",r={started:!1,completed:!1,frozen:!1,destroyed:!1},n={breakLines:!0,cursor:{autoPause:!0,autoPauseDelay:500,animation:{frames:[0,0,1].map((e=>({opacity:e}))),options:{iterations:1/0,easing:"steps(2, start)",fill:"forwards"}}},cursorChar:"|",cursorSpeed:1e3,deleteSpeed:null,html:!0,lifeLike:!0,loop:!1,loopDelay:750,nextStringDelay:750,speed:100,startDelay:250,startDelete:!1,strings:[],waitUntilVisible:!1,beforeString:()=>{},afterString:()=>{},beforeStep:()=>{},afterStep:()=>{},afterComplete:()=>{}},o=`[${s}]:before {content: '.'; display: inline-block; width: 0; visibility: hidden;}`,a=e=>document.createElement(e),u=e=>document.createTextNode(e),l=(e,t="")=>{let s=a("style");s.id=t,s.appendChild(u(e)),document.head.appendChild(s)},h=t=>(e(t)||(t=[t/2,t/2]),t),d=(e,t)=>Math.abs(Math.random()*(e+t-(e-t))+(e-t));let p=e=>e/2;const c=e=>Array.from(e);let m=e=>([...e.childNodes].forEach((e=>{if(e.nodeValue)return[...e.nodeValue].forEach((t=>{e.parentNode.insertBefore(u(t),e)})),void e.remove();m(e)})),e);const f=e=>{let t=document.implementation.createHTMLDocument();return t.body.innerHTML=e,m(t.body)};function y(e,t=!1,s=!1){let r,n=e.querySelector(`.${i}`),o=document.createTreeWalker(e,NodeFilter.SHOW_ALL,{acceptNode:e=>{if(n&&s){if(e.classList?.contains(i))return NodeFilter.FILTER_ACCEPT;if(n.contains(e))return NodeFilter.FILTER_REJECT}return e.classList?.contains(i)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),a=[];for(;r=o.nextNode();)r.originalParent||(r.originalParent=r.parentNode),a.push(r);return t?a.reverse():a}function g(e,t=!0){return t?y(f(e)):c(e).map(u)}const b=e=>Number.isInteger(e),P=({queueItems:e,selector:t,cursorPosition:s,to:i})=>{if(b(t))return-1*t;let r=new RegExp("END","i").test(i),n=t?[...e].reverse().findIndex((({char:e})=>{let s=e.parentElement,i=s.matches(t);return!(!r||!i)||i&&s.firstChild.isSameNode(e)})):-1;return n<0&&(n=r?0:e.length-1),n-s+(r?0:1)},C=(e,t)=>new Array(t).fill(e);let v=e=>new Promise((t=>{requestAnimationFrame((async()=>{t(await e())}))})),T=e=>e?.getAnimations().find((t=>t.id===e.dataset.tiAnimationId)),w=({cursor:e,frames:t,options:s})=>{let i=e.animate(t,s);return i.pause(),i.id=e.dataset.tiAnimationId,v((()=>{v((()=>{i.play()}))})),i},I=e=>e.func?.call(null),q=async({index:e,queueItems:t,wait:s,cursor:i,cursorOptions:r})=>{let n=t[e][1],o=[],a=e,u=n,l=()=>u&&!u.delay,h=n.shouldPauseCursor()&&r.autoPause;for(;l();)o.push(u),l()&&a++,u=t[a]?t[a][1]:null;if(o.length)return await v((async()=>{for(let e of o)await I(e)})),a-1;let d,p=T(i);return p&&(d={...p.effect.getComputedTiming(),delay:h?r.autoPauseDelay:0}),await s((async()=>{p&&h&&p.cancel(),await v((()=>{I(n)}))}),n.delay),await(({cursor:e,options:t,cursorOptions:s})=>{if(!e||!s)return;let i,r=T(e);r&&(t.delay=r.effect.getComputedTiming().delay,i=r.currentTime,r.cancel());let n=w({cursor:e,frames:s.animation.frames,options:t});return i&&(n.currentTime=i),n})({cursor:i,options:d,cursorOptions:r}),e};const S=e=>"value"in e;let N=e=>"function"==typeof e?e():e,A=(e,t=document,s=!1)=>t["querySelector"+(s?"All":"")](e);const E=(e,t)=>Object.assign({},e,t);let L={"font-family":"","font-weight":"","font-size":"","font-style":"","line-height":"",color:"",transform:"translateX(-.125em)"};return class{element;timeouts;cursorPosition;predictedCursorPosition;statuses={started:!1,completed:!1,frozen:!1,destroyed:!1};opts;id;queue;cursor;unfreeze=()=>{};constructor(e,s={}){var i;this.opts=E(n,s),this.element="string"==typeof(i=e)?A(i):i,this.timeouts=[],this.cursorPosition=0,this.unfreeze=()=>{},this.predictedCursorPosition=null,this.statuses=E({},r),this.id=Math.random().toString().substring(2,9),this.queue=function(e){let s=function(e){return t(e).forEach((e=>n.set(Symbol(e.char?.innerText),i({...e})))),this},i=e=>(e.shouldPauseCursor=function(){return Boolean(this.typeable||this.cursorable||this.deletable)},e),r=()=>Array.from(n.values()),n=new Map;return s(e),{add:s,set:function(e,t){let s=[...n.keys()];n.set(s[e],i(t))},wipe:function(){n=new Map,s(e)},done:(e,t=!1)=>t?n.delete(e):n.get(e).done=!0,reset:function(){n.forEach((e=>delete e.done))},destroy:e=>n.delete(e),getItems:(e=!1)=>e?r():r().filter((e=>!e.done)),getQueue:()=>n,getTypeable:()=>r().filter((e=>e.typeable))}}([{delay:this.opts.startDelay}]),this.#e(s),this.cursor=this.#t(),this.element.dataset.typeitId=this.id,l(o),this.opts.strings.length&&this.#s()}go(){return this.statuses.started?this:(this.#i(),this.opts.waitUntilVisible?(e=this.element,t=this.#r.bind(this),new IntersectionObserver(((s,i)=>{s.forEach((s=>{s.isIntersecting&&(t(),i.unobserve(e))}))}),{threshold:1}).observe(e),this):(this.#r(),this));var e,t}destroy(e=!0){this.timeouts=(this.timeouts.forEach(clearTimeout),[]),N(e)&&this.cursor&&this.#n(this.cursor),this.statuses.destroyed=!0}reset(e){!this.is("destroyed")&&this.destroy(),e?(this.queue.wipe(),e(this)):this.queue.reset(),this.cursorPosition=0;for(let t in this.statuses)this.statuses[t]=!1;return this.element[this.#o()?"value":"innerHTML"]="",this}is=function(e){return this.statuses[e]};type(e,t={}){e=N(e);let{instant:s}=t,i=this.#a(t),r=g(e,this.opts.html).map((e=>{return{func:()=>this.#u(e),char:e,delay:s||(t=e,/<(.+)>(.*?)<\/(.+)>/.test(t.outerHTML))?0:this.#l(),typeable:e.nodeType===Node.TEXT_NODE};var t})),n=[i[0],{func:async()=>await this.opts.beforeString(e,this)},...r,{func:async()=>await this.opts.afterString(e,this)},i[1]];return this.#h(n,t)}break(e={}){return this.#h({func:()=>this.#u(a("BR")),typeable:!0},e)}move(e,t={}){e=N(e);let s=this.#a(t),{instant:i,to:r}=t,n=P({queueItems:this.queue.getTypeable(),selector:null===e?"":e,to:r,cursorPosition:this.#d}),o=n<0?-1:1;return this.predictedCursorPosition=this.#d+n,this.#h([s[0],...C({func:()=>this.#p(o),delay:i?0:this.#l(),cursorable:!0},Math.abs(n)),s[1]],t)}exec(e,t={}){let s=this.#a(t);return this.#h([s[0],{func:()=>e(this)},s[1]],t)}options(e,t={}){return e=N(e),this.#c(e),this.#h({},t)}pause(e,t={}){return this.#h({delay:N(e)},t)}delete(e=null,t={}){e=N(e);let s=this.#a(t),i=e,{instant:r,to:n}=t,o=this.queue.getTypeable(),a=(()=>null===i?o.length:b(i)?i:P({queueItems:o,selector:i,cursorPosition:this.#d,to:n}))();return this.#h([s[0],...C({func:this.#m.bind(this),delay:r?0:this.#l(1),deletable:!0},a),s[1]],t)}freeze(){this.statuses.frozen=!0}flush(e=(()=>{})){return this.#i(),this.#r(!1).then(e),this}getQueue(){return this.queue}getOptions(){return this.opts}updateOptions(e){return this.#c(e)}getElement(){return this.element}empty(e={}){return this.#h({func:this.#f.bind(this)},e)}async#f(){this.#o()?this.element.value="":this.#y.forEach(this.#n.bind(this))}async#r(e=!0){this.statuses.started=!0;let t=t=>{this.queue.done(t,!e)};try{let s=[...this.queue.getQueue()];for(let e=0;ee+t)).forEach((e=>{let[i]=s[e];t(i)})),e=i}t(i)}}if(!e)return this;if(this.statuses.completed=!0,await this.opts.afterComplete(this),!this.opts.loop)throw"";let i=this.opts.loopDelay;this.#b((async()=>{await this.#P(i[0]),this.#r()}),i[1])}catch(s){}return this}async#p(e){var t,s,r;this.cursorPosition=(t=e,s=this.cursorPosition,r=this.#y,Math.min(Math.max(s+t,0),r.length)),((e,t,s)=>{let r=t[s-1],n=A(`.${i}`,e);(e=r?.parentNode||e).insertBefore(n,r||null)})(this.element,this.#y,this.cursorPosition)}async#P(e){let t=this.#d;t&&await this.#p({value:t});let s=this.#y.map((e=>[Symbol(),{func:this.#m.bind(this),delay:this.#l(1),deletable:!0,shouldPauseCursor:()=>!0}]));for(let i=0;i{this.unfreeze=()=>{this.statuses.frozen=!1,e()}})),s||await this.opts.beforeStep(this),await((e,t,s)=>new Promise((i=>{s.push(setTimeout((async()=>{await e(),i()}),t||0))})))(e,t,this.timeouts),s||await this.opts.afterStep(this)}async#i(){if(!this.#o()&&this.cursor&&this.element.appendChild(this.cursor),this.#C){((e,t)=>{let r=`[${s}='${e}'] .${i}`,n=getComputedStyle(t),o=Object.entries(L).reduce(((e,[t,s])=>`${e} ${t}: var(--ti-cursor-${t}, ${s||n[t]});`),"");l(`${r} { display: inline-block; width: 0; ${o} }`,e)})(this.id,this.element),this.cursor.dataset.tiAnimationId=this.id;let{animation:e}=this.opts.cursor,{frames:t,options:r}=e;w({frames:t,cursor:this.cursor,options:{duration:this.opts.cursorSpeed,...r}})}}#o(){return S(this.element)}#h(e,t){return this.queue.add(e),this.#v(t),this}#v(e={}){let t=e.delay;t&&this.queue.add({delay:t})}#a(e={}){return[{func:()=>this.#c(e)},{func:()=>this.#c(this.opts)}]}async#c(e){this.opts=E(this.opts,e)}#s(){let e=this.opts.strings.filter((e=>!!e));e.forEach(((t,s)=>{if(this.type(t),s+1===e.length)return;let i=this.opts.breakLines?[{func:()=>this.#u(a("BR")),typeable:!0}]:C({func:this.#m.bind(this),delay:this.#l(1)},this.queue.getTypeable().length);this.#T(i)}))}#e=e=>{e.cursor=(e=>{if("object"==typeof e){let t={},{frames:s,options:i}=n.cursor.animation;return t.animation=e.animation||{},t.animation.frames=e.animation?.frames||s,t.animation.options=E(i,e.animation?.options||{}),t.autoPause=e.autoPause??n.cursor.autoPause,t.autoPauseDelay=e.autoPauseDelay||n.cursor.autoPauseDelay,t}return!0===e?n.cursor:e})(e.cursor??n.cursor),this.opts.strings=this.#w(t(this.opts.strings)),this.opts=E(this.opts,{html:!this.#I&&this.opts.html,nextStringDelay:h(this.opts.nextStringDelay),loopDelay:h(this.opts.loopDelay)})};#w(e){let t=this.element.innerHTML;return t?(this.element.innerHTML="",this.opts.startDelete?(this.element.innerHTML=t,m(this.element),this.#T(C({func:this.#m.bind(this),delay:this.#l(1),deletable:!0},this.#y.length)),e):(s=t,s.replace(//g,"").trim().split(//)).concat(e)):e;var s}#t(){if(this.#I)return null;let e=a("span");return e.className=i,this.#C?(e.innerHTML=f(this.opts.cursorChar).innerHTML,e):(e.style.visibility="hidden",e)}#T(e){let t=this.opts.nextStringDelay;this.queue.add([{delay:t[0]},...e,{delay:t[1]}])}#u(e){((e,t)=>{if(S(e))return void(e.value=`${e.value}${t.textContent}`);t.innerHTML="";let s=(r=t.originalParent,/body/i.test(r?.tagName)?e:t.originalParent||e);var r;s.insertBefore(t,A("."+i,s)||null)})(this.element,e)}#m(){this.#y.length&&(this.#I?this.element.value=this.element.value.slice(0,-1):this.#n(this.#y[this.cursorPosition]))}#n(e){((e,t)=>{if(!e)return;let s=e.parentNode;(s.childNodes.length>1||s.isSameNode(t)?e:s).remove()})(e,this.element)}#l(e=0){return function(e){let{speed:t,deleteSpeed:s,lifeLike:i}=e;return s=null!==s?s:t/3,i?[d(t,p(t)),d(s,p(s))]:[t,s]}(this.opts)[e]}get#d(){return this.predictedCursorPosition??this.cursorPosition}get#I(){return S(this.element)}get#C(){return!!this.opts.cursor&&!this.#I}get#y(){return e=this.element,S(e)?c(e.value):y(e,!0).filter((e=>!(e.childNodes.length>0)));var e}}})); +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).TypeIt=t()}(this,(function(){"use strict";const e=e=>Array.isArray(e),t=t=>e(t)?t:[t];const s="data-typeit-id",i="ti-cursor",r={started:!1,completed:!1,frozen:!1,destroyed:!1},n={breakLines:!0,cursor:{autoPause:!0,autoPauseDelay:500,animation:{frames:[0,0,1].map((e=>({opacity:e}))),options:{iterations:1/0,easing:"steps(2, start)",fill:"forwards"}}},cursorChar:"|",cursorSpeed:1e3,deleteSpeed:null,html:!0,lifeLike:!0,loop:!1,loopDelay:750,nextStringDelay:750,speed:100,startDelay:250,startDelete:!1,strings:[],waitUntilVisible:!1,beforeString:()=>{},afterString:()=>{},beforeStep:()=>{},afterStep:()=>{},afterComplete:()=>{}},o=`[${s}]:before {content: '.'; display: inline-block; width: 0; visibility: hidden;}`,a=e=>document.createElement(e),u=e=>document.createTextNode(e),l=(e,t="")=>{let s=a("style");s.id=t,s.appendChild(u(e)),document.head.appendChild(s)},h=t=>(e(t)||(t=[t/2,t/2]),t),d=(e,t)=>Math.abs(Math.random()*(e+t-(e-t))+(e-t));let p=e=>e/2;const c=e=>Array.from(e);let m=e=>([...e.childNodes].forEach((e=>{if(e.nodeValue)return[...e.nodeValue].forEach((t=>{e.parentNode.insertBefore(u(t),e)})),void e.remove();m(e)})),e);const f=e=>{let t=document.implementation.createHTMLDocument();return t.body.innerHTML=e,m(t.body)};function y(e,t=!1,s=!1){let r,n=e.querySelector(`.${i}`),o=document.createTreeWalker(e,NodeFilter.SHOW_ALL,{acceptNode:e=>{if(n&&s){if(e.classList?.contains(i))return NodeFilter.FILTER_ACCEPT;if(n.contains(e))return NodeFilter.FILTER_REJECT}return e.classList?.contains(i)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),a=[];for(;r=o.nextNode();)r.originalParent||(r.originalParent=r.parentNode),a.push(r);return t?a.reverse():a}function g(e,t=!0){return t?y(f(e)):c(e).map(u)}const b=({index:e,newIndex:t,queueItems:s,cleanUp:i})=>{for(let r=e+1;rNumber.isInteger(e),C=({queueItems:e,selector:t,cursorPosition:s,to:i})=>{if(P(t))return-1*t;let r=new RegExp("END","i").test(i),n=t?[...e].reverse().findIndex((({char:e})=>{let s=e.parentElement,i=s.matches(t);return!(!r||!i)||i&&s.firstChild.isSameNode(e)})):-1;return n<0&&(n=r?0:e.length-1),n-s+(r?0:1)},I=(e,t)=>new Array(t).fill(e);let v=e=>new Promise((t=>{requestAnimationFrame((async()=>{t(await e())}))})),w=e=>e?.getAnimations().find((t=>t.id===e.dataset.tiAnimationId)),T=({cursor:e,frames:t,options:s})=>{let i=e.animate(t,s);return i.pause(),i.id=e.dataset.tiAnimationId,v((()=>{v((()=>{i.play()}))})),i},q=e=>e.func?.call(null),S=async({index:e,queueItems:t,wait:s,cursor:i,cursorOptions:r})=>{let n=t[e][1],o=[],a=e,u=n,l=()=>u&&!u.delay,h=n.shouldPauseCursor()&&r.autoPause;for(;l();)o.push(u),l()&&a++,u=t[a]?t[a][1]:null;if(o.length)return await v((async()=>{for(let e of o)await q(e)})),a-1;let d,p=w(i);return p&&(d={...p.effect.getComputedTiming(),delay:h?r.autoPauseDelay:0}),await s((async()=>{p&&h&&p.cancel(),await v((()=>{q(n)}))}),n.delay),await(({cursor:e,options:t,cursorOptions:s})=>{if(!e||!s)return;let i,r=w(e);r&&(t.delay=r.effect.getComputedTiming().delay,i=r.currentTime,r.cancel());let n=T({cursor:e,frames:s.animation.frames,options:t});return i&&(n.currentTime=i),n})({cursor:i,options:d,cursorOptions:r}),e};const N=e=>"value"in e;let A=e=>"function"==typeof e?e():e,E=(e,t=document,s=!1)=>t["querySelector"+(s?"All":"")](e);const L=(e,t)=>Object.assign({},e,t);let x={"font-family":"","font-weight":"","font-size":"","font-style":"","line-height":"",color:"",transform:"translateX(-.125em)"};return class{element;timeouts;cursorPosition;predictedCursorPosition;statuses={started:!1,completed:!1,frozen:!1,destroyed:!1};opts;id;queue;cursor;unfreeze=()=>{};constructor(e,s={}){var i;this.opts=L(n,s),this.element="string"==typeof(i=e)?E(i):i,this.timeouts=[],this.cursorPosition=0,this.unfreeze=()=>{},this.predictedCursorPosition=null,this.statuses=L({},r),this.id=Math.random().toString().substring(2,9),this.queue=function(e){let s=function(e){return t(e).forEach((e=>n.set(Symbol(e.char?.innerText),i({...e})))),this},i=e=>(e.shouldPauseCursor=function(){return Boolean(this.typeable||this.cursorable||this.deletable)},e),r=()=>Array.from(n.values()),n=new Map;return s(e),{add:s,set:function(e,t){let s=[...n.keys()];n.set(s[e],i(t))},wipe:function(){n=new Map,s(e)},done:(e,t=!1)=>t?n.delete(e):n.get(e).done=!0,reset:function(){n.forEach((e=>delete e.done))},destroy:e=>n.delete(e),getItems:(e=!1)=>e?r():r().filter((e=>!e.done)),getQueue:()=>n,getTypeable:()=>r().filter((e=>e.typeable))}}([{delay:this.opts.startDelay}]),this.#e(s),this.cursor=this.#t(),this.element.dataset.typeitId=this.id,l(o),this.opts.strings.length&&this.#s()}go(){return this.statuses.started?this:(this.#i(),this.opts.waitUntilVisible?(e=this.element,t=this.#r.bind(this),new IntersectionObserver(((s,i)=>{s.forEach((s=>{s.isIntersecting&&(t(),i.unobserve(e))}))}),{threshold:1}).observe(e),this):(this.#r(),this));var e,t}destroy(e=!0){this.timeouts=(this.timeouts.forEach(clearTimeout),[]),A(e)&&this.cursor&&this.#n(this.cursor),this.statuses.destroyed=!0}reset(e){!this.is("destroyed")&&this.destroy(),e?(this.queue.wipe(),e(this)):this.queue.reset(),this.cursorPosition=0;for(let t in this.statuses)this.statuses[t]=!1;return this.element[this.#o()?"value":"innerHTML"]="",this}is=function(e){return this.statuses[e]};type(e,t={}){e=A(e);let{instant:s}=t,i=this.#a(t),r=g(e,this.opts.html).map((e=>{return{func:()=>this.#u(e),char:e,delay:s||(t=e,/<(.+)>(.*?)<\/(.+)>/.test(t.outerHTML))?0:this.#l(),typeable:e.nodeType===Node.TEXT_NODE};var t})),n=[i[0],{func:async()=>await this.opts.beforeString(e,this)},...r,{func:async()=>await this.opts.afterString(e,this)},i[1]];return this.#h(n,t)}break(e={}){return this.#h({func:()=>this.#u(a("BR")),typeable:!0},e)}move(e,t={}){e=A(e);let s=this.#a(t),{instant:i,to:r}=t,n=C({queueItems:this.queue.getTypeable(),selector:null===e?"":e,to:r,cursorPosition:this.#d}),o=n<0?-1:1;return this.predictedCursorPosition=this.#d+n,this.#h([s[0],...I({func:()=>this.#p(o),delay:i?0:this.#l(),cursorable:!0},Math.abs(n)),s[1]],t)}exec(e,t={}){let s=this.#a(t);return this.#h([s[0],{func:()=>e(this)},s[1]],t)}options(e,t={}){return e=A(e),this.#c(e),this.#h({},t)}pause(e,t={}){return this.#h({delay:A(e)},t)}delete(e=null,t={}){e=A(e);let s=this.#a(t),i=e,{instant:r,to:n}=t,o=this.queue.getTypeable(),a=(()=>null===i?o.length:P(i)?i:C({queueItems:o,selector:i,cursorPosition:this.#d,to:n}))();return this.#h([s[0],...I({func:this.#m.bind(this),delay:r?0:this.#l(1),deletable:!0},a),s[1]],t)}freeze(){this.statuses.frozen=!0}flush(e=()=>{}){return this.#i(),this.#r(!1).then(e),this}getQueue(){return this.queue}getOptions(){return this.opts}updateOptions(e){return this.#c(e)}getElement(){return this.element}empty(e={}){return this.#h({func:this.#f.bind(this)},e)}async#f(){this.#o()?this.element.value="":this.#y.forEach(this.#n.bind(this))}async#r(e=!0){this.statuses.started=!0;let t=t=>{this.queue.done(t,!e)};try{let s=[...this.queue.getQueue()];for(let e=0;e{await this.#P(i[0]),this.#r()}),i[1])}catch(s){}return this}async#p(e){var t,s,r;this.cursorPosition=(t=e,s=this.cursorPosition,r=this.#y,Math.min(Math.max(s+t,0),r.length)),((e,t,s)=>{let r=t[s-1],n=E(`.${i}`,e);(e=r?.parentNode||e).insertBefore(n,r||null)})(this.element,this.#y,this.cursorPosition)}async#P(e){let t=this.#d;t&&await this.#p({value:t});let s=this.#y.map((e=>[Symbol(),{func:this.#m.bind(this),delay:this.#l(1),deletable:!0,shouldPauseCursor:()=>!0}]));for(let i=0;i{this.unfreeze=()=>{this.statuses.frozen=!1,e()}})),s||await this.opts.beforeStep(this),await((e,t,s)=>new Promise((i=>{s.push(setTimeout((async()=>{await e(),i()}),t||0))})))(e,t,this.timeouts),s||await this.opts.afterStep(this)}async#i(){if(!this.#o()&&this.cursor&&this.element.appendChild(this.cursor),this.#C){((e,t)=>{let r=`[${s}='${e}'] .${i}`,n=getComputedStyle(t),o=Object.entries(x).reduce(((e,[t,s])=>`${e} ${t}: var(--ti-cursor-${t}, ${s||n[t]});`),"");l(`${r} { display: inline-block; width: 0; ${o} }`,e)})(this.id,this.element),this.cursor.dataset.tiAnimationId=this.id;let{animation:e}=this.opts.cursor,{frames:t,options:r}=e;T({frames:t,cursor:this.cursor,options:{duration:this.opts.cursorSpeed,...r}})}}#o(){return N(this.element)}#h(e,t){return this.queue.add(e),this.#I(t),this}#I(e={}){let t=e.delay;t&&this.queue.add({delay:t})}#a(e={}){return[{func:()=>this.#c(e)},{func:()=>this.#c(this.opts)}]}async#c(e){this.opts=L(this.opts,e)}#s(){let e=this.opts.strings.filter((e=>!!e));e.forEach(((t,s)=>{if(this.type(t),s+1===e.length)return;let i=this.opts.breakLines?[{func:()=>this.#u(a("BR")),typeable:!0}]:I({func:this.#m.bind(this),delay:this.#l(1)},this.queue.getTypeable().length);this.#v(i)}))}#e=e=>{e.cursor=(e=>{if("object"==typeof e){let t={},{frames:s,options:i}=n.cursor.animation;return t.animation=e.animation||{},t.animation.frames=e.animation?.frames||s,t.animation.options=L(i,e.animation?.options||{}),t.autoPause=e.autoPause??n.cursor.autoPause,t.autoPauseDelay=e.autoPauseDelay||n.cursor.autoPauseDelay,t}return!0===e?n.cursor:e})(e.cursor??n.cursor),this.opts.strings=this.#w(t(this.opts.strings)),this.opts=L(this.opts,{html:!this.#T&&this.opts.html,nextStringDelay:h(this.opts.nextStringDelay),loopDelay:h(this.opts.loopDelay)})};#w(e){let t=this.element.innerHTML;return t?(this.element.innerHTML="",this.opts.startDelete?(this.element.innerHTML=t,m(this.element),this.#v(I({func:this.#m.bind(this),delay:this.#l(1),deletable:!0},this.#y.length)),e):(s=t,s.replace(//g,"").trim().split(//)).concat(e)):e;var s}#t(){if(this.#T)return null;let e=a("span");return e.className=i,this.#C?(e.innerHTML=f(this.opts.cursorChar).innerHTML,e):(e.style.visibility="hidden",e)}#v(e){let t=this.opts.nextStringDelay;this.queue.add([{delay:t[0]},...e,{delay:t[1]}])}#u(e){((e,t)=>{if(N(e))return void(e.value=`${e.value}${t.textContent}`);t.innerHTML="";let s=(r=t.originalParent,/body/i.test(r?.tagName)?e:t.originalParent||e);var r;s.insertBefore(t,E("."+i,s)||null)})(this.element,e)}#m(){this.#y.length&&(this.#T?this.element.value=this.element.value.slice(0,-1):this.#n(this.#y[this.cursorPosition]))}#n(e){((e,t)=>{if(!e)return;let s=e.parentNode;(s.childNodes.length>1||s.isSameNode(t)?e:s).remove()})(e,this.element)}#l(e=0){return function(e){let{speed:t,deleteSpeed:s,lifeLike:i}=e;return s=null!==s?s:t/3,i?[d(t,p(t)),d(s,p(s))]:[t,s]}(this.opts)[e]}get#d(){return this.predictedCursorPosition??this.cursorPosition}get#T(){return N(this.element)}get#C(){return!!this.opts.cursor&&!this.#T}get#y(){return e=this.element,N(e)?c(e.value):y(e,!0).filter((e=>!(e.childNodes.length>0)));var e}}})); diff --git a/static/js/zoom.min.js b/assets/lib/zoom/zoom.min.js similarity index 100% rename from static/js/zoom.min.js rename to assets/lib/zoom/zoom.min.js diff --git a/config.toml b/config.toml index 8ab197535..113c0ad81 100644 --- a/config.toml +++ b/config.toml @@ -2,4 +2,4 @@ [module.hugoVersion] extended = true min = "0.87.0" -max = "0.128.2" +max = "0.131.0" diff --git a/config/_default/languages.en.toml b/config/_default/languages.en.toml index e334ec9a9..9905ea3d6 100644 --- a/config/_default/languages.en.toml +++ b/config/_default/languages.en.toml @@ -15,7 +15,9 @@ title = "Blowfish" # [author] # name = "Your name here" +# email = "youremail@example.com" # image = "img/blowfish_logo.png" +# imageQuality = 96 # headline = "I'm only human" # bio = "A little bit about you" # links = [ diff --git a/config/_default/params.toml b/config/_default/params.toml index fc4edcb28..8ec5457f0 100644 --- a/config/_default/params.toml +++ b/config/_default/params.toml @@ -12,11 +12,14 @@ autoSwitchAppearance = true enableSearch = true enableCodeCopy = false +replyByEmail = false + # mainSections = ["section1", "section2"] # robots = "" disableImageOptimization = false disableTextInHeader = false +# backgroundImageWidth = 1200 # defaultBackgroundImage = "IMAGE.jpg" # used as default for background images # defaultFeaturedImage = "IMAGE.jpg" # used as default for featured images in all articles @@ -25,6 +28,9 @@ disableTextInHeader = false # smartTOC = true # smartTOCHideUnfocusedChildren = true +giteaDefaultServer = "https://git.fsfe.org" +forgejoDefaultServer = "https://v8.next.forgejo.org" + [header] layout = "basic" # valid options: basic, fixed, fixed-fill, fixed-gradient, fixed-fill-blur @@ -135,6 +141,11 @@ disableTextInHeader = false # websiteid = "ABC12345" # domain = "llama.yoursite.com" # dataDomains = "yoursite.com,yoursite2.com" + # enableTrackEvent = true + +[selineAnalytics] + # token = "XXXXXX" + # enableTrackEvent = true [buymeacoffee] # identifier = "" diff --git a/data/forgejoColors.json b/data/forgejoColors.json new file mode 100644 index 000000000..7f272e7af --- /dev/null +++ b/data/forgejoColors.json @@ -0,0 +1,533 @@ +{ + "1C Enterprise": "#814CCC", + "4D": "#004289", + "ABAP": "#E8274B", + "ABAP CDS": "#555e25", + "ActionScript": "#882B0F", + "Ada": "#02f88c", + "Adobe Font Metrics": "#fa0f00", + "Agda": "#315665", + "AGS Script": "#B9D9FF", + "AIDL": "#34EB6B", + "AL": "#3AA2B5", + "Alloy": "#64C800", + "Alpine Abuild": "#0D597F", + "Altium Designer": "#A89663", + "AMPL": "#E6EFBB", + "AngelScript": "#C7D7DC", + "Ant Build System": "#A9157E", + "ANTLR": "#9DC3FF", + "ApacheConf": "#d12127", + "Apex": "#1797c0", + "API Blueprint": "#2ACCA8", + "APL": "#5A8164", + "Apollo Guidance Computer": "#0B3D91", + "AppleScript": "#101F1F", + "Arc": "#aa2afe", + "AsciiDoc": "#73a0c5", + "ASL": null, + "ASP.NET": "#9400ff", + "AspectJ": "#a957b0", + "Assembly": "#6E4C13", + "Astro": "#ff5a03", + "Asymptote": "#ff0000", + "ATS": "#1ac620", + "Augeas": "#9CC134", + "AutoHotkey": "#6594b9", + "AutoIt": "#1C3552", + "Avro IDL": "#0040FF", + "Awk": "#c30e9b", + "Ballerina": "#FF5000", + "BASIC": "#ff0000", + "Batchfile": "#C1F12E", + "Beef": "#a52f4e", + "Befunge": null, + "BibTeX": "#778899", + "Bicep": "#519aba", + "Bison": "#6A463F", + "BitBake": "#00bce4", + "Blade": "#f7523f", + "BlitzBasic": "#00FFAE", + "BlitzMax": "#cd6400", + "Bluespec": "#12223c", + "Boo": "#d4bec1", + "Boogie": "#c80fa0", + "Brainfuck": "#2F2530", + "Brightscript": "#662D91", + "Browserslist": "#ffd539", + "C": "#555555", + "C#": "#178600", + "C++": "#f34b7d", + "C2hs Haskell": null, + "Cabal Config": "#483465", + "Cap'n Proto": "#c42727", + "CartoCSS": null, + "Ceylon": "#dfa535", + "Chapel": "#8dc63f", + "Charity": null, + "ChucK": "#3f8000", + "Cirru": "#ccccff", + "Clarion": "#db901e", + "Classic ASP": "#6a40fd", + "Clean": "#3F85AF", + "Click": "#E4E6F3", + "CLIPS": "#00A300", + "Clojure": "#db5855", + "Closure Templates": "#0d948f", + "Cloud Firestore Security Rules": "#FFA000", + "CMake": "#DA3434", + "COBOL": null, + "CodeQL": "#140f46", + "CoffeeScript": "#244776", + "ColdFusion": "#ed2cd6", + "ColdFusion CFC": "#ed2cd6", + "COLLADA": "#F1A42B", + "Common Lisp": "#3fb68b", + "Common Workflow Language": "#B5314C", + "Component Pascal": "#B0CE4E", + "Cool": null, + "Coq": "#d0b68c", + "Crystal": "#000100", + "CSON": "#244776", + "Csound": "#1a1a1a", + "Csound Document": "#1a1a1a", + "Csound Score": "#1a1a1a", + "CSS": "#563d7c", + "CSV": "#237346", + "Cuda": "#3A4E3A", + "CUE": "#5886E1", + "CWeb": "#00007a", + "Cycript": null, + "Cython": "#fedf5b", + "D": "#ba595e", + "Dafny": "#FFEC25", + "Darcs Patch": "#8eff23", + "Dart": "#00B4AB", + "DataWeave": "#003a52", + "Dhall": "#dfafff", + "DIGITAL Command Language": null, + "DirectX 3D File": "#aace60", + "DM": "#447265", + "Dockerfile": "#384d54", + "Dogescript": "#cca760", + "DTrace": null, + "Dylan": "#6c616e", + "E": "#ccce35", + "Easybuild": "#069406", + "eC": "#913960", + "Ecere Projects": "#913960", + "ECL": "#8a1267", + "ECLiPSe": "#001d9d", + "EditorConfig": "#fff1f2", + "Eiffel": "#4d6977", + "EJS": "#a91e50", + "Elixir": "#6e4a7e", + "Elm": "#60B5CC", + "Emacs Lisp": "#c065db", + "EmberScript": "#FFF4F3", + "EQ": "#a78649", + "Erlang": "#B83998", + "F#": "#b845fc", + "F*": "#572e30", + "Factor": "#636746", + "Fancy": "#7b9db4", + "Fantom": "#14253c", + "Faust": "#c37240", + "Fennel": "#fff3d7", + "FIGlet Font": "#FFDDBB", + "Filebench WML": "#F6B900", + "Filterscript": null, + "fish": "#4aae47", + "Fluent": "#ffcc33", + "FLUX": "#88ccff", + "Forth": "#341708", + "Fortran": "#4d41b1", + "Fortran Free Form": "#4d41b1", + "FreeBasic": "#867db1", + "FreeMarker": "#0050b2", + "Frege": "#00cafe", + "Futhark": "#5f021f", + "G-code": "#D08CF2", + "Game Maker Language": "#71b417", + "GAML": "#FFC766", + "GAMS": "#f49a22", + "GAP": "#0000cc", + "GCC Machine Description": "#FFCFAB", + "GDB": null, + "GDScript": "#355570", + "GEDCOM": "#003058", + "Gemfile.lock": "#701516", + "Genie": "#fb855d", + "Genshi": "#951531", + "Gentoo Ebuild": "#9400ff", + "Gentoo Eclass": "#9400ff", + "Gerber Image": "#d20b00", + "Gherkin": "#5B2063", + "Git Attributes": "#F44D27", + "Git Config": "#F44D27", + "GLSL": "#5686a5", + "Glyph": "#c1ac7f", + "Gnuplot": "#f0a9f0", + "Go": "#00ADD8", + "Go Checksums": "#00ADD8", + "Go Module": "#00ADD8", + "Golo": "#88562A", + "Gosu": "#82937f", + "Grace": "#615f8b", + "Gradle": "#02303a", + "Grammatical Framework": "#ff0000", + "GraphQL": "#e10098", + "Graphviz (DOT)": "#2596be", + "Groovy": "#4298b8", + "Groovy Server Pages": "#4298b8", + "Hack": "#878787", + "Haml": "#ece2a9", + "Handlebars": "#f7931e", + "HAProxy": "#106da9", + "Harbour": "#0e60e3", + "Haskell": "#5e5086", + "Haxe": "#df7900", + "HCL": null, + "HiveQL": "#dce200", + "HLSL": "#aace60", + "HolyC": "#ffefaf", + "HTML": "#e34c26", + "HTML+ECR": "#2e1052", + "HTML+EEX": "#6e4a7e", + "HTML+ERB": "#701516", + "HTML+PHP": "#4f5d95", + "HTML+Razor": "#512be4", + "HTTP": "#005C9C", + "HXML": "#f68712", + "Hy": "#7790B2", + "HyPhy": null, + "IDL": "#a3522f", + "Idris": "#b30000", + "Ignore List": "#000000", + "IGOR Pro": "#0000cc", + "ImageJ Macro": "#99AAFF", + "Inform 7": null, + "INI": "#d1dbe0", + "Inno Setup": "#264b99", + "Io": "#a9188d", + "Ioke": "#078193", + "Isabelle": "#FEFE00", + "Isabelle ROOT": "#FEFE00", + "J": "#9EEDFF", + "JAR Manifest": "#b07219", + "Jasmin": "#d03600", + "Java": "#b07219", + "Java Properties": "#2A6277", + "Java Server Pages": "#2A6277", + "JavaScript": "#f1e05a", + "JavaScript+ERB": "#f1e05a", + "Jest Snapshot": "#15c213", + "JFlex": "#DBCA00", + "Jinja": "#a52a22", + "Jison": "#56b3cb", + "Jison Lex": "#56b3cb", + "Jolie": "#843179", + "jq": "#c7254e", + "JSON": "#292929", + "JSON with Comments": "#292929", + "JSON5": "#267CB9", + "JSONiq": "#40d47e", + "JSONLD": "#0c479c", + "Jsonnet": "#0064bd", + "Julia": "#a270ba", + "Jupyter Notebook": "#DA5B0B", + "Kaitai Struct": "#773b37", + "KakouneScript": "#6f8042", + "KiCad Layout": "#2f4aab", + "KiCad Legacy Layout": "#2f4aab", + "KiCad Schematic": "#2f4aab", + "Kotlin": "#A97BFF", + "KRL": "#28430A", + "LabVIEW": "#fede06", + "Lark": "#2980B9", + "Lasso": "#999999", + "Latte": "#f2a542", + "Lean": null, + "Less": "#1d365d", + "Lex": "#DBCA00", + "LFE": "#4C3023", + "LilyPond": "#9ccc7c", + "Limbo": null, + "Liquid": "#67b8de", + "Literate Agda": "#315665", + "Literate CoffeeScript": "#244776", + "Literate Haskell": "#5e5086", + "LiveScript": "#499886", + "LLVM": "#185619", + "Logos": null, + "Logtalk": "#295b9a", + "LOLCODE": "#cc9900", + "LookML": "#652B81", + "LoomScript": null, + "LSL": "#3d9970", + "Lua": "#000080", + "M": null, + "M4": null, + "M4Sugar": null, + "Macaulay2": "#d8ffff", + "Makefile": "#427819", + "Mako": "#7e858d", + "Markdown": "#083fa1", + "Marko": "#42bff2", + "Mask": "#f97732", + "Mathematica": "#dd1100", + "MATLAB": "#e16737", + "Max": "#c4a79c", + "MAXScript": "#00a6a6", + "mcfunction": "#E22837", + "Mercury": "#ff2b2b", + "Meson": "#007800", + "Metal": "#8f14e9", + "MiniD": null, + "Mirah": "#c7a938", + "mIRC Script": "#3d57c3", + "MLIR": "#5EC8DB", + "Modelica": "#de1d31", + "Modula-2": "#10253f", + "Modula-3": "#223388", + "Module Management System": null, + "Monkey": null, + "Moocode": null, + "MoonScript": "#ff4585", + "Motorola 68K Assembly": "#005daa", + "MQL4": "#62A8D6", + "MQL5": "#4A76B8", + "MTML": "#b7e1f4", + "MUF": null, + "mupad": "#244963", + "Mustache": "#724b3b", + "Myghty": null, + "nanorc": "#2d004d", + "NASL": null, + "NCL": "#28431f", + "Nearley": "#990000", + "Nemerle": "#3d3c6e", + "nesC": "#94B0C7", + "NetLinx": "#0aa0ff", + "NetLinx+ERB": "#747faa", + "NetLogo": "#ff6375", + "NewLisp": "#87AED7", + "Nextflow": "#3ac486", + "Nginx": "#009639", + "Nim": "#ffc200", + "Nit": "#009917", + "Nix": "#7e7eff", + "NPM Config": "#cb3837", + "NSIS": null, + "Nu": "#c9df40", + "NumPy": "#9C8AF9", + "Nunjucks": "#3d8137", + "NWScript": "#111522", + "Objective-C": "#438eff", + "Objective-C++": "#6866fb", + "Objective-J": "#ff0c5a", + "ObjectScript": "#424893", + "OCaml": "#3be133", + "Odin": "#60AFFE", + "Omgrofl": "#cabbff", + "ooc": "#b0b77e", + "Opa": null, + "Opal": "#f7ede0", + "Open Policy Agent": "#7d9199", + "OpenCL": "#ed2e2d", + "OpenEdge ABL": "#5ce600", + "OpenQASM": "#AA70FF", + "OpenRC runscript": null, + "OpenSCAD": "#e5cd45", + "Org": "#77aa99", + "Ox": null, + "Oxygene": "#cdd0e3", + "Oz": "#fab738", + "P4": "#7055b5", + "Pan": "#cc0000", + "Papyrus": "#6600cc", + "Parrot": "#f3ca0a", + "Parrot Assembly": null, + "Parrot Internal Representation": null, + "Pascal": "#E3F171", + "Pawn": "#dbb284", + "PEG.js": "#234d6b", + "Pep8": "#C76F5B", + "Perl": "#0298c3", + "PHP": "#4F5D95", + "PicoLisp": "#6067af", + "PigLatin": "#fcd7de", + "Pike": "#005390", + "PLpgSQL": "#336790", + "PLSQL": "#dad8d8", + "PogoScript": "#d80074", + "Pony": null, + "PostCSS": "#dc3a0c", + "PostScript": "#da291c", + "POV-Ray SDL": "#6bac65", + "PowerBuilder": "#8f0f8d", + "PowerShell": "#012456", + "Prisma": "#0c344b", + "Processing": "#0096D8", + "Prolog": "#74283c", + "Propeller Spin": "#7fa2a7", + "Pug": "#a86454", + "Puppet": "#302B6D", + "PureBasic": "#5a6986", + "PureScript": "#1D222D", + "Python": "#3572A5", + "Python console": "#3572A5", + "Python traceback": "#3572A5", + "q": "#0040cd", + "Q#": "#fed659", + "QMake": null, + "QML": "#44a51c", + "Qt Script": "#00b841", + "Quake": "#882233", + "R": "#198CE7", + "Racket": "#3c5caa", + "Ragel": "#9d5200", + "Raku": "#0000fb", + "RAML": "#77d9fb", + "Rascal": "#fffaa0", + "RDoc": "#701516", + "REALbasic": null, + "Reason": "#ff5847", + "Rebol": "#358a5b", + "Record Jar": "#0673ba", + "Red": "#f50000", + "Redcode": null, + "Regular Expression": "#009a00", + "Ren'Py": "#ff7f7f", + "RenderScript": null, + "ReScript": "#ed5051", + "reStructuredText": "#141414", + "REXX": "#d90e09", + "Ring": "#2D54CB", + "Riot": "#A71E49", + "RMarkdown": "#198ce7", + "RobotFramework": "#00c0b5", + "Roff": "#ecdebe", + "Roff Manpage": "#ecdebe", + "Rouge": "#cc0088", + "RPC": null, + "Ruby": "#701516", + "RUNOFF": "#665a4e", + "Rust": "#dea584", + "Sage": null, + "SaltStack": "#646464", + "SAS": "#B34936", + "Sass": "#a53b70", + "Scala": "#c22d40", + "Scaml": "#bd181a", + "Scheme": "#1e4aec", + "Scilab": "#ca0f21", + "SCSS": "#c6538c", + "sed": "#64b970", + "Self": "#0579aa", + "ShaderLab": "#222c37", + "Shell": "#89e051", + "ShellSession": null, + "Shen": "#120F14", + "Sieve": null, + "Singularity": "#64E6AD", + "Slash": "#007eff", + "Slice": "#003fa2", + "Slim": "#2b2b2b", + "Smali": null, + "Smalltalk": "#596706", + "Smarty": "#f0c040", + "SmPL": "#c94949", + "SMT": null, + "Solidity": "#AA6746", + "SourcePawn": "#f69e1d", + "SPARQL": "#0C4597", + "SQF": "#3F3F3F", + "SQL": "#e38c00", + "SQLPL": "#e38c00", + "Squirrel": "#800000", + "SRecode Template": "#348a34", + "Stan": "#b2011d", + "Standard ML": "#dc566d", + "Starlark": "#76d275", + "Stata": "#1a5f91", + "StringTemplate": "#3fb34f", + "Stylus": "#ff6347", + "SubRip Text": "#9e0101", + "SugarSS": "#2fcc9f", + "SuperCollider": "#46390b", + "Svelte": "#ff3e00", + "SVG": "#ff9900", + "Swift": "#F05138", + "SWIG": null, + "SystemVerilog": "#DAE1C2", + "Tcl": "#e4cc98", + "Tcsh": null, + "Terra": "#00004c", + "TeX": "#3D6117", + "Textile": "#ffe7ac", + "TextMate Properties": "#df66e4", + "Thrift": "#D12127", + "TI Program": "#A0AA87", + "TLA": "#4b0079", + "TOML": "#9c4221", + "TSQL": "#e38c00", + "TSV": "#237346", + "TSX": "#2b7489", + "Turing": "#cf142b", + "Twig": "#c1d026", + "TXL": "#0178b8", + "TypeScript": "#2b7489", + "Unified Parallel C": "#4e3617", + "Unity3D Asset": "#222c37", + "Unix Assembly": null, + "Uno": "#9933cc", + "UnrealScript": "#a54c4d", + "UrWeb": "#ccccee", + "V": "#4f87c4", + "Vala": "#fbe5cd", + "Valve Data Format": "#f26025", + "VBA": "#867db1", + "VBScript": "#15dcdc", + "VCL": "#148AA8", + "Verilog": "#b2b7f8", + "VHDL": "#adb2cb", + "Vim Help File": "#199f4b", + "Vim Script": "#199f4b", + "Vim Snippet": "#199f4b", + "Visual Basic .NET": "#945db7", + "Volt": "#1F1F1F", + "Vue": "#41b883", + "wdl": "#42f1f4", + "Web Ontology Language": "#5b70bd", + "WebAssembly": "#04133b", + "WebIDL": null, + "Wikitext": "#fc5757", + "Windows Registry Entries": "#52d5ff", + "wisp": "#7582D1", + "Wollok": "#a23738", + "World of Warcraft Addon Data": "#f7e43f", + "X10": "#4B6BEF", + "xBase": "#403a40", + "XC": "#99DA07", + "XML": "#0060ac", + "XML Property List": "#0060ac", + "Xojo": "#81bd41", + "Xonsh": "#285EEF", + "XProc": null, + "XQuery": "#5232e7", + "XS": null, + "XSLT": "#EB8CEB", + "Xtend": "#24255d", + "Yacc": "#4B6C4B", + "YAML": "#cb171e", + "YARA": "#220000", + "YASnippet": "#32AB90", + "ZAP": "#0d665e", + "Zeek": null, + "ZenScript": "#00BCD1", + "Zephir": "#118f9e", + "Zig": "#ec915c", + "ZIL": "#dc75e5", + "Zimpl": "#d67711" +} \ No newline at end of file diff --git a/data/giteaColors.json b/data/giteaColors.json new file mode 100644 index 000000000..7f272e7af --- /dev/null +++ b/data/giteaColors.json @@ -0,0 +1,533 @@ +{ + "1C Enterprise": "#814CCC", + "4D": "#004289", + "ABAP": "#E8274B", + "ABAP CDS": "#555e25", + "ActionScript": "#882B0F", + "Ada": "#02f88c", + "Adobe Font Metrics": "#fa0f00", + "Agda": "#315665", + "AGS Script": "#B9D9FF", + "AIDL": "#34EB6B", + "AL": "#3AA2B5", + "Alloy": "#64C800", + "Alpine Abuild": "#0D597F", + "Altium Designer": "#A89663", + "AMPL": "#E6EFBB", + "AngelScript": "#C7D7DC", + "Ant Build System": "#A9157E", + "ANTLR": "#9DC3FF", + "ApacheConf": "#d12127", + "Apex": "#1797c0", + "API Blueprint": "#2ACCA8", + "APL": "#5A8164", + "Apollo Guidance Computer": "#0B3D91", + "AppleScript": "#101F1F", + "Arc": "#aa2afe", + "AsciiDoc": "#73a0c5", + "ASL": null, + "ASP.NET": "#9400ff", + "AspectJ": "#a957b0", + "Assembly": "#6E4C13", + "Astro": "#ff5a03", + "Asymptote": "#ff0000", + "ATS": "#1ac620", + "Augeas": "#9CC134", + "AutoHotkey": "#6594b9", + "AutoIt": "#1C3552", + "Avro IDL": "#0040FF", + "Awk": "#c30e9b", + "Ballerina": "#FF5000", + "BASIC": "#ff0000", + "Batchfile": "#C1F12E", + "Beef": "#a52f4e", + "Befunge": null, + "BibTeX": "#778899", + "Bicep": "#519aba", + "Bison": "#6A463F", + "BitBake": "#00bce4", + "Blade": "#f7523f", + "BlitzBasic": "#00FFAE", + "BlitzMax": "#cd6400", + "Bluespec": "#12223c", + "Boo": "#d4bec1", + "Boogie": "#c80fa0", + "Brainfuck": "#2F2530", + "Brightscript": "#662D91", + "Browserslist": "#ffd539", + "C": "#555555", + "C#": "#178600", + "C++": "#f34b7d", + "C2hs Haskell": null, + "Cabal Config": "#483465", + "Cap'n Proto": "#c42727", + "CartoCSS": null, + "Ceylon": "#dfa535", + "Chapel": "#8dc63f", + "Charity": null, + "ChucK": "#3f8000", + "Cirru": "#ccccff", + "Clarion": "#db901e", + "Classic ASP": "#6a40fd", + "Clean": "#3F85AF", + "Click": "#E4E6F3", + "CLIPS": "#00A300", + "Clojure": "#db5855", + "Closure Templates": "#0d948f", + "Cloud Firestore Security Rules": "#FFA000", + "CMake": "#DA3434", + "COBOL": null, + "CodeQL": "#140f46", + "CoffeeScript": "#244776", + "ColdFusion": "#ed2cd6", + "ColdFusion CFC": "#ed2cd6", + "COLLADA": "#F1A42B", + "Common Lisp": "#3fb68b", + "Common Workflow Language": "#B5314C", + "Component Pascal": "#B0CE4E", + "Cool": null, + "Coq": "#d0b68c", + "Crystal": "#000100", + "CSON": "#244776", + "Csound": "#1a1a1a", + "Csound Document": "#1a1a1a", + "Csound Score": "#1a1a1a", + "CSS": "#563d7c", + "CSV": "#237346", + "Cuda": "#3A4E3A", + "CUE": "#5886E1", + "CWeb": "#00007a", + "Cycript": null, + "Cython": "#fedf5b", + "D": "#ba595e", + "Dafny": "#FFEC25", + "Darcs Patch": "#8eff23", + "Dart": "#00B4AB", + "DataWeave": "#003a52", + "Dhall": "#dfafff", + "DIGITAL Command Language": null, + "DirectX 3D File": "#aace60", + "DM": "#447265", + "Dockerfile": "#384d54", + "Dogescript": "#cca760", + "DTrace": null, + "Dylan": "#6c616e", + "E": "#ccce35", + "Easybuild": "#069406", + "eC": "#913960", + "Ecere Projects": "#913960", + "ECL": "#8a1267", + "ECLiPSe": "#001d9d", + "EditorConfig": "#fff1f2", + "Eiffel": "#4d6977", + "EJS": "#a91e50", + "Elixir": "#6e4a7e", + "Elm": "#60B5CC", + "Emacs Lisp": "#c065db", + "EmberScript": "#FFF4F3", + "EQ": "#a78649", + "Erlang": "#B83998", + "F#": "#b845fc", + "F*": "#572e30", + "Factor": "#636746", + "Fancy": "#7b9db4", + "Fantom": "#14253c", + "Faust": "#c37240", + "Fennel": "#fff3d7", + "FIGlet Font": "#FFDDBB", + "Filebench WML": "#F6B900", + "Filterscript": null, + "fish": "#4aae47", + "Fluent": "#ffcc33", + "FLUX": "#88ccff", + "Forth": "#341708", + "Fortran": "#4d41b1", + "Fortran Free Form": "#4d41b1", + "FreeBasic": "#867db1", + "FreeMarker": "#0050b2", + "Frege": "#00cafe", + "Futhark": "#5f021f", + "G-code": "#D08CF2", + "Game Maker Language": "#71b417", + "GAML": "#FFC766", + "GAMS": "#f49a22", + "GAP": "#0000cc", + "GCC Machine Description": "#FFCFAB", + "GDB": null, + "GDScript": "#355570", + "GEDCOM": "#003058", + "Gemfile.lock": "#701516", + "Genie": "#fb855d", + "Genshi": "#951531", + "Gentoo Ebuild": "#9400ff", + "Gentoo Eclass": "#9400ff", + "Gerber Image": "#d20b00", + "Gherkin": "#5B2063", + "Git Attributes": "#F44D27", + "Git Config": "#F44D27", + "GLSL": "#5686a5", + "Glyph": "#c1ac7f", + "Gnuplot": "#f0a9f0", + "Go": "#00ADD8", + "Go Checksums": "#00ADD8", + "Go Module": "#00ADD8", + "Golo": "#88562A", + "Gosu": "#82937f", + "Grace": "#615f8b", + "Gradle": "#02303a", + "Grammatical Framework": "#ff0000", + "GraphQL": "#e10098", + "Graphviz (DOT)": "#2596be", + "Groovy": "#4298b8", + "Groovy Server Pages": "#4298b8", + "Hack": "#878787", + "Haml": "#ece2a9", + "Handlebars": "#f7931e", + "HAProxy": "#106da9", + "Harbour": "#0e60e3", + "Haskell": "#5e5086", + "Haxe": "#df7900", + "HCL": null, + "HiveQL": "#dce200", + "HLSL": "#aace60", + "HolyC": "#ffefaf", + "HTML": "#e34c26", + "HTML+ECR": "#2e1052", + "HTML+EEX": "#6e4a7e", + "HTML+ERB": "#701516", + "HTML+PHP": "#4f5d95", + "HTML+Razor": "#512be4", + "HTTP": "#005C9C", + "HXML": "#f68712", + "Hy": "#7790B2", + "HyPhy": null, + "IDL": "#a3522f", + "Idris": "#b30000", + "Ignore List": "#000000", + "IGOR Pro": "#0000cc", + "ImageJ Macro": "#99AAFF", + "Inform 7": null, + "INI": "#d1dbe0", + "Inno Setup": "#264b99", + "Io": "#a9188d", + "Ioke": "#078193", + "Isabelle": "#FEFE00", + "Isabelle ROOT": "#FEFE00", + "J": "#9EEDFF", + "JAR Manifest": "#b07219", + "Jasmin": "#d03600", + "Java": "#b07219", + "Java Properties": "#2A6277", + "Java Server Pages": "#2A6277", + "JavaScript": "#f1e05a", + "JavaScript+ERB": "#f1e05a", + "Jest Snapshot": "#15c213", + "JFlex": "#DBCA00", + "Jinja": "#a52a22", + "Jison": "#56b3cb", + "Jison Lex": "#56b3cb", + "Jolie": "#843179", + "jq": "#c7254e", + "JSON": "#292929", + "JSON with Comments": "#292929", + "JSON5": "#267CB9", + "JSONiq": "#40d47e", + "JSONLD": "#0c479c", + "Jsonnet": "#0064bd", + "Julia": "#a270ba", + "Jupyter Notebook": "#DA5B0B", + "Kaitai Struct": "#773b37", + "KakouneScript": "#6f8042", + "KiCad Layout": "#2f4aab", + "KiCad Legacy Layout": "#2f4aab", + "KiCad Schematic": "#2f4aab", + "Kotlin": "#A97BFF", + "KRL": "#28430A", + "LabVIEW": "#fede06", + "Lark": "#2980B9", + "Lasso": "#999999", + "Latte": "#f2a542", + "Lean": null, + "Less": "#1d365d", + "Lex": "#DBCA00", + "LFE": "#4C3023", + "LilyPond": "#9ccc7c", + "Limbo": null, + "Liquid": "#67b8de", + "Literate Agda": "#315665", + "Literate CoffeeScript": "#244776", + "Literate Haskell": "#5e5086", + "LiveScript": "#499886", + "LLVM": "#185619", + "Logos": null, + "Logtalk": "#295b9a", + "LOLCODE": "#cc9900", + "LookML": "#652B81", + "LoomScript": null, + "LSL": "#3d9970", + "Lua": "#000080", + "M": null, + "M4": null, + "M4Sugar": null, + "Macaulay2": "#d8ffff", + "Makefile": "#427819", + "Mako": "#7e858d", + "Markdown": "#083fa1", + "Marko": "#42bff2", + "Mask": "#f97732", + "Mathematica": "#dd1100", + "MATLAB": "#e16737", + "Max": "#c4a79c", + "MAXScript": "#00a6a6", + "mcfunction": "#E22837", + "Mercury": "#ff2b2b", + "Meson": "#007800", + "Metal": "#8f14e9", + "MiniD": null, + "Mirah": "#c7a938", + "mIRC Script": "#3d57c3", + "MLIR": "#5EC8DB", + "Modelica": "#de1d31", + "Modula-2": "#10253f", + "Modula-3": "#223388", + "Module Management System": null, + "Monkey": null, + "Moocode": null, + "MoonScript": "#ff4585", + "Motorola 68K Assembly": "#005daa", + "MQL4": "#62A8D6", + "MQL5": "#4A76B8", + "MTML": "#b7e1f4", + "MUF": null, + "mupad": "#244963", + "Mustache": "#724b3b", + "Myghty": null, + "nanorc": "#2d004d", + "NASL": null, + "NCL": "#28431f", + "Nearley": "#990000", + "Nemerle": "#3d3c6e", + "nesC": "#94B0C7", + "NetLinx": "#0aa0ff", + "NetLinx+ERB": "#747faa", + "NetLogo": "#ff6375", + "NewLisp": "#87AED7", + "Nextflow": "#3ac486", + "Nginx": "#009639", + "Nim": "#ffc200", + "Nit": "#009917", + "Nix": "#7e7eff", + "NPM Config": "#cb3837", + "NSIS": null, + "Nu": "#c9df40", + "NumPy": "#9C8AF9", + "Nunjucks": "#3d8137", + "NWScript": "#111522", + "Objective-C": "#438eff", + "Objective-C++": "#6866fb", + "Objective-J": "#ff0c5a", + "ObjectScript": "#424893", + "OCaml": "#3be133", + "Odin": "#60AFFE", + "Omgrofl": "#cabbff", + "ooc": "#b0b77e", + "Opa": null, + "Opal": "#f7ede0", + "Open Policy Agent": "#7d9199", + "OpenCL": "#ed2e2d", + "OpenEdge ABL": "#5ce600", + "OpenQASM": "#AA70FF", + "OpenRC runscript": null, + "OpenSCAD": "#e5cd45", + "Org": "#77aa99", + "Ox": null, + "Oxygene": "#cdd0e3", + "Oz": "#fab738", + "P4": "#7055b5", + "Pan": "#cc0000", + "Papyrus": "#6600cc", + "Parrot": "#f3ca0a", + "Parrot Assembly": null, + "Parrot Internal Representation": null, + "Pascal": "#E3F171", + "Pawn": "#dbb284", + "PEG.js": "#234d6b", + "Pep8": "#C76F5B", + "Perl": "#0298c3", + "PHP": "#4F5D95", + "PicoLisp": "#6067af", + "PigLatin": "#fcd7de", + "Pike": "#005390", + "PLpgSQL": "#336790", + "PLSQL": "#dad8d8", + "PogoScript": "#d80074", + "Pony": null, + "PostCSS": "#dc3a0c", + "PostScript": "#da291c", + "POV-Ray SDL": "#6bac65", + "PowerBuilder": "#8f0f8d", + "PowerShell": "#012456", + "Prisma": "#0c344b", + "Processing": "#0096D8", + "Prolog": "#74283c", + "Propeller Spin": "#7fa2a7", + "Pug": "#a86454", + "Puppet": "#302B6D", + "PureBasic": "#5a6986", + "PureScript": "#1D222D", + "Python": "#3572A5", + "Python console": "#3572A5", + "Python traceback": "#3572A5", + "q": "#0040cd", + "Q#": "#fed659", + "QMake": null, + "QML": "#44a51c", + "Qt Script": "#00b841", + "Quake": "#882233", + "R": "#198CE7", + "Racket": "#3c5caa", + "Ragel": "#9d5200", + "Raku": "#0000fb", + "RAML": "#77d9fb", + "Rascal": "#fffaa0", + "RDoc": "#701516", + "REALbasic": null, + "Reason": "#ff5847", + "Rebol": "#358a5b", + "Record Jar": "#0673ba", + "Red": "#f50000", + "Redcode": null, + "Regular Expression": "#009a00", + "Ren'Py": "#ff7f7f", + "RenderScript": null, + "ReScript": "#ed5051", + "reStructuredText": "#141414", + "REXX": "#d90e09", + "Ring": "#2D54CB", + "Riot": "#A71E49", + "RMarkdown": "#198ce7", + "RobotFramework": "#00c0b5", + "Roff": "#ecdebe", + "Roff Manpage": "#ecdebe", + "Rouge": "#cc0088", + "RPC": null, + "Ruby": "#701516", + "RUNOFF": "#665a4e", + "Rust": "#dea584", + "Sage": null, + "SaltStack": "#646464", + "SAS": "#B34936", + "Sass": "#a53b70", + "Scala": "#c22d40", + "Scaml": "#bd181a", + "Scheme": "#1e4aec", + "Scilab": "#ca0f21", + "SCSS": "#c6538c", + "sed": "#64b970", + "Self": "#0579aa", + "ShaderLab": "#222c37", + "Shell": "#89e051", + "ShellSession": null, + "Shen": "#120F14", + "Sieve": null, + "Singularity": "#64E6AD", + "Slash": "#007eff", + "Slice": "#003fa2", + "Slim": "#2b2b2b", + "Smali": null, + "Smalltalk": "#596706", + "Smarty": "#f0c040", + "SmPL": "#c94949", + "SMT": null, + "Solidity": "#AA6746", + "SourcePawn": "#f69e1d", + "SPARQL": "#0C4597", + "SQF": "#3F3F3F", + "SQL": "#e38c00", + "SQLPL": "#e38c00", + "Squirrel": "#800000", + "SRecode Template": "#348a34", + "Stan": "#b2011d", + "Standard ML": "#dc566d", + "Starlark": "#76d275", + "Stata": "#1a5f91", + "StringTemplate": "#3fb34f", + "Stylus": "#ff6347", + "SubRip Text": "#9e0101", + "SugarSS": "#2fcc9f", + "SuperCollider": "#46390b", + "Svelte": "#ff3e00", + "SVG": "#ff9900", + "Swift": "#F05138", + "SWIG": null, + "SystemVerilog": "#DAE1C2", + "Tcl": "#e4cc98", + "Tcsh": null, + "Terra": "#00004c", + "TeX": "#3D6117", + "Textile": "#ffe7ac", + "TextMate Properties": "#df66e4", + "Thrift": "#D12127", + "TI Program": "#A0AA87", + "TLA": "#4b0079", + "TOML": "#9c4221", + "TSQL": "#e38c00", + "TSV": "#237346", + "TSX": "#2b7489", + "Turing": "#cf142b", + "Twig": "#c1d026", + "TXL": "#0178b8", + "TypeScript": "#2b7489", + "Unified Parallel C": "#4e3617", + "Unity3D Asset": "#222c37", + "Unix Assembly": null, + "Uno": "#9933cc", + "UnrealScript": "#a54c4d", + "UrWeb": "#ccccee", + "V": "#4f87c4", + "Vala": "#fbe5cd", + "Valve Data Format": "#f26025", + "VBA": "#867db1", + "VBScript": "#15dcdc", + "VCL": "#148AA8", + "Verilog": "#b2b7f8", + "VHDL": "#adb2cb", + "Vim Help File": "#199f4b", + "Vim Script": "#199f4b", + "Vim Snippet": "#199f4b", + "Visual Basic .NET": "#945db7", + "Volt": "#1F1F1F", + "Vue": "#41b883", + "wdl": "#42f1f4", + "Web Ontology Language": "#5b70bd", + "WebAssembly": "#04133b", + "WebIDL": null, + "Wikitext": "#fc5757", + "Windows Registry Entries": "#52d5ff", + "wisp": "#7582D1", + "Wollok": "#a23738", + "World of Warcraft Addon Data": "#f7e43f", + "X10": "#4B6BEF", + "xBase": "#403a40", + "XC": "#99DA07", + "XML": "#0060ac", + "XML Property List": "#0060ac", + "Xojo": "#81bd41", + "Xonsh": "#285EEF", + "XProc": null, + "XQuery": "#5232e7", + "XS": null, + "XSLT": "#EB8CEB", + "Xtend": "#24255d", + "Yacc": "#4B6C4B", + "YAML": "#cb171e", + "YARA": "#220000", + "YASnippet": "#32AB90", + "ZAP": "#0d665e", + "Zeek": null, + "ZenScript": "#00BCD1", + "Zephir": "#118f9e", + "Zig": "#ec915c", + "ZIL": "#dc75e5", + "Zimpl": "#d67711" +} \ No newline at end of file diff --git a/exampleSite/config/_default/languages.en.toml b/exampleSite/config/_default/languages.en.toml index 4cfc25318..672bb394b 100644 --- a/exampleSite/config/_default/languages.en.toml +++ b/exampleSite/config/_default/languages.en.toml @@ -13,6 +13,7 @@ title = "Blowfish" [author] name = "Blowfish" + email = "nuno@n9o.xyz" image = "img/blowfish_logo.png" headline = "A powerful, lightweight theme for Hugo." bio = "A powerful, lightweight theme for Hugo." diff --git a/exampleSite/config/_default/params.toml b/exampleSite/config/_default/params.toml index bd6b53453..fc116a158 100644 --- a/exampleSite/config/_default/params.toml +++ b/exampleSite/config/_default/params.toml @@ -12,11 +12,14 @@ autoSwitchAppearance = true enableSearch = true enableCodeCopy = true +replyByEmail = false + mainSections = ["docs"] # robots = "" disableImageOptimization = false disableTextInHeader = false +# backgroundImageWidth = 1200 defaultBackgroundImage = "/img/background.svg" defaultFeaturedImage = "/img/featured.svg" @@ -134,6 +137,11 @@ smartTOCHideUnfocusedChildren = false # websiteid = "ABC12345" # domain = "llama.yoursite.com" # dataDomains = "yoursite.com,yoursite2.com" + # enableTrackEvent = false + +[selineAnalytics] + # token = "XXXXXX" + # enableTrackEvent = false [buymeacoffee] identifier = "nunocoracao" diff --git a/exampleSite/content/docs/configuration/index.it.md b/exampleSite/content/docs/configuration/index.it.md index 7ff3a897a..bdbeb0fb8 100644 --- a/exampleSite/content/docs/configuration/index.it.md +++ b/exampleSite/content/docs/configuration/index.it.md @@ -323,6 +323,14 @@ Many of the article defaults here can be overridden on a per article basis by sp | `umamiAnalytics.websiteid` | _Not set_ | The site code generated by Umami Analytics for the website. Refer to the [Analytics docs]({{< ref "partials#analytics" >}}) for more details. | | `umamiAnalytics.domain` | _Not set_ | If using a custom domain with Umami Analytics, provide it here to serve `script.js` from the custom domain. | | `umamiAnalytics.dataDomains` | _Not set_ | If you want the tracker to only run on specific domains, provide it for your tracker script. This is a comma delimited list of domain names. Such as "yoursite.com,yoursite2.com". | +| `umamiAnalytics.enableTrackEvent` | true | When set to `true` track event will add automatically. If you do not want to add track event, set it to `false`. | + +### Seline Analytics + +| Name | Default | Description | +|-----------------------------------|-----------|-------------------------------------------------------------------------------------------------------------------------------------------| +| `selineAnalytics.token` | _Not set_ | The token generated by Seline Analytics for the website. Refer to the [Analytics docs]({{< ref "partials#analytics" >}}) for more details. | +| `selineAnalytics.enableTrackEvent` | true | When set to `true` track event will add automatically. If you do not want to add track event, set it to `false`. | ### BuyMeACoffee diff --git a/exampleSite/content/docs/configuration/index.ja.md b/exampleSite/content/docs/configuration/index.ja.md index a9483139c..893e58ff0 100644 --- a/exampleSite/content/docs/configuration/index.ja.md +++ b/exampleSite/content/docs/configuration/index.ja.md @@ -322,6 +322,14 @@ Many of the article defaults here can be overridden on a per article basis by sp | `umamiAnalytics.websiteid` | _Not set_ | The site code generated by Umami Analytics for the website. Refer to the [Analytics docs]({{< ref "partials#analytics" >}}) for more details. | | `umamiAnalytics.domain` | _Not set_ | If using a custom domain with Umami Analytics, provide it here to serve `script.js` from the custom domain. | | `umamiAnalytics.dataDomains` | _Not set_ | If you want the tracker to only run on specific domains, provide it for your tracker script. This is a comma delimited list of domain names. Such as "yoursite.com,yoursite2.com". | +| `umamiAnalytics.enableTrackEvent` | true | When set to `true` track event will add automatically. If you do not want to add track event, set it to `false`. | + +### Seline Analytics + +| Name | Default | Description | +|-----------------------------------|-----------|-------------------------------------------------------------------------------------------------------------------------------------------| +| `selineAnalytics.token` | _Not set_ | The token generated by Seline Analytics for the website. Refer to the [Analytics docs]({{< ref "partials#analytics" >}}) for more details. | +| `selineAnalytics.enableTrackEvent` | true | When set to `true` track event will add automatically. If you do not want to add track event, set it to `false`. | ### BuyMeACoffee diff --git a/exampleSite/content/docs/configuration/index.md b/exampleSite/content/docs/configuration/index.md index 7b3ce190c..3b6e77528 100644 --- a/exampleSite/content/docs/configuration/index.md +++ b/exampleSite/content/docs/configuration/index.md @@ -82,6 +82,7 @@ The theme currently supports the following languages by default: | Italian | `it` | | Japanese | `ja` | | Korean | `ko` | +| Persian | `fa` | | Polish | `pl` | | Portuguese (Brazil) | `pt-br` | | Portuguese (Portugal) | `pt-pt` | @@ -136,13 +137,15 @@ The default file can be used as a template to create additional languages, or re #### Author -| Name | Default | Description | -| ----------------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `author.name` | _Not set_ | The author's name. This will be displayed in article footers, and on the homepage when the profile layout is used. | -| `author.image` | _Not set_ | Path to the image file of the author. The image should be a 1:1 aspect ratio. The image can be placed in the site's `assets/` folder or can be external url. | -| `author.headline` | _Not set_ | A Markdown string containing the author's headline. It will be displayed on the profile homepage under the author's name. | -| `author.bio` | _Not set_ | A Markdown string containing the author's bio. It will be displayed in article footers. | -| `author.links` | _Not set_ | The links to display alongside the author's details. The config file contains example links which can simply be uncommented to enable. The order that the links are displayed is determined by the order they appear in the array. Custom links can be added by providing corresponding SVG icon assets in `assets/icons/`. | +| Name | Default | Description | +| --------------------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `author.name` | _Not set_ | The author's name. This will be displayed in article footers, and on the homepage when the profile layout is used. | +| `author.email` | _Not set_ | The author's email. This will be used if the reply-via-email functionality is enabled. | +| `author.image` | _Not set_ | Path to the image file of the author. The image should be a 1:1 aspect ratio. The image can be placed in the site's `assets/` folder or can be external url. | +| `author.imageQuality` | `96` | The author's image file will be treated as a "high quality" image to minimize artifacts on the front page. Value range 1-100. | +| `author.headline` | _Not set_ | A Markdown string containing the author's headline. It will be displayed on the profile homepage under the author's name. | +| `author.bio` | _Not set_ | A Markdown string containing the author's bio. It will be displayed in article footers. | +| `author.links` | _Not set_ | The links to display alongside the author's details. The config file contains example links which can simply be uncommented to enable. The order that the links are displayed is determined by the order they appear in the array. Custom links can be added by providing corresponding SVG icon assets in `assets/icons/`. | ### Menus @@ -170,12 +173,16 @@ Many of the article defaults here can be overridden on a per article basis by sp | `autoSwitchAppearance` | `true` | Whether the theme appearance automatically switches based upon the visitor's operating system preference. Set to `false` to force the site to always use the `defaultAppearance`. | | `enableSearch` | `false` | Whether site search is enabled. Set to `true` to enable search functionality. Note that the search feature depends on the `outputs.home` setting in the [site configuration](#site-configuration) being set correctly. | | `enableCodeCopy` | `false` | Whether copy-to-clipboard buttons are enabled for `` blocks. The `highlight.noClasses` parameter must be set to `false` for code copy to function correctly. Read more about [other configuration files](#other-configuration-files) below. | +| `replyByEmail` | `false` | Whether the reply-by-email link is enabled after post. The `author.email` parameter in `config/_default/languages.en.toml` must be set. | +| `forgejoDefaultServer` | _Not set_ | The default `server` parameter for the `forgejo` shortcode. | +| `giteaDefaultServer` | _Not set_ | The default `server` parameter for the `gitea` shortcode. | | `mainSections` | _Not set_ | The sections that should be displayed in the recent articles list. If not provided the section with the greatest number of articles is used. | | `showViews` | _Not set_ | Whether or not articles and list views are displayed. This requires firebase integrations to be enabled, look below. | | `showLikes` | _Not set_ | Whether or not articles and list likes are displayed. This requires firebase integrations to be enabled, look below. | | `robots` | _Not set_ | String that indicates how robots should handle your site. If set, it will be output in the page head. Refer to [Google's docs](https://developers.google.com/search/docs/advanced/robots/robots_meta_tag#directives) for valid values. | | `disableImageZoom` | `false` | Disables image zoom feature across all the images in the site. | | `disableImageOptimization` | `false` | Disables image resize and optimization features across all the images in the site. | +| `backgroundImageWidth` | `1200` | Width (in pixels) to scale background images to. | | `disableTextInHeader` | `false` | Disables text in header, useful for logo based headers. | | `defaultBackgroundImage` | _Not set_ | Default background image for both `background` homepage layout and `background` hero style | | `defaultFeaturedImage` | _Not set_ | Default background image for all `featured` images across articles, will be overridden by a local `featured` image. | @@ -318,12 +325,19 @@ Many of the article defaults here can be overridden on a per article basis by sp ### Umami Analytics -| Name | Default | Description | -| -------------------------- | --------- |-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `umamiAnalytics.websiteid` | _Not set_ | The site code generated by Umami Analytics for the website. Refer to the [Analytics docs]({{< ref "partials#analytics" >}}) for more details. | -| `umamiAnalytics.domain` | _Not set_ | If using a custom domain with Umami Analytics, provide it here to serve `script.js` from the custom domain. | +| Name | Default | Description | +| -------------------------- |-----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `umamiAnalytics.websiteid` | _Not set_ | The site code generated by Umami Analytics for the website. Refer to the [Analytics docs]({{< ref "partials#analytics" >}}) for more details. | +| `umamiAnalytics.domain` | _Not set_ | If using a custom domain with Umami Analytics, provide it here to serve `script.js` from the custom domain. | | `umamiAnalytics.dataDomains` | _Not set_ | If you want the tracker to only run on specific domains, provide it for your tracker script. This is a comma delimited list of domain names. Such as "yoursite.com,yoursite2.com". | +| `umamiAnalytics.enableTrackEvent` | true | When set to `true` track event will add automatically. If you do not want to add track event, set it to `false`. | +### Seline Analytics + +| Name | Default | Description | +|-----------------------------------|-----------|-------------------------------------------------------------------------------------------------------------------------------------------| +| `selineAnalytics.token` | _Not set_ | The token generated by Seline Analytics for the website. Refer to the [Analytics docs]({{< ref "partials#analytics" >}}) for more details. | +| `selineAnalytics.enableTrackEvent` | true | When set to `true` track event will add automatically. If you do not want to add track event, set it to `false`. | ### BuyMeACoffee diff --git a/exampleSite/content/docs/configuration/index.zh-cn.md b/exampleSite/content/docs/configuration/index.zh-cn.md index aa8ef1f9f..dc7c6995d 100644 --- a/exampleSite/content/docs/configuration/index.zh-cn.md +++ b/exampleSite/content/docs/configuration/index.zh-cn.md @@ -265,9 +265,8 @@ Blowfish 提供了大量控制主题功能的配置参数,下面的表格中 | `list.cardView` | `false` | 将列表展示为卡片容器。 | | `list.cardViewScreenWidth` | `false` | 增强列表中卡片的宽度,使其可以占据可用的全部宽度。 | | `list.constrainItemsWidth` | `false` | 将项目宽度限制为 `prose` 以提高可读性。在没有 featurn 图片的时候非常有用。 | -| `list.showTableOfContents` | `false` | 是否显示目录。 | -### Sitemap +### 网站地图 | 名称 | 默认值 | 描述 | | ----------------------- | ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | @@ -300,7 +299,7 @@ Blowfish 提供了大量控制主题功能的配置参数,下面的表格中 | `term.cardView` | `false` | 将列表展示为卡片容器。 | | `term.cardViewScreenWidth` | `false` | 增强列表中卡片的宽度,使其可以占据可用的全部宽度。 | -### Firebase +### Firebase(Firebase 平台) | 名称 | 默认值 | 描述 | | ---------------------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------- | @@ -312,23 +311,31 @@ Blowfish 提供了大量控制主题功能的配置参数,下面的表格中 | `firebase.appId` | 无 | Firebase appId,与 Firebase 集成的必填参数。了解如何将 Firebase 集成进 Blowfish 请参考 [这个页面]({{< ref "firebase-views" >}})。 | | `firebase.measurementId` | 无 | Firebase measurementId,与 Firebase 集成的必填参数。了解如何将 Firebase 集成进 Blowfish 请参考 [这个页面]({{< ref "firebase-views" >}})。 | -### Fathom Analytics +### Fathom Analytics(一种网站分析工具) | 名称 | 默认值 | 描述 | | ------------------------ | ------ | ------------------------------------------------------------------------------------------- | | `fathomAnalytics.site` | 无 | 支持 Fathom 站点分析平台。更多详细内容请参考 [分析文档]({{< ref "partials#analytics" >}})。 | | `fathomAnalytics.domain` | 无 | 如果使用自定义域名的 Fathom Analytics,请在此提供,以便从自定义域名获取 `script.js`。 | -### Umami Analytics +### Umami Analytics(一种网站分析工具) -| Name | Default | Description | -| -------------------------- | --------- |-------------------------------------------------------------------------------------| -| `umamiAnalytics.websiteid` | _Not set_ | 支持 Umami 站点分析平台。更多详细内容请参考 [分析文档]({{< ref "partials#analytics" >}})。 | -| `umamiAnalytics.domain` | _Not set_ | 如果使用自定义域名的 Umami Analytics,请在此提供,以便从自定义域名获取 `script.js`。 | -| `umamiAnalytics.dataDomains` | _Not set_ | 如果你只想在特别的数个域名中使用 tracker 功能,那么你需要设置它。这个参数的值是逗号分隔的域名列表,如:yoursite.com,yoursite2.com。 | +| Name | Default | Description | +|------------------------------|-----------|-------------------------------------------------------------------------------------| +| `umamiAnalytics.websiteid` | 无 | 支持 Umami 站点分析平台。更多详细内容请参考 [分析文档]({{< ref "partials#analytics" >}})。 | +| `umamiAnalytics.domain` | 无 | 如果使用自定义域名的 Umami Analytics,请在此提供,以便从自定义域名获取 `script.js`。 | +| `umamiAnalytics.dataDomains` | 无 | 如果你只想在特别的数个域名中使用 tracker 功能,那么你需要设置它。这个参数的值是逗号分隔的域名列表,如:yoursite.com,yoursite2.com。 | +| `umamiAnalytics.enableTrackEvent` | true | 默认会自动添加 Umami Track Event。如果你不想添加 Event,那学需要设置为 `false`。 | +### Seline Analytics -### BuyMeACoffee +| Name | Default | Description | +|-----------------------------------|---------|--------------------------------------------------------------------------| +| `selineAnalytics.token` | 无 | Seline 站点分析平台的 token。更多详细内容请参考 [分析文档]({{< ref "partials#analytics" >}})。 | +| `selineAnalytics.enableTrackEvent` | true | 默认会自动添加 Umami Track Event。如果你不想添加 Event,那学需要设置为 `false`。 | + + +### BuyMeACoffee(赞助平台) | 名称 | 默认值 | 描述 | | ----------------------------------- | ------ | ---------------------------------- | diff --git a/exampleSite/content/docs/front-matter/index.zh-cn.md b/exampleSite/content/docs/front-matter/index.zh-cn.md index 884721b8d..b08590b70 100644 --- a/exampleSite/content/docs/front-matter/index.zh-cn.md +++ b/exampleSite/content/docs/front-matter/index.zh-cn.md @@ -1,5 +1,5 @@ --- -title: "Front Matter" +title: "Front Matter(文件头信息)" weight: 7 draft: false description: "文本主要介绍 Blowfish 中页面中可以添加的所有的 Front Matter 参数。" diff --git a/exampleSite/content/docs/homepage-layout/index.zh-cn.md b/exampleSite/content/docs/homepage-layout/index.zh-cn.md index 44c6ec5f0..0601ba813 100644 --- a/exampleSite/content/docs/homepage-layout/index.zh-cn.md +++ b/exampleSite/content/docs/homepage-layout/index.zh-cn.md @@ -35,7 +35,7 @@ Blowfish 提供了一个完全灵活的主页布局。你可以选择两种主 ## 英雄布局(hero) -英雄布局(hearo)组合了个人资料布局(profile)和卡片布局(card)。它不仅显示了网站作者的个人信息,还在个人资料下方加载了你的 markdown 内容。 +英雄布局(hero)组合了个人资料布局(profile)和卡片布局(card)。它不仅显示了网站作者的个人信息,还在个人资料下方加载了你的 markdown 内容。 diff --git a/exampleSite/content/docs/installation/index.zh-cn.md b/exampleSite/content/docs/installation/index.zh-cn.md index 418080103..52992f017 100644 --- a/exampleSite/content/docs/installation/index.zh-cn.md +++ b/exampleSite/content/docs/installation/index.zh-cn.md @@ -180,7 +180,7 @@ git submodule update --remote --merge 一旦子模块更新完毕,请检查你的确实是否一切正常。 -### Update using Hugo +### 使用 Hugo 更新 Hugo 更新也十分容易。只需要进入网站根目录,并执行以下命令即可: diff --git a/exampleSite/content/docs/partials/index.it.md b/exampleSite/content/docs/partials/index.it.md index 11911ae90..35da150d7 100644 --- a/exampleSite/content/docs/partials/index.it.md +++ b/exampleSite/content/docs/partials/index.it.md @@ -46,6 +46,10 @@ To enable Umami Analytics support, simply provide your [Umami tracking code](htt If you also use the custom domain feature of Umami and would like to serve their script from your domain, you can also additionally provide the `domain` configuration value. If you don't provide a `domain` value, the script will load directly from Umami DNS (analytics.umami.is). If you want the tracker to only run on specific domains, you can provide the `dataDomains` configuration value. If you don't provide a `dataDomains` value, the script will run on any website where the `domain` and` websiteid` match. +{{< alert >}} +**Note:** If you enable Umami Analytics, Blowfish will support [Umami Track Event](https://umami.is/docs/track-events) automatically. If you do not want to support Track Event, the param `enableTrackEvent` must set to `false`. +{{< /alert >}} + ```toml # config/_default/params.toml @@ -53,8 +57,24 @@ If you want the tracker to only run on specific domains, you can provide the `da websiteid = "ABC12345" domain = "llama.yoursite.com" dataDomains = "yoursite.com,yoursite2.com" + enableTrackEvent = true ``` +### Seline Analytics + +To enable Seline Analytics support, simply provide your [Seline token](https://seline.so/docs/install-seline) in the `config/_default/params.toml` file. + +{{< alert >}} +**Note:** If you enable Seline Analytics, Blowfish will support [Seline Track Event](https://seline.so/docs/custom-events) automatically. If you do not want to support Track Event, the param `enableTrackEvent` must set to `false`. +{{< /alert >}} + +```toml +# config/_default/params.toml + +[selineAnalytics] + token = "XXXXXX" + enableTrackEvent = true +``` ### Custom analytics providers If you wish to use a different analytics provider on your website you can also override the analytics partial and provide your own script. Simply create the file `layouts/partials/extend-head.html` in your project and it will automatically include it in the `` of the website. diff --git a/exampleSite/content/docs/partials/index.ja.md b/exampleSite/content/docs/partials/index.ja.md index 11911ae90..63e826663 100644 --- a/exampleSite/content/docs/partials/index.ja.md +++ b/exampleSite/content/docs/partials/index.ja.md @@ -46,6 +46,10 @@ To enable Umami Analytics support, simply provide your [Umami tracking code](htt If you also use the custom domain feature of Umami and would like to serve their script from your domain, you can also additionally provide the `domain` configuration value. If you don't provide a `domain` value, the script will load directly from Umami DNS (analytics.umami.is). If you want the tracker to only run on specific domains, you can provide the `dataDomains` configuration value. If you don't provide a `dataDomains` value, the script will run on any website where the `domain` and` websiteid` match. +{{< alert >}} +**Note:** If you enable Umami Analytics, Blowfish will support [Umami Track Event](https://umami.is/docs/track-events) automatically. If you do not want to support Track Event, the param `enableTrackEvent` must set to `false`. +{{< /alert >}} + ```toml # config/_default/params.toml @@ -53,6 +57,22 @@ If you want the tracker to only run on specific domains, you can provide the `da websiteid = "ABC12345" domain = "llama.yoursite.com" dataDomains = "yoursite.com,yoursite2.com" + enableTrackEvent = true +``` + +### Seline Analytics + +To enable Seline Analytics support, simply provide your [Seline token](https://seline.so/docs/install-seline) in the `config/_default/params.toml` file. +{{< alert >}} +**Note:** If you enable Seline Analytics, Blowfish will support [Seline Track Event](https://seline.so/docs/custom-events) automatically. If you do not want to support Track Event, the param `enableTrackEvent` must set to `false`. +{{< /alert >}} + +```toml +# config/_default/params.toml + +[selineAnalytics] + token = "XXXXXX" + enableTrackEvent = true ``` ### Custom analytics providers diff --git a/exampleSite/content/docs/partials/index.md b/exampleSite/content/docs/partials/index.md index 3fc0b3b5c..0366655ad 100644 --- a/exampleSite/content/docs/partials/index.md +++ b/exampleSite/content/docs/partials/index.md @@ -45,6 +45,11 @@ googleAnalytics = "G-MEASUREMENT_ID" To enable Umami Analytics support, simply provide your [Umami tracking code](https://umami.is/docs/collect-data) in the `config/_default/params.toml` file. If you also use the custom domain feature of Umami and would like to serve their script from your domain, you can also additionally provide the `domain` configuration value. If you don't provide a `domain` value, the script will load directly from Umami DNS (analytics.umami.is). If you want the tracker to only run on specific domains, you can provide the `dataDomains` configuration value. If you don't provide a `dataDomains` value, the script will run on any website where the `domain` and` websiteid` match. + +{{< alert >}} +**Note:** If you enable Umami Analytics, Blowfish will support [Umami Track Event](https://umami.is/docs/track-events) automatically. If you do not want to support Track Event, the param `enableTrackEvent` must set to `false`. +{{< /alert >}} + ```toml # config/_default/params.toml @@ -52,6 +57,23 @@ If you want the tracker to only run on specific domains, you can provide the `da websiteid = "ABC12345" domain = "llama.yoursite.com" dataDomains = "yoursite.com,yoursite2.com" + enableTrackEvent = true +``` + +### Seline Analytics + +To enable Seline Analytics support, simply provide your [Seline token](https://seline.so/docs/install-seline) in the `config/_default/params.toml` file. + +{{< alert >}} +**Note:** If you enable Seline Analytics, Blowfish will support [Seline Track Event](https://seline.so/docs/custom-events) automatically. If you do not want to support Track Event, the param `enableTrackEvent` must set to `false`. +{{< /alert >}} + +```toml +# config/_default/params.toml + +[selineAnalytics] + token = "XXXXXX" + enableTrackEvent = true ``` ### Custom analytics providers diff --git a/exampleSite/content/docs/partials/index.zh-cn.md b/exampleSite/content/docs/partials/index.zh-cn.md index 48295861a..b1f96eae8 100644 --- a/exampleSite/content/docs/partials/index.zh-cn.md +++ b/exampleSite/content/docs/partials/index.zh-cn.md @@ -1,5 +1,5 @@ --- -title: "Partials" +title: "局部模板(Partials)" weight: 9 draft: false description: "所有 Blowfish 可以配置的 Partials" @@ -50,6 +50,11 @@ googleAnalytics = "G-MEASUREMENT_ID" 如果你想使用自定义域名来获取跟踪脚本, 那么需要提供 `domain` 参数,否则会从 Umami 云服务版的地址 (analytics.umami.is) 获取脚本。 如果你只想在特别的数个域名中使用 tracker 功能,那么需要提供 `dataDomains` 参数。否则任何一个匹配了 `websiteid` 和 `domain` 参数值的网站,Umami 脚本都会执行。 +{{< alert >}} +**Note:** 开启 Umami 网站分析后, Blowfish 会自动支持 [Umami 事件追踪](https://umami.is/docs/track-events)。如果你不想支持此功能,需要把参数 `enableTrackEvent` 设置为 `false`。 + +{{< /alert >}} + ```toml # config/_default/params.toml @@ -59,6 +64,23 @@ googleAnalytics = "G-MEASUREMENT_ID" dataDomains = "yoursite.com,yoursite2.com" ``` +### Seline + +只需要在 `config/_default/params.toml` 文件提供你的 [Seline token](https://seline.so/docs/install-seline),就可以快速支持 Seline 站点分析。 + +{{< alert >}} +**Note:** 开启 Seline 网站分析后, Blowfish 会自动支持 [Seline 事件追踪](https://seline.so/docs/custom-events)。如果你不想支持此功能,需要把参数 `enableTrackEvent` 设置为 `false`。 +{{< /alert >}} + +```toml +# config/_default/params.toml + +[selineAnalytics] + token = "XXXXXX" + enableTrackEvent = true +``` + + ### 提供自定义站点分析 如果你想在你的网站提供其他站点分析,你可以自己提供脚本,并覆盖 Blowfish 主题中内置的 partial。 @@ -123,4 +145,4 @@ Blowfish 还提供了许多扩展 partial,可以扩展基本功能。 本主题允许在模板的``和`