doc: verdaccio

This commit is contained in:
mozzie 2023-10-20 10:28:01 +08:00
parent 1bb3a5f245
commit 97dce4be32
13 changed files with 854 additions and 161 deletions

File diff suppressed because one or more lines are too long

View File

@ -132,7 +132,7 @@
<li class="active"> <li class="active">
<a href="/categories/Hexo/"> <a href="/categories/Hexo/">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><path d="M9 16h6v2H9zm4-7h-2v2H9v2h2v2h2v-2h2v-2h-2z" fill="currentColor"></path><path d="M12 2c-5.33 4.55-8 8.48-8 11.8c0 4.98 3.8 8.2 8 8.2s8-3.22 8-8.2c0-3.32-2.67-7.25-8-11.8zm0 18c-3.35 0-6-2.57-6-6.2c0-2.34 1.95-5.44 6-9.14c4.05 3.7 6 6.79 6 9.14c0 3.63-2.65 6.2-6 6.2z" fill="currentColor"></path></svg> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 17v1a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-1"></path><path d="M8 16h8"></path><path d="M8.322 12.582l7.956.836"></path><path d="M8.787 9.168l7.826 1.664"></path><path d="M10.096 5.764l7.608 2.472"></path></g></svg>
<div class="ellipsis"> <div class="ellipsis">
<span> <span>
Hexo Hexo
@ -141,6 +141,17 @@
</a> </a>
</li> </li>
<li class="">
<a href="/categories/Front-End/">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20 4l-2 14.5l-6 2l-6-2L4 4z"></path><path d="M7.5 8h3v8l-2-1"></path><path d="M16.5 8H14a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h1.423a.5.5 0 0 1 .495.57L15.5 15.5l-2 .5"></path></g></svg>
<div class="ellipsis">
<span>
Front-End
</span>
</div>
</a>
</li>
</ul> </ul>
</section> </section>

View File

@ -132,7 +132,7 @@
<li class="active"> <li class="active">
<a href="/categories/Hexo/"> <a href="/categories/Hexo/">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><path d="M9 16h6v2H9zm4-7h-2v2H9v2h2v2h2v-2h2v-2h-2z" fill="currentColor"></path><path d="M12 2c-5.33 4.55-8 8.48-8 11.8c0 4.98 3.8 8.2 8 8.2s8-3.22 8-8.2c0-3.32-2.67-7.25-8-11.8zm0 18c-3.35 0-6-2.57-6-6.2c0-2.34 1.95-5.44 6-9.14c4.05 3.7 6 6.79 6 9.14c0 3.63-2.65 6.2-6 6.2z" fill="currentColor"></path></svg> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 17v1a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-1"></path><path d="M8 16h8"></path><path d="M8.322 12.582l7.956.836"></path><path d="M8.787 9.168l7.826 1.664"></path><path d="M10.096 5.764l7.608 2.472"></path></g></svg>
<div class="ellipsis"> <div class="ellipsis">
<span> <span>
Hexo Hexo
@ -141,6 +141,17 @@
</a> </a>
</li> </li>
<li class="">
<a href="/categories/Front-End/">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20 4l-2 14.5l-6 2l-6-2L4 4z"></path><path d="M7.5 8h3v8l-2-1"></path><path d="M16.5 8H14a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h1.423a.5.5 0 0 1 .495.57L15.5 15.5l-2 .5"></path></g></svg>
<div class="ellipsis">
<span>
Front-End
</span>
</div>
</a>
</li>
</ul> </ul>
</section> </section>

View File

