从零开始写一个vuepress插件

初始化插件项目在任意目录新建一个插件目录我这里在pkgvuepresspluginsimpleencryptmkdirpkgvuepresspluginsimpleencrypt进入该目录初始化项目yarninit输入插件名vuepresspluginsimpleencrypt入口文件名indexjs其他选项对应填写即可。初始化之后packagejson的文件内容_{_{}_{}_[]_{}}编写入口文件indexjsmoduleexports=(optionsctx)={return{name_vuep
阅读更多

Jekyll平台配置指南

安装jekyllgeminstalljekyllwithcppflags=i(brewprefixopenssl)include查看jekyll版本jekyllv站点初始化##gitcheckoutorphanghpagesgitrmrf创建新站点jekyllnewskipbundle替换依赖##注释掉##gem##添加gem安装依赖bundleinstall解决依赖问题bundleaddwebrick本地运行bundleexecjekyllserve准备工作https_docsgithubcomenpa
阅读更多

dotenv加载变量

@tsignoreimportdotenvfromdotenvimportpathfrompath_初始化测试环境变量exportconstinittestenv=()={const__dirname=pathdirname(importmetaurl)_constenvpath=pathrelative(processcwd()pathjoin(__dirnameenvdevelopmentlocal))replace()consolelog(envpath)dotenvconfig({path_env
阅读更多