#mrm

mrm 管理你的多个json

mrm 对自己众多的配置文件,烦恼吗 ?! 就像下面这些 codecov contributing editorconfig eslint gitignore jest license lintstaged package prettier readme semantic-release styleguidist stylelint travis typescript mrm项目 帮助你管理你的配置 npx mrm gitignore // 一个 .gitignore 就在运行目录 如何定义 mkdir ~/dotfiles || cd ~/dotfiles && mkdir mrm || cd mrm npm init -y npm i --save mrm-core 如 gitignore ~/dotfiles/mrm/<Task>/index.js // Mrm module to work with new line separated text files const { lines } = require('mrm-core'); function task() { // Read . ...

#hugo #i18n

hugo i18n

双语 hugo的国际化 由源于 内置 go-i18n 方式 一: 翻译 string 类似与 菜单栏 nav 有两种方式 在项目根目录 创建 i18n 文件夹 i18n en.toml/yaml zh.toml/yaml en.toml [home] other = "home" zh.toml [home] other = "主页" 上面的设置好后,在 模版主题中使用 *.html {{ i18n "home" }} 这样在 html 头的带领下 呈现 en/zh.toml <html lang='en'> 第二种 根目录中 config.toml defaultContentLanguage = "en" # 这里是 默认网址 https://example.com # 如果是 true https://example. ...

#hugo

hugo templete 语法

--- title: "Hugo Template" date: 2017-11-14T15:39:48+08:00 description: "a hugo template example" featured_image: http://localhost:1313/images/gohugo-default-sample-hero-image.jpg --- hugo templete 目录 主模版 内置变量 函数 引入模版 定义元素标签 baseof.html themes/youthemes/layouts/_default/baseof.html {{ block "main" . }}{{ end }} 定义 区域块 其他 html themes/youthemes/layouts/_default/list.html {{ define "main" }} {{ end }} 注意⚠️ themes/youthemes/layouts/_default/single.html themes/youthemes/layouts/_default/list.html 对于,Hugo 来说,网站分为 index.html list.html single.html 根目录文件夹中 在 content 文件夹下 就是 路由 content about // list. ...