@ -0,0 +1,475 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
verdaccio 搭建 npm私库
</title>
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="Mozzie">
<link rel="canonical" href="https://mozzie.cn/2023/10/20/front-end/verdaccio/">
<link rel="icon" type="image/svg" href='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M16 7h1a2 2 0 0 1 2 2v.5a.5.5 0 0 0 .5.5a.5.5 0 0 1 .5.5v3a.5.5 0 0 1-.5.5a.5.5 0 0 0-.5.5v.5a2 2 0 0 1-2 2h-2"></path><path d="M8 7H6a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h1"></path><path d="M12 8l-2 4h3l-2 4"></path></g></svg>'>
<link rel="stylesheet" href="/css/2f1ea598.css">
<meta name="generator" content="Hexo 6.3.0"></head>
<body id="app">
<!-- 响应式布局按钮 -->
<a class="side-navigation btn-hover btn-hover-bg tip left" data-tip="Expand">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24">
<g fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<rect x="4" y="4" width="16" height="16" rx="2"></rect>
<path d="M9 4v16"></path>
</g>
</svg>
</a>
<aside>
<div>
<link rel="stylesheet" href="/css/e01add4b.css">
<div class="home-bar">
<a href="/" class="tip" data-tip="Home">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 512 512">
<path
d="M172.2 226.8c-14.6-2.9-28.2 8.9-28.2 23.8V301c0 10.2 7.1 18.4 16.7 22c18.2 6.8 31.3 24.4 31.3 45c0 26.5-21.5 48-48 48s-48-21.5-48-48V120c0-13.3-10.7-24-24-24H24c-13.3 0-24 10.7-24 24v248c0 89.5 82.1 160.2 175 140.7c54.4-11.4 98.3-55.4 109.7-109.7c17.4-82.9-37-157.2-112.5-172.2zM209 0c-9.2-.5-17 6.8-17 16v31.6c0 8.5 6.6 15.5 15 15.9c129.4 7 233.4 112 240.9 241.5c.5 8.4 7.5 15 15.9 15h32.1c9.2 0 16.5-7.8 16-17C503.4 139.8 372.2 8.6 209 0zm.3 96c-9.3-.7-17.3 6.7-17.3 16.1v32.1c0 8.4 6.5 15.3 14.8 15.9c76.8 6.3 138 68.2 144.9 145.2c.8 8.3 7.6 14.7 15.9 14.7h32.2c9.3 0 16.8-8 16.1-17.3c-8.4-110.1-96.5-198.2-206.6-206.7z"
fill="currentColor"></path>
</svg>
<span>Mozzie</span>
</a>
<!-- 切换主题 -->
<a id="toggle-theme" class="tip left" data-tip="Switch Theme">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 512 512">
<path d="M256 118a22 22 0 0 1-22-22V48a22 22 0 0 1 44 0v48a22 22 0 0 1-22 22z" fill="currentColor"></path>
<path d="M256 486a22 22 0 0 1-22-22v-48a22 22 0 0 1 44 0v48a22 22 0 0 1-22 22z" fill="currentColor"></path>
<path
d="M369.14 164.86a22 22 0 0 1-15.56-37.55l33.94-33.94a22 22 0 0 1 31.11 31.11l-33.94 33.94a21.93 21.93 0 0 1-15.55 6.44z"
fill="currentColor"></path>
<path
d="M108.92 425.08a22 22 0 0 1-15.55-37.56l33.94-33.94a22 22 0 1 1 31.11 31.11l-33.94 33.94a21.94 21.94 0 0 1-15.56 6.45z"
fill="currentColor"></path>
<path d="M464 278h-48a22 22 0 0 1 0-44h48a22 22 0 0 1 0 44z" fill="currentColor"></path>
<path d="M96 278H48a22 22 0 0 1 0-44h48a22 22 0 0 1 0 44z" fill="currentColor"></path>
<path
d="M403.08 425.08a21.94 21.94 0 0 1-15.56-6.45l-33.94-33.94a22 22 0 0 1 31.11-31.11l33.94 33.94a22 22 0 0 1-15.55 37.56z"
fill="currentColor"></path>
<path
d="M142.86 164.86a21.89 21.89 0 0 1-15.55-6.44l-33.94-33.94a22 22 0 0 1 31.11-31.11l33.94 33.94a22 22 0 0 1-15.56 37.55z"
fill="currentColor"></path>
<path d="M256 358a102 102 0 1 1 102-102a102.12 102.12 0 0 1-102 102z" fill="currentColor"></path>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 512 512">
<path
d="M264 480A232 232 0 0 1 32 248c0-94 54-178.28 137.61-214.67a16 16 0 0 1 21.06 21.06C181.07 76.43 176 104.66 176 136c0 110.28 89.72 200 200 200c31.34 0 59.57-5.07 81.61-14.67a16 16 0 0 1 21.06 21.06C442.28 426 358 480 264 480z"
fill="currentColor"></path>
</svg>
</a>
</div>
<script src="/js/1247bc3e.js"></script>
<!-- search -->
<link rel="stylesheet" href="/css/4c3d0e88.css">
<form class="search-group">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 20 20">
<g fill="currentColor">
<path d="M8.5 3a5.5 5.5 0 0 1 4.383 8.823l4.147 4.147a.75.75 0 0 1-.976 1.133l-.084-.073l-4.147-4.147A5.5 5.5 0 1 1 8.5 3zm0 1.5a4 4 0 1 0 0 8a4 4 0 0 0 0-8z" fill="currentColor"></path>
</g>
</svg>
<span id="search-input">Search...</span>
<div class="short-key">
<kbd class="key-cap"><span>Ctrl K</span></kbd>
</div>
</form>
<script>
window.algolia = {
appId: "5DTW808BZ8",
SearchOnlyAPIKey: "27845b245efc8a2853cc0bdc7366ea26"
}
</script>
<script src="/js/07f44e09.js"></script>
<!-- navigation -->
<link rel="stylesheet" href="/css/3efc6cb5.css">
<section class="category-nav scrollbar-obtrusive">
<ul class="nav-items">
<li data-path="archives">
<a href="/archives">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24">
<g fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M12 7v14"></path>
<path d="M9 18l3 3l3-3"></path>
<circle cx="12" cy="5" r="2"></circle>
</g>
</svg>
<div class="ellipsis">Timeline</div>
</a>
</li>
</ul>
<p>Category</p>
<ul>
<li class="">
<a href="/categories/Hexo/">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 17v1a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-1"></path><path d="M8 16h8"></path><path d="M8.322 12.582l7.956.836"></path><path d="M8.787 9.168l7.826 1.664"></path><path d="M10.096 5.764l7.608 2.472"></path></g></svg>
<div class="ellipsis">
<span>
Hexo
</span>
</div>
</a>
</li>
<li class="active">
<a href="/categories/Front-End/">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20 4l-2 14.5l-6 2l-6-2L4 4z"></path><path d="M7.5 8h3v8l-2-1"></path><path d="M16.5 8H14a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h1.423a.5.5 0 0 1 .495.57L15.5 15.5l-2 .5"></path></g></svg>
<div class="ellipsis">
<span>
Front-End
</span>
</div>
</a>
</li>
</ul>
</section>
<script src="/js/f8b20eb9.js"></script>
<!-- icp -->
<div class="icp">
<a target="_blank" rel="noopener" href="http://beian.miit.gov.cn/">苏ICP备19008833号-4</a>
</div>
</div>
</aside>
<main>
<link rel="stylesheet" href="/css/7c527814.css">
<div class="post-container">
<div class="content">
<header>
<link rel="stylesheet" href="/css/de5de8fb.css">
<nav class="breadcrumb">
<a href="/" class="home tip btn-hover right" data-tip="Home">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 512 512">
<path d="M172.2 226.8c-14.6-2.9-28.2 8.9-28.2 23.8V301c0 10.2 7.1 18.4 16.7 22c18.2 6.8 31.3 24.4 31.3 45c0 26.5-21.5 48-48 48s-48-21.5-48-48V120c0-13.3-10.7-24-24-24H24c-13.3 0-24 10.7-24 24v248c0 89.5 82.1 160.2 175 140.7c54.4-11.4 98.3-55.4 109.7-109.7c17.4-82.9-37-157.2-112.5-172.2zM209 0c-9.2-.5-17 6.8-17 16v31.6c0 8.5 6.6 15.5 15 15.9c129.4 7 233.4 112 240.9 241.5c.5 8.4 7.5 15 15.9 15h32.1c9.2 0 16.5-7.8 16-17C503.4 139.8 372.2 8.6 209 0zm.3 96c-9.3-.7-17.3 6.7-17.3 16.1v32.1c0 8.4 6.5 15.3 14.8 15.9c76.8 6.3 138 68.2 144.9 145.2c.8 8.3 7.6 14.7 15.9 14.7h32.2c9.3 0 16.8-8 16.1-17.3c-8.4-110.1-96.5-198.2-206.6-206.7z" fill="currentColor"></path>
</svg>
</a>
<em>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 20 20">
<g fill="none">
<path d="M7.733 4.207a.75.75 0 0 1 1.06.026l5.001 5.25a.75.75 0 0 1 0 1.035l-5 5.25a.75.75 0 1 1-1.087-1.034L12.216 10l-4.51-4.734a.75.75 0 0 1 .027-1.06z" fill="currentColor"></path>
</g>
</svg>
</em>
<a href="/categories/Front-End/">
Front-End
</a>
<em>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 20 20">
<g fill="none">
<path d="M7.733 4.207a.75.75 0 0 1 1.06.026l5.001 5.25a.75.75 0 0 1 0 1.035l-5 5.25a.75.75 0 1 1-1.087-1.034L12.216 10l-4.51-4.734a.75.75 0 0 1 .027-1.06z" fill="currentColor"></path>
</g>
</svg>
</em>
<span class="ellipsis">
verdaccio 搭建 npm私库
</span>
</nav>
<script src="/js/31d6cfe0.js"></script>
</header>
<main class="scrollbar-obtrusive">
<div class="article-container">
<!-- 文章tags -->
<!-- 渲染文章内容 -->
<article><h1 id="使用-docker-搭建-verdaccio"><a href="#使用-docker-搭建-verdaccio" class="headerlink" title="使用 docker 搭建 verdaccio"></a>使用 docker 搭建 verdaccio</h1><p>创建 &amp; 配置<code>config.yaml</code>文件</p>
<pre class="line-numbers language-yaml" data-language="yaml"><code class="language-yaml"><span class="token comment"># Read about the best practices</span>
<span class="token comment"># https://verdaccio.org/docs/best</span>
<span class="token comment"># path to a directory with all packages</span>
<span class="token key atrule">storage</span><span class="token punctuation">:</span> /verdaccio/storage/data
<span class="token comment"># path to a directory with plugins to include</span>
<span class="token key atrule">plugins</span><span class="token punctuation">:</span> /verdaccio/plugins
<span class="token comment"># 包体积上限默认10mb</span>
<span class="token key atrule">max_body_size</span><span class="token punctuation">:</span> 1024mb
<span class="token key atrule">web</span><span class="token punctuation">:</span>
<span class="token key atrule">enable</span><span class="token punctuation">:</span> <span class="token boolean important">true</span>
<span class="token key atrule">title</span><span class="token punctuation">:</span> Mozzie<span class="token punctuation">-</span>NPM
<span class="token comment"># gravatar: false</span>
<span class="token comment"># login: true</span>
<span class="token key atrule">pkgManagers</span><span class="token punctuation">:</span>
<span class="token punctuation">-</span> npm
<span class="token punctuation">-</span> yarn
<span class="token punctuation">-</span> pnpm
<span class="token key atrule">html_cache</span><span class="token punctuation">:</span> <span class="token boolean important">true</span>
<span class="token key atrule">showFooter</span><span class="token punctuation">:</span> <span class="token boolean important">false</span>
<span class="token key atrule">auth</span><span class="token punctuation">:</span>
<span class="token key atrule">htpasswd</span><span class="token punctuation">:</span>
<span class="token key atrule">file</span><span class="token punctuation">:</span> /verdaccio/storage/htpasswd
<span class="token comment"># 关闭注册手动添加用户默认Bcrypt算法随便找个网页生成个密码使用账号:密码添加到 htpasswd 文件中,例如 test:$2a$10$0xPGVnpcdxcfmFxtWyWDx./TRtm/W/gSzib/jck3w.sF9x.Ur8t8W</span>
<span class="token key atrule">max_users</span><span class="token punctuation">:</span> <span class="token number">-1</span>
<span class="token key atrule">i18n</span><span class="token punctuation">:</span>
<span class="token key atrule">web</span><span class="token punctuation">:</span> zh<span class="token punctuation">-</span>CN
<span class="token comment"># notify: # 配置 Webhook 推送到钉钉,记得修改 access_token 和 atMobiles</span>
<span class="token comment"># method: POST</span>
<span class="token comment"># headers: [&#123; "Content-Type": "application/json" &#125;]</span>
<span class="token comment"># endpoint: https://oapi.dingtalk.com/robot/send?access_token=xxxx</span>
<span class="token comment"># content: '&#123;"msgtype":"text", "at": &#123;"atMobiles": ["13000000000"] &#125;, "text":&#123;"content":"NPM 发布新包:\n > 包名称:&#123;&#123;name&#125;&#125; \n > 版本号:&#123;&#123;#each versions&#125;&#125;&#123;&#123;version&#125;&#125;&#123;&#123;/each&#125;&#125; \n > 发布者:&#123;&#123;publisher.name&#125;&#125; "&#125;&#125;'</span>
<span class="token key atrule">uplinks</span><span class="token punctuation">:</span>
<span class="token key atrule">npmjs</span><span class="token punctuation">:</span>
<span class="token key atrule">url</span><span class="token punctuation">:</span> https<span class="token punctuation">:</span>//registry.npmjs.org/
<span class="token key atrule">yarn</span><span class="token punctuation">:</span>
<span class="token key atrule">url</span><span class="token punctuation">:</span> https<span class="token punctuation">:</span>//registry.yarnpkg.com/
<span class="token key atrule">timeout</span><span class="token punctuation">:</span> 10s
<span class="token key atrule">taobao</span><span class="token punctuation">:</span>
<span class="token key atrule">url</span><span class="token punctuation">:</span> https<span class="token punctuation">:</span>//registry.npmmirror.com/
<span class="token key atrule">timeout</span><span class="token punctuation">:</span> 10s
<span class="token key atrule">packages</span><span class="token punctuation">:</span>
<span class="token key atrule">"@*/*"</span><span class="token punctuation">:</span>
<span class="token comment"># 可访问权限web界面看不见不登陆也无法 install 包</span>
<span class="token key atrule">access</span><span class="token punctuation">:</span> $authenticated <span class="token comment"># $all</span>
<span class="token comment"># 发布权限, $authenticated 表示只有通过验证的人</span>
<span class="token key atrule">publish</span><span class="token punctuation">:</span> $authenticated
<span class="token comment"># 可取消发布权限</span>
<span class="token key atrule">unpublish</span><span class="token punctuation">:</span> $authenticated
<span class="token comment"># 包不存在时的代理</span>
<span class="token key atrule">proxy</span><span class="token punctuation">:</span> npmjs yarn taobao
<span class="token key atrule">"**"</span><span class="token punctuation">:</span>
<span class="token key atrule">access</span><span class="token punctuation">:</span> $authenticated <span class="token comment"># $all</span>
<span class="token key atrule">publish</span><span class="token punctuation">:</span> $authenticated
<span class="token key atrule">unpublish</span><span class="token punctuation">:</span> $authenticated
<span class="token key atrule">proxy</span><span class="token punctuation">:</span> npmjs yarn taobao
<span class="token key atrule">middlewares</span><span class="token punctuation">:</span>
<span class="token key atrule">audit</span><span class="token punctuation">:</span>
<span class="token key atrule">enabled</span><span class="token punctuation">:</span> <span class="token boolean important">true</span>
<span class="token key atrule">listen</span><span class="token punctuation">:</span> 0.0.0.0<span class="token punctuation">:</span><span class="token number">4873</span>
<span class="token key atrule">log</span><span class="token punctuation">:</span> <span class="token punctuation">&#123;</span> <span class="token key atrule">type</span><span class="token punctuation">:</span> stdout<span class="token punctuation">,</span> <span class="token key atrule">format</span><span class="token punctuation">:</span> pretty<span class="token punctuation">,</span> <span class="token key atrule">level</span><span class="token punctuation">:</span> http <span class="token punctuation">&#125;</span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>
<p>创建容器,环境变量,<code>VERDACCIO_PUBLIC_URL</code>是静态资源的前缀地址由于nginx挂了<code>ssl</code>,如果使用<code>http</code>可以不添加</p>
<pre class="line-numbers language-bash" data-language="bash"><code class="language-bash"><span class="token function">docker</span> run <span class="token punctuation">\</span>
<span class="token parameter variable">-p</span> <span class="token number">4873</span>:4873 <span class="token punctuation">\</span>
<span class="token parameter variable">--restart</span><span class="token operator">=</span>always <span class="token punctuation">\</span>
<span class="token parameter variable">--network</span> mozzie.cn-net <span class="token punctuation">\</span>
--network-alias verdaccio <span class="token punctuation">\</span>
<span class="token parameter variable">--env</span> <span class="token assign-left variable">VERDACCIO_PORT</span><span class="token operator">=</span><span class="token number">4873</span> <span class="token punctuation">\</span>
<span class="token parameter variable">--env</span> <span class="token assign-left variable">VERDACCIO_PUBLIC_URL</span><span class="token operator">=</span>https://npm.mozzie.cn <span class="token punctuation">\</span>
<span class="token parameter variable">--ip</span> <span class="token number">172.21</span>.0.196 <span class="token punctuation">\</span>
<span class="token parameter variable">--name</span> verdaccio <span class="token punctuation">\</span>
<span class="token parameter variable">-v</span> /www/wwwroot/nginx/html/verdaccio/storage:/verdaccio/storage <span class="token punctuation">\</span>
<span class="token parameter variable">-v</span> /www/wwwroot/nginx/html/verdaccio/config:/verdaccio/conf <span class="token punctuation">\</span>
<span class="token parameter variable">-v</span> /www/wwwroot/nginx/html/verdaccio/plugins:/verdaccio/plugins <span class="token punctuation">\</span>
<span class="token parameter variable">-d</span> verdaccio/verdaccio<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>
<p>配置nginx的反向代理conf注意所在的docker网络使用<code>container_name</code></p>
<pre class="line-numbers language-conf" data-language="conf"><code class="language-conf">server &#123;
# listen 80;
listen 443 ssl;
server_name npm.mozzie.cn;
ssl_certificate &#x2F;etc&#x2F;nginx&#x2F;ssl&#x2F;npm.mozzie.cn_bundle.pem;
ssl_certificate_key &#x2F;etc&#x2F;nginx&#x2F;ssl&#x2F;npm.mozzie.cn.key;
gzip on;
location &#x2F; &#123;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_set_header X-NginX-Proxy true;
proxy_pass http:&#x2F;&#x2F;verdaccio:4873&#x2F;;
proxy_redirect off;
&#125;
&#125;<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>
<p>运行添加用户,报错,因为 <code>htpasswd</code>默认创建在宿主机,也就是上面挂载的<code>/www/wwwroot/nginx/html/verdaccio/storage</code>目录中</p>
<pre class="line-numbers language-bash" data-language="bash"><code class="language-bash"><span class="token function">npm</span> adduser <span class="token parameter variable">--registry</span> https://npm.mozzie.cn/<span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre>
<p>配置<code>htpasswd</code><code>storage</code> 文件夹权限</p>
<pre class="line-numbers language-bash" data-language="bash"><code class="language-bash"><span class="token comment"># 宿主机中执行</span>
<span class="token builtin class-name">cd</span> /www/wwwroot/nginx/html/verdaccio/storage
<span class="token function">touch</span> htpasswd
<span class="token function">sudo</span> <span class="token function">chown</span> <span class="token number">10001</span>:65533 htpasswd
<span class="token function">sudo</span> <span class="token function">chown</span> <span class="token parameter variable">-R</span> <span class="token number">10001</span>:65533 /www/wwwroot/nginx/html/verdaccio/storage<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span></span></code></pre>
<h1 id="verdaccio-用户管理"><a href="#verdaccio-用户管理" class="headerlink" title="verdaccio 用户管理"></a>verdaccio 用户管理</h1><p>由于在 <code>config.yml</code> 中关闭了可访问权限</p>
<pre class="line-numbers language-yaml" data-language="yaml"><code class="language-yaml"><span class="token key atrule">auth</span><span class="token punctuation">:</span>
<span class="token key atrule">htpasswd</span><span class="token punctuation">:</span>
<span class="token key atrule">file</span><span class="token punctuation">:</span> /verdaccio/storage/htpasswd
<span class="token comment"># 关闭注册手动添加用户默认Bcrypt算法</span>
<span class="token key atrule">max_users</span><span class="token punctuation">:</span> <span class="token number">-1</span>
<span class="token key atrule">packages</span><span class="token punctuation">:</span>
<span class="token key atrule">"@*/*"</span><span class="token punctuation">:</span>
<span class="token comment"># 可访问权限web界面看不见不登陆也无法 install 包</span>
<span class="token key atrule">access</span><span class="token punctuation">:</span> $authenticated <span class="token comment"># $all</span>
<span class="token comment"># 发布权限, $authenticated 表示只有通过验证的人</span>
<span class="token key atrule">publish</span><span class="token punctuation">:</span> $authenticated
<span class="token comment"># 可取消发布权限</span>
<span class="token key atrule">unpublish</span><span class="token punctuation">:</span> $authenticated
<span class="token key atrule">"**"</span><span class="token punctuation">:</span>
<span class="token key atrule">access</span><span class="token punctuation">:</span> $authenticated
<span class="token key atrule">publish</span><span class="token punctuation">:</span> $authenticated
<span class="token key atrule">unpublish</span><span class="token punctuation">:</span> $authenticated<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>
<p>默认的 <code>addUser</code> 策略是 <code>Bcrypt</code> 生成密码,随便找个网页生成个密码,使用<code>账号:密码</code>添加到 <code>htpasswd</code> 文件中,例如 </p>
<pre class="line-numbers language-bash" data-language="bash"><code class="language-bash">test:<span class="token variable">$2a</span><span class="token variable">$10</span><span class="token variable">$0xPGVnpcdxcfmFxtWyWDx</span>./TRtm/W/gSzib/jck3w.sF9x.Ur8t8W<span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre>
<p>因此在实际开发中,管理员手动给用户创建好账号,然后根据用户的包管理工具,进行登录,例如以 <code>npm</code> 为例</p>
<pre class="line-numbers language-bash" data-language="bash"><code class="language-bash"><span class="token function">npm</span> adduser <span class="token parameter variable">--registry</span> https://npm.mozzie.cn/
<span class="token comment"># 输入 Username: mozzie | Password: xxx | Email: (this IS public) himozzie@foxmail.com</span>
<span class="token comment"># 提示登陆成功 Logged in as mozzie on https://npm.mozzie.cn/.</span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span></span></code></pre>
<p>在系统的 <code>cat ~/.npmrc</code> 中会增加一行,就可以正常的进行以来的安装了</p>
<pre class="line-numbers language-bash" data-language="bash"><code class="language-bash">//npm.mozzie.cn/:_authToken<span class="token operator">=</span><span class="token string">"Do/wrh5QzsnYaNU4x3ZlVA=="</span><span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre>
<h1 id="项目-npmrc-Scope区分"><a href="#项目-npmrc-Scope区分" class="headerlink" title="项目 .npmrc Scope区分"></a>项目 .npmrc Scope区分</h1><p>需要指定 <code>.npmrc</code> 来区别 <code>Scope</code> 的安装地址,例如一个包名为 <code>@mozzie/hook</code>,对应的私库为 <code>https://npm.mozzie.cn/</code></p>
<pre class="line-numbers language-bash" data-language="bash"><code class="language-bash"><span class="token assign-left variable">registry</span><span class="token operator">=</span>http://registry.npm.taobao.org/
@mozzie:registry<span class="token operator">=</span>https://npm.mozzie.cn
<span class="token comment"># npm拉包的校验</span>
//https://npm.mozzie.cn/:_authToken<span class="token operator">=</span>xxxxxxxxxxxxx<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span></span></code></pre></article>
<link rel="stylesheet" href="/css/ccbcde32.css">
<div class="copyright">
<a target="_blank" href="https://mozzie.cn/2023/10/20/front-end/verdaccio/">
<span>Post Url</span>
<span>https://mozzie.cn/2023/10/20/front-end/verdaccio/</span>
</a>
<ul>
<li>
<span>Author</span>
<p> Mozzie</p>
</li>
<li>
<span>Published on</span>
<p>2023-10-20</p>
</li>
<li>
<span>License</span>
<p><a target="_blank" rel="noopener" href="https://creativecommons.org/licenses/by-nc-sa/4.0/">CC BY-NC-SA 4.0</a></p>
</li>
</ul>
</div>
<script src="/js/31d6cfe0.js"></script>
<!-- 评论 -->
<div id="vcomments"></div>
</div>
</main>
</div>
<div class="meta-container">
<div class="toc-wrapper content-dialog">
<p class="catalog">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24">
<g fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M4 6h16"></path>
<path d="M4 12h16"></path>
<path d="M4 18h12"></path>
</g>
</svg>
<span>Catalog</span>
</p>
<!-- 文章toc -->
<ol class="toc"><li class="toc-item toc-level-1"><a class="toc-link" href="#%E4%BD%BF%E7%94%A8-docker-%E6%90%AD%E5%BB%BA-verdaccio"><span class="toc-number">1.</span> <span class="toc-text">使用 docker 搭建 verdaccio</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#verdaccio-%E7%94%A8%E6%88%B7%E7%AE%A1%E7%90%86"><span class="toc-number">2.</span> <span class="toc-text">verdaccio 用户管理</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#%E9%A1%B9%E7%9B%AE-npmrc-Scope%E5%8C%BA%E5%88%86"><span class="toc-number">3.</span> <span class="toc-text">项目 .npmrc Scope区分</span></a></li></ol>
</div>
</div>
</div>
<script>
window.katex = {
enable: "true",
jsCdn: "//cdn.jsdelivr.net/npm/katex@0.13.18/dist/katex.min.js",
cssCdn: "//cdn.jsdelivr.net/npm/katex@0.13.18/dist/katex.min.css"
}
window.mermaid = {
enable: "true",
cdn: "//cdn.jsdelivr.net/npm/mermaid@10.4.0/dist/mermaid.min.js",
}
window.valine = {
enable: "true",
appId: 'TisMit6uhflounFqAN3ZGjgq-MdYXbMMI',
appKey: 'CdjirjYdz07U5i62ElsJvXUh',
avatar: 'monsterid',
cdn: '//unpkg.com/valine@latest/dist/Valine.min.js',
serverURLs: '//tismit6u.api.lncldglobal.com'
};
</script>
<script src="/js/96ea39da.js"></script>
</main>
</body>
<script>
window.i18n = {
"tip-collapse": "Collapse",
"tip-expand": "Expand",
"text-select": "select",
"text-move": "movement",
"text-esc": "close",
"tip-status-done": "Done",
"tip-status-doing": "In Progress",
"tip-status-todo": "Todo",
"tip-status-other": "Duplicate",
"tip-status-default": "Default",
"text-search": "Search..."
}
</script>
<script src="/js/85d1c72e.js"></script>
</html>

View File

@ -132,7 +132,7 @@
<li class=""> <li class="">
<a href="/categories/Hexo/"> <a href="/categories/Hexo/">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><path d="M9 16h6v2H9zm4-7h-2v2H9v2h2v2h2v-2h2v-2h-2z" fill="currentColor"></path><path d="M12 2c-5.33 4.55-8 8.48-8 11.8c0 4.98 3.8 8.2 8 8.2s8-3.22 8-8.2c0-3.32-2.67-7.25-8-11.8zm0 18c-3.35 0-6-2.57-6-6.2c0-2.34 1.95-5.44 6-9.14c4.05 3.7 6 6.79 6 9.14c0 3.63-2.65 6.2-6 6.2z" fill="currentColor"></path></svg> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 17v1a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-1"></path><path d="M8 16h8"></path><path d="M8.322 12.582l7.956.836"></path><path d="M8.787 9.168l7.826 1.664"></path><path d="M10.096 5.764l7.608 2.472"></path></g></svg>
<div class="ellipsis"> <div class="ellipsis">
<span> <span>
Hexo Hexo
@ -141,6 +141,17 @@
</a> </a>
</li> </li>
<li class="">
<a href="/categories/Front-End/">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20 4l-2 14.5l-6 2l-6-2L4 4z"></path><path d="M7.5 8h3v8l-2-1"></path><path d="M16.5 8H14a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h1.423a.5.5 0 0 1 .495.57L15.5 15.5l-2 .5"></path></g></svg>
<div class="ellipsis">
<span>
Front-End
</span>
</div>
</a>
</li>
</ul> </ul>
</section> </section>
@ -230,17 +241,21 @@ Configurationcontinued…😁
</li> </li>
<li> <li>
<a class="timeline-item" href="/2023/10/20/hello-world/"> <a class="timeline-item" href="/2023/10/20/front-end/verdaccio/">
<div class="timeline-info"> <div class="timeline-info">
<span>10-20 09:05:10</span> <span>10-20 10:25:55</span>
</div> </div>
<div class="timeline-marker"></div> <div class="timeline-marker"></div>
<div class="timeline-content"> <div class="timeline-content">
<div class="timeline-title"> <div class="timeline-title">
<span>Hello World</span> <span class="icon status tip right" data-tip="Done"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="9"></circle><path d="M9 12l2 2l4-4"></path></g></svg></span>
<span>verdaccio 搭建 npm私库</span>
</div> </div>
<p>Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any pro...</p> <p>使用 docker 搭建 verdaccio创建 &amp;amp; 配置config.yaml文件
# Read about the best practices
# https://verdaccio.o...</p>
</div> </div>
</a> </a>
</li> </li>

View File

@ -132,7 +132,7 @@
<li class=""> <li class="">
<a href="/categories/Hexo/"> <a href="/categories/Hexo/">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><path d="M9 16h6v2H9zm4-7h-2v2H9v2h2v2h2v-2h2v-2h-2z" fill="currentColor"></path><path d="M12 2c-5.33 4.55-8 8.48-8 11.8c0 4.98 3.8 8.2 8 8.2s8-3.22 8-8.2c0-3.32-2.67-7.25-8-11.8zm0 18c-3.35 0-6-2.57-6-6.2c0-2.34 1.95-5.44 6-9.14c4.05 3.7 6 6.79 6 9.14c0 3.63-2.65 6.2-6 6.2z" fill="currentColor"></path></svg> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 17v1a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-1"></path><path d="M8 16h8"></path><path d="M8.322 12.582l7.956.836"></path><path d="M8.787 9.168l7.826 1.664"></path><path d="M10.096 5.764l7.608 2.472"></path></g></svg>
<div class="ellipsis"> <div class="ellipsis">
<span> <span>
Hexo Hexo
@ -141,6 +141,17 @@
</a> </a>
</li> </li>
<li class="">
<a href="/categories/Front-End/">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20 4l-2 14.5l-6 2l-6-2L4 4z"></path><path d="M7.5 8h3v8l-2-1"></path><path d="M16.5 8H14a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h1.423a.5.5 0 0 1 .495.57L15.5 15.5l-2 .5"></path></g></svg>
<div class="ellipsis">
<span>
Front-End
</span>
</div>
</a>
</li>
</ul> </ul>
</section> </section>
@ -230,17 +241,21 @@ Configurationcontinued…😁
</li> </li>
<li> <li>
<a class="timeline-item" href="/2023/10/20/hello-world/"> <a class="timeline-item" href="/2023/10/20/front-end/verdaccio/">
<div class="timeline-info"> <div class="timeline-info">
<span>10-20 09:05:10</span> <span>10-20 10:25:55</span>
</div> </div>
<div class="timeline-marker"></div> <div class="timeline-marker"></div>
<div class="timeline-content"> <div class="timeline-content">
<div class="timeline-title"> <div class="timeline-title">
<span>Hello World</span> <span class="icon status tip right" data-tip="Done"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="9"></circle><path d="M9 12l2 2l4-4"></path></g></svg></span>
<span>verdaccio 搭建 npm私库</span>
</div> </div>
<p>Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any pro...</p> <p>使用 docker 搭建 verdaccio创建 &amp;amp; 配置config.yaml文件
# Read about the best practices
# https://verdaccio.o...</p>
</div> </div>
</a> </a>
</li> </li>

View File

@ -132,7 +132,7 @@
<li class=""> <li class="">
<a href="/categories/Hexo/"> <a href="/categories/Hexo/">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><path d="M9 16h6v2H9zm4-7h-2v2H9v2h2v2h2v-2h2v-2h-2z" fill="currentColor"></path><path d="M12 2c-5.33 4.55-8 8.48-8 11.8c0 4.98 3.8 8.2 8 8.2s8-3.22 8-8.2c0-3.32-2.67-7.25-8-11.8zm0 18c-3.35 0-6-2.57-6-6.2c0-2.34 1.95-5.44 6-9.14c4.05 3.7 6 6.79 6 9.14c0 3.63-2.65 6.2-6 6.2z" fill="currentColor"></path></svg> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 17v1a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-1"></path><path d="M8 16h8"></path><path d="M8.322 12.582l7.956.836"></path><path d="M8.787 9.168l7.826 1.664"></path><path d="M10.096 5.764l7.608 2.472"></path></g></svg>
<div class="ellipsis"> <div class="ellipsis">
<span> <span>
Hexo Hexo
@ -141,6 +141,17 @@
</a> </a>
</li> </li>
<li class="">
<a href="/categories/Front-End/">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20 4l-2 14.5l-6 2l-6-2L4 4z"></path><path d="M7.5 8h3v8l-2-1"></path><path d="M16.5 8H14a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h1.423a.5.5 0 0 1 .495.57L15.5 15.5l-2 .5"></path></g></svg>
<div class="ellipsis">
<span>
Front-End
</span>
</div>
</a>
</li>
</ul> </ul>
</section> </section>
@ -230,17 +241,21 @@ Configurationcontinued…😁
</li> </li>
<li> <li>
<a class="timeline-item" href="/2023/10/20/hello-world/"> <a class="timeline-item" href="/2023/10/20/front-end/verdaccio/">
<div class="timeline-info"> <div class="timeline-info">
<span>10-20 09:05:10</span> <span>10-20 10:25:55</span>
</div> </div>
<div class="timeline-marker"></div> <div class="timeline-marker"></div>
<div class="timeline-content"> <div class="timeline-content">
<div class="timeline-title"> <div class="timeline-title">
<span>Hello World</span> <span class="icon status tip right" data-tip="Done"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="9"></circle><path d="M9 12l2 2l4-4"></path></g></svg></span>
<span>verdaccio 搭建 npm私库</span>
</div> </div>
<p>Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any pro...</p> <p>使用 docker 搭建 verdaccio创建 &amp;amp; 配置config.yaml文件
# Read about the best practices
# https://verdaccio.o...</p>
</div> </div>
</a> </a>
</li> </li>

View File

@ -5,12 +5,12 @@
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title> <title>
Hello World 17px blog
</title> </title>
<meta name="description" content=""> <meta name="description" content="">
<meta name="keywords" content=""> <meta name="keywords" content="">
<meta name="author" content="Mozzie"> <meta name="author" content="Mozzie">
<link rel="canonical" href="https://mozzie.cn/2023/10/20/hello-world/"> <link rel="canonical" href="https://mozzie.cn">
<link rel="icon" type="image/svg" href='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M16 7h1a2 2 0 0 1 2 2v.5a.5.5 0 0 0 .5.5a.5.5 0 0 1 .5.5v3a.5.5 0 0 1-.5.5a.5.5 0 0 0-.5.5v.5a2 2 0 0 1-2 2h-2"></path><path d="M8 7H6a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h1"></path><path d="M12 8l-2 4h3l-2 4"></path></g></svg>'> <link rel="icon" type="image/svg" href='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M16 7h1a2 2 0 0 1 2 2v.5a.5.5 0 0 0 .5.5a.5.5 0 0 1 .5.5v3a.5.5 0 0 1-.5.5a.5.5 0 0 0-.5.5v.5a2 2 0 0 1-2 2h-2"></path><path d="M8 7H6a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h1"></path><path d="M12 8l-2 4h3l-2 4"></path></g></svg>'>
@ -132,7 +132,7 @@
<li class=""> <li class="">
<a href="/categories/Hexo/"> <a href="/categories/Hexo/">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><path d="M9 16h6v2H9zm4-7h-2v2H9v2h2v2h2v-2h2v-2h-2z" fill="currentColor"></path><path d="M12 2c-5.33 4.55-8 8.48-8 11.8c0 4.98 3.8 8.2 8 8.2s8-3.22 8-8.2c0-3.32-2.67-7.25-8-11.8zm0 18c-3.35 0-6-2.57-6-6.2c0-2.34 1.95-5.44 6-9.14c4.05 3.7 6 6.79 6 9.14c0 3.63-2.65 6.2-6 6.2z" fill="currentColor"></path></svg> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 17v1a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-1"></path><path d="M8 16h8"></path><path d="M8.322 12.582l7.956.836"></path><path d="M8.787 9.168l7.826 1.664"></path><path d="M10.096 5.764l7.608 2.472"></path></g></svg>
<div class="ellipsis"> <div class="ellipsis">
<span> <span>
Hexo Hexo
@ -141,6 +141,17 @@
</a> </a>
</li> </li>
<li class="active">
<a href="/categories/Front-End/">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20 4l-2 14.5l-6 2l-6-2L4 4z"></path><path d="M7.5 8h3v8l-2-1"></path><path d="M16.5 8H14a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h1.423a.5.5 0 0 1 .495.57L15.5 15.5l-2 .5"></path></g></svg>
<div class="ellipsis">
<span>
Front-End
</span>
</div>
</a>
</li>
</ul> </ul>
</section> </section>
@ -157,12 +168,14 @@
</aside> </aside>
<main> <main>
<link rel="stylesheet" href="/css/7c527814.css"> <link rel="stylesheet" href="/css/2cd7dba2.css">
<div class="post-container">
<div class="content">
<div class="category">
<header> <header>
<div>
<link rel="stylesheet" href="/css/de5de8fb.css"> <link rel="stylesheet" href="/css/de5de8fb.css">
@ -173,7 +186,6 @@
</svg> </svg>
</a> </a>
<em> <em>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 20 20"> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 20 20">
<g fill="none"> <g fill="none">
@ -182,109 +194,63 @@
</svg> </svg>
</em> </em>
<span class="ellipsis"> <span class="ellipsis">
Hello World Front-End
</span> </span>
</nav> </nav>
<script src="/js/31d6cfe0.js"></script> <script src="/js/31d6cfe0.js"></script>
</div>
<section></section>
</header> </header>
<main class="scrollbar-obtrusive">
<div class="article-container">
<!-- 文章tags -->
<!-- 渲染文章内容 --> <!-- 快速操作 -->
<article><p>Welcome to <a target="_blank" rel="noopener" href="https://hexo.io/">Hexo</a>! This is your very first post. Check <a target="_blank" rel="noopener" href="https://hexo.io/docs/">documentation</a> for more info. If you get any problems when using Hexo, you can find the answer in <a target="_blank" rel="noopener" href="https://hexo.io/docs/troubleshooting.html">troubleshooting</a> or you can ask me on <a target="_blank" rel="noopener" href="https://github.com/hexojs/hexo/issues">GitHub</a>.</p> <div class="spotlight">
<h2 id="Quick-Start"><a href="#Quick-Start" class="headerlink" title="Quick Start"></a>Quick Start</h2><h3 id="Create-a-new-post"><a href="#Create-a-new-post" class="headerlink" title="Create a new post"></a>Create a new post</h3><pre class="line-numbers language-bash" data-language="bash"><code class="language-bash">$ hexo new <span class="token string">"My New Post"</span><span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre> <!-- 筛选 -->
<a class="filter tip" data-tip="Status Filter" id="filter-button">
<p>More info: <a target="_blank" rel="noopener" href="https://hexo.io/docs/writing.html">Writing</a></p>
<h3 id="Run-server"><a href="#Run-server" class="headerlink" title="Run server"></a>Run server</h3><pre class="line-numbers language-bash" data-language="bash"><code class="language-bash">$ hexo server<span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre>
<p>More info: <a target="_blank" rel="noopener" href="https://hexo.io/docs/server.html">Server</a></p>
<h3 id="Generate-static-files"><a href="#Generate-static-files" class="headerlink" title="Generate static files"></a>Generate static files</h3><pre class="line-numbers language-bash" data-language="bash"><code class="language-bash">$ hexo generate<span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre>
<p>More info: <a target="_blank" rel="noopener" href="https://hexo.io/docs/generating.html">Generating</a></p>
<h3 id="Deploy-to-remote-sites"><a href="#Deploy-to-remote-sites" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><pre class="line-numbers language-bash" data-language="bash"><code class="language-bash">$ hexo deploy<span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre>
<p>More info: <a target="_blank" rel="noopener" href="https://hexo.io/docs/one-command-deployment.html">Deployment</a></p>
</article>
<link rel="stylesheet" href="/css/ccbcde32.css">
<div class="copyright">
<a target="_blank" href="https://mozzie.cn/2023/10/20/hello-world/">
<span>Post Url</span>
<span>https://mozzie.cn/2023/10/20/hello-world/</span>
</a>
<ul>
<li>
<span>Author</span>
<p> Mozzie</p>
</li>
<li>
<span>Published on</span>
<p>2023-10-20</p>
</li>
<li>
<span>License</span>
<p><a target="_blank" rel="noopener" href="https://creativecommons.org/licenses/by-nc-sa/4.0/">CC BY-NC-SA 4.0</a></p>
</li>
</ul>
</div>
<script src="/js/31d6cfe0.js"></script>
<!-- 评论 -->
<div id="vcomments"></div>
</div>
</main>
</div>
<div class="meta-container">
<div class="toc-wrapper content-dialog">
<p class="catalog">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24">
<g fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="M5.5 5h13a1 1 0 0 1 .5 1.5L14 12v7l-4-3v-4L5 6.5A1 1 0 0 1 5.5 5" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
<path d="M4 6h16"></path>
<path d="M4 12h16"></path>
<path d="M4 18h12"></path>
</g>
</svg> </svg>
<span>Catalog</span> </a>
<!-- 当前文章数量 -->
<span class="post-num">Total of 1 Posts</span>
<!-- 分页代码 -->
<section class="pagination">
</section>
</div>
<!-- 分类文章列表 -->
<ul class="table scrollbar-obtrusive">
<li data-status="done">
<a href="/2023/10/20/front-end/verdaccio/">
<span class="icon status tip right" data-tip="Done"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="9"></circle><path d="M9 12l2 2l4-4"></path></g></svg></span>
<p class="ellipsis">
<span>verdaccio 搭建 npm私库</span>
</p> </p>
<!-- 文章toc --> <span class="post-date">
<ol class="toc"><li class="toc-item toc-level-2"><a class="toc-link" href="#Quick-Start"><span class="toc-number">1.</span> <span class="toc-text">Quick Start</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#Create-a-new-post"><span class="toc-number">1.1.</span> <span class="toc-text">Create a new post</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#Run-server"><span class="toc-number">1.2.</span> <span class="toc-text">Run server</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#Generate-static-files"><span class="toc-number">1.3.</span> <span class="toc-text">Generate static files</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#Deploy-to-remote-sites"><span class="toc-number">1.4.</span> <span class="toc-text">Deploy to remote sites</span></a></li></ol></li></ol> <b>
</div> 10 20
</div> </b>
<em>/ 2023</em>
</span>
</a>
</li>
</ul>
</div> </div>
<script>
window.katex = {
enable: "true",
jsCdn: "//cdn.jsdelivr.net/npm/katex@0.13.18/dist/katex.min.js",
cssCdn: "//cdn.jsdelivr.net/npm/katex@0.13.18/dist/katex.min.css"
}
window.mermaid = {
enable: "true",
cdn: "//cdn.jsdelivr.net/npm/mermaid@10.4.0/dist/mermaid.min.js",
}
window.valine = {
enable: "true",
appId: 'TisMit6uhflounFqAN3ZGjgq-MdYXbMMI',
appKey: 'CdjirjYdz07U5i62ElsJvXUh',
avatar: 'monsterid',
cdn: '//unpkg.com/valine@latest/dist/Valine.min.js',
serverURLs: '//tismit6u.api.lncldglobal.com'
};
</script>
<script src="/js/430dbbd6.js"></script>
<script src="/js/96ea39da.js"></script>
</main> </main>
</body> </body>

View File

@ -132,7 +132,7 @@
<li class="active"> <li class="active">
<a href="/categories/Hexo/"> <a href="/categories/Hexo/">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><path d="M9 16h6v2H9zm4-7h-2v2H9v2h2v2h2v-2h2v-2h-2z" fill="currentColor"></path><path d="M12 2c-5.33 4.55-8 8.48-8 11.8c0 4.98 3.8 8.2 8 8.2s8-3.22 8-8.2c0-3.32-2.67-7.25-8-11.8zm0 18c-3.35 0-6-2.57-6-6.2c0-2.34 1.95-5.44 6-9.14c4.05 3.7 6 6.79 6 9.14c0 3.63-2.65 6.2-6 6.2z" fill="currentColor"></path></svg> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 17v1a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-1"></path><path d="M8 16h8"></path><path d="M8.322 12.582l7.956.836"></path><path d="M8.787 9.168l7.826 1.664"></path><path d="M10.096 5.764l7.608 2.472"></path></g></svg>
<div class="ellipsis"> <div class="ellipsis">
<span> <span>
Hexo Hexo
@ -141,6 +141,17 @@
</a> </a>
</li> </li>
<li class="">
<a href="/categories/Front-End/">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20 4l-2 14.5l-6 2l-6-2L4 4z"></path><path d="M7.5 8h3v8l-2-1"></path><path d="M16.5 8H14a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h1.423a.5.5 0 0 1 .495.57L15.5 15.5l-2 .5"></path></g></svg>
<div class="ellipsis">
<span>
Front-End
</span>
</div>
</a>
</li>
</ul> </ul>
</section> </section>

View File

@ -132,7 +132,7 @@
<li class=""> <li class="">
<a href="/categories/Hexo/"> <a href="/categories/Hexo/">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><path d="M9 16h6v2H9zm4-7h-2v2H9v2h2v2h2v-2h2v-2h-2z" fill="currentColor"></path><path d="M12 2c-5.33 4.55-8 8.48-8 11.8c0 4.98 3.8 8.2 8 8.2s8-3.22 8-8.2c0-3.32-2.67-7.25-8-11.8zm0 18c-3.35 0-6-2.57-6-6.2c0-2.34 1.95-5.44 6-9.14c4.05 3.7 6 6.79 6 9.14c0 3.63-2.65 6.2-6 6.2z" fill="currentColor"></path></svg> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 17v1a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-1"></path><path d="M8 16h8"></path><path d="M8.322 12.582l7.956.836"></path><path d="M8.787 9.168l7.826 1.664"></path><path d="M10.096 5.764l7.608 2.472"></path></g></svg>
<div class="ellipsis"> <div class="ellipsis">
<span> <span>
Hexo Hexo
@ -141,6 +141,17 @@
</a> </a>
</li> </li>
<li class="">
<a href="/categories/Front-End/">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20 4l-2 14.5l-6 2l-6-2L4 4z"></path><path d="M7.5 8h3v8l-2-1"></path><path d="M16.5 8H14a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h1.423a.5.5 0 0 1 .495.57L15.5 15.5l-2 .5"></path></g></svg>
<div class="ellipsis">
<span>
Front-End
</span>
</div>
</a>
</li>
</ul> </ul>
</section> </section>

View File

@ -0,0 +1,200 @@
---
title: verdaccio 搭建 npm私库
categories:
- Front-End
status: done
---
# 使用 docker 搭建 verdaccio
创建 & 配置`config.yaml`文件
```yaml
# Read about the best practices
# https://verdaccio.org/docs/best
# path to a directory with all packages
storage: /verdaccio/storage/data
# path to a directory with plugins to include
plugins: /verdaccio/plugins
# 包体积上限默认10mb
max_body_size: 1024mb
web:
enable: true
title: Mozzie-NPM
# gravatar: false
# login: true
pkgManagers:
- npm
- yarn
- pnpm
html_cache: true
showFooter: false
auth:
htpasswd:
file: /verdaccio/storage/htpasswd
# 关闭注册手动添加用户默认Bcrypt算法随便找个网页生成个密码使用账号:密码添加到 htpasswd 文件中,例如 test:$2a$10$0xPGVnpcdxcfmFxtWyWDx./TRtm/W/gSzib/jck3w.sF9x.Ur8t8W
max_users: -1
i18n:
web: zh-CN
# notify: # 配置 Webhook 推送到钉钉,记得修改 access_token 和 atMobiles
# method: POST
# headers: [{ "Content-Type": "application/json" }]
# endpoint: https://oapi.dingtalk.com/robot/send?access_token=xxxx
# content: '{"msgtype":"text", "at": {"atMobiles": ["13000000000"] }, "text":{"content":"NPM 发布新包:\n > 包名称:{{name}} \n > 版本号:{{#each versions}}{{version}}{{/each}} \n > 发布者:{{publisher.name}} "}}'
uplinks:
npmjs:
url: https://registry.npmjs.org/
yarn:
url: https://registry.yarnpkg.com/
timeout: 10s
taobao:
url: https://registry.npmmirror.com/
timeout: 10s
packages:
"@*/*":
# 可访问权限web界面看不见不登陆也无法 install 包
access: $authenticated # $all
# 发布权限, $authenticated 表示只有通过验证的人
publish: $authenticated
# 可取消发布权限
unpublish: $authenticated
# 包不存在时的代理
proxy: npmjs yarn taobao
"**":
access: $authenticated # $all
publish: $authenticated
unpublish: $authenticated
proxy: npmjs yarn taobao
middlewares:
audit:
enabled: true
listen: 0.0.0.0:4873
log: { type: stdout, format: pretty, level: http }
```
创建容器,环境变量,`VERDACCIO_PUBLIC_URL`是静态资源的前缀地址由于nginx挂了`ssl`,如果使用`http`可以不添加
```bash
docker run \
-p 4873:4873 \
--restart=always \
--network mozzie.cn-net \
--network-alias verdaccio \
--env VERDACCIO_PORT=4873 \
--env VERDACCIO_PUBLIC_URL=https://npm.mozzie.cn \
--ip 172.21.0.196 \
--name verdaccio \
-v /www/wwwroot/nginx/html/verdaccio/storage:/verdaccio/storage \
-v /www/wwwroot/nginx/html/verdaccio/config:/verdaccio/conf \
-v /www/wwwroot/nginx/html/verdaccio/plugins:/verdaccio/plugins \
-d verdaccio/verdaccio
```
配置nginx的反向代理conf注意所在的docker网络使用`container_name`
```conf
server {
# listen 80;
listen 443 ssl;
server_name npm.mozzie.cn;
ssl_certificate /etc/nginx/ssl/npm.mozzie.cn_bundle.pem;
ssl_certificate_key /etc/nginx/ssl/npm.mozzie.cn.key;
gzip on;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_set_header X-NginX-Proxy true;
proxy_pass http://verdaccio:4873/;
proxy_redirect off;
}
}
```
运行添加用户,报错,因为 `htpasswd`默认创建在宿主机,也就是上面挂载的`/www/wwwroot/nginx/html/verdaccio/storage`目录中
```bash
npm adduser --registry https://npm.mozzie.cn/
```
配置`htpasswd`、`storage` 文件夹权限
```bash
# 宿主机中执行
cd /www/wwwroot/nginx/html/verdaccio/storage
touch htpasswd
sudo chown 10001:65533 htpasswd
sudo chown -R 10001:65533 /www/wwwroot/nginx/html/verdaccio/storage
```
# verdaccio 用户管理
由于在 `config.yml` 中关闭了可访问权限
```yaml
auth:
htpasswd:
file: /verdaccio/storage/htpasswd
# 关闭注册手动添加用户默认Bcrypt算法
max_users: -1
packages:
"@*/*":
# 可访问权限web界面看不见不登陆也无法 install 包
access: $authenticated # $all
# 发布权限, $authenticated 表示只有通过验证的人
publish: $authenticated
# 可取消发布权限
unpublish: $authenticated
"**":
access: $authenticated
publish: $authenticated
unpublish: $authenticated
```
默认的 `addUser` 策略是 `Bcrypt` 生成密码,随便找个网页生成个密码,使用`账号:密码`添加到 `htpasswd` 文件中,例如
```bash
test:$2a$10$0xPGVnpcdxcfmFxtWyWDx./TRtm/W/gSzib/jck3w.sF9x.Ur8t8W
```
因此在实际开发中,管理员手动给用户创建好账号,然后根据用户的包管理工具,进行登录,例如以 `npm` 为例
```bash
npm adduser --registry https://npm.mozzie.cn/
# 输入 Username: mozzie | Password: xxx | Email: (this IS public) himozzie@foxmail.com
# 提示登陆成功 Logged in as mozzie on https://npm.mozzie.cn/.
```
在系统的 `cat ~/.npmrc` 中会增加一行,就可以正常的进行以来的安装了
```bash
//npm.mozzie.cn/:_authToken="Do/wrh5QzsnYaNU4x3ZlVA=="
```
# 项目 .npmrc Scope区分
需要指定 `.npmrc` 来区别 `Scope` 的安装地址,例如一个包名为 `@mozzie/hook`,对应的私库为 `https://npm.mozzie.cn/`
```bash
registry=http://registry.npm.taobao.org/
@mozzie:registry=https://npm.mozzie.cn
# npm拉包的校验
//https://npm.mozzie.cn/:_authToken=xxxxxxxxxxxxx
```

View File

@ -1,38 +0,0 @@
---
title: Hello World
---
Welcome to [Hexo](https://hexo.io/)! This is your very first post. Check [documentation](https://hexo.io/docs/) for more info. If you get any problems when using Hexo, you can find the answer in [troubleshooting](https://hexo.io/docs/troubleshooting.html) or you can ask me on [GitHub](https://github.com/hexojs/hexo/issues).
## Quick Start
### Create a new post
``` bash
$ hexo new "My New Post"
```
More info: [Writing](https://hexo.io/docs/writing.html)
### Run server
``` bash
$ hexo server
```
More info: [Server](https://hexo.io/docs/server.html)
### Generate static files
``` bash
$ hexo generate
```
More info: [Generating](https://hexo.io/docs/generating.html)
### Deploy to remote sites
``` bash
$ hexo deploy
```
More info: [Deployment](https://hexo.io/docs/one-command-deployment.html)

View File

@ -14,9 +14,10 @@ postCopyright:
# post classification icon mapping # post classification icon mapping
postCategoryIcons: postCategoryIcons:
- <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><path d="M9 16h6v2H9zm4-7h-2v2H9v2h2v2h2v-2h2v-2h-2z" fill="currentColor"></path><path d="M12 2c-5.33 4.55-8 8.48-8 11.8c0 4.98 3.8 8.2 8 8.2s8-3.22 8-8.2c0-3.32-2.67-7.25-8-11.8zm0 18c-3.35 0-6-2.57-6-6.2c0-2.34 1.95-5.44 6-9.14c4.05 3.7 6 6.79 6 9.14c0 3.63-2.65 6.2-6 6.2z" fill="currentColor"></path></svg> - <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 17v1a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-1"></path><path d="M8 16h8"></path><path d="M8.322 12.582l7.956.836"></path><path d="M8.787 9.168l7.826 1.664"></path><path d="M10.096 5.764l7.608 2.472"></path></g></svg>
- <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 32 32"><path d="M28 22h2v8h-2z" fill="currentColor"></path><path d="M24 18h2v12h-2z" fill="currentColor"></path><path d="M20 26h2v4h-2z" fill="currentColor"></path><path d="M9 16a7 7 0 1 0 7 7a7.008 7.008 0 0 0-7-7zm4.899 6H10v-3.899A5.014 5.014 0 0 1 13.899 22zM9 28a5 5 0 0 1-1-9.899V22a2 2 0 0 0 2 2h3.899A5.008 5.008 0 0 1 9 28z" fill="currentColor"></path><path d="M22.535 12l4-6H30V4h-4.535l-4 6H18V2h-2v12a2 2 0 0 0 2 2h12v-2H18v-2z" fill="currentColor"></path><circle cx="11" cy="7" r="1" fill="currentColor"></circle><circle cx="9" cy="11" r="1" fill="currentColor"></circle><circle cx="7" cy="5" r="1" fill="currentColor"></circle><circle cx="5" cy="9" r="1" fill="currentColor"></circle><circle cx="3" cy="13" r="1" fill="currentColor"></circle></svg> - <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20 4l-2 14.5l-6 2l-6-2L4 4z"></path><path d="M7.5 8h3v8l-2-1"></path><path d="M16.5 8H14a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h1.423a.5.5 0 0 1 .495.57L15.5 15.5l-2 .5"></path></g></svg>
- <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><path d="M22 11h-4.17l3.24-3.24l-1.41-1.42L15 11h-2V9l4.66-4.66l-1.42-1.41L13 6.17V2h-2v4.17L7.76 2.93L6.34 4.34L11 9v2H9L4.34 6.34L2.93 7.76L6.17 11H2v2h4.17l-3.24 3.24l1.41 1.42L9 13h2v2l-4.66 4.66l1.42 1.41L11 17.83V22h2v-4.17l3.24 3.24l1.42-1.41L13 15v-2h2l4.66 4.66l1.41-1.42L17.83 13H22z" fill="currentColor"></path></svg> - <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 12.54c-1.804-.345-2.701-1.08-3.523-2.94c-.487.696-1.102 1.568-.92 2.4c.028.238-.32 1.002-.557 1H3c0 5.208 3.164 7 6.196 7c4.124.022 7.828-1.376 9.854-5c1.146-.101 2.296-1.505 2.95-2.46z"></path><path d="M5 10h3v3H5z"></path><path d="M8 10h3v3H8z"></path><path d="M11 10h3v3h-3z"></path><path d="M8 7h3v3H8z"></path><path d="M11 7h3v3h-3z"></path><path d="M11 4h3v3h-3z"></path><path d="M4.571 18c1.5 0 2.047-.074 2.958-.78"></path><path d="M10 16v.01"></path></g></svg>
- <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 19a9 9 0 0 1 9 0a9 9 0 0 1 9 0"></path><path d="M3 6a9 9 0 0 1 9 0a9 9 0 0 1 9 0"></path><path d="M3 6v13"></path><path d="M12 6v13"></path><path d="M21 6v13"></path></g></svg>
# katex # katex
katex: katex: