Files
SCDocs/public/zh/posts/news/pangu-js/index.html
JamesFlare1212 5aeea89a31 new subtopic llm
2023-05-11 21:33:10 +08:00

309 lines
7.9 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html lang="zh" dir="ltr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="简介 # 我们给hugo-book主题注入了一个新的模组 - Pangu JS。 它的功能很简单,在中文和英文/数字字符中添加一个空格。 //输入 不能信任那些Te">
<meta name="theme-color" content="#FFFFFF">
<meta name="color-scheme" content="light dark"><meta property="og:title" content="Feat: Pangu JS" />
<meta property="og:description" content="简介 # 我们给hugo-book主题注入了一个新的模组 - Pangu JS。 它的功能很简单,在中文和英文/数字字符中添加一个空格。 //输入 不能信任那些Te" />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://academics.jamesflare.com/zh/posts/news/pangu-js/" /><meta property="article:section" content="posts" />
<meta property="article:published_time" content="2023-04-28T00:00:00+00:00" />
<meta property="article:modified_time" content="2023-05-10T17:40:38+08:00" />
<title>Feat: Pangu JS | Academic Resources</title>
<link rel="manifest" href="/manifest.json">
<link rel="icon" href="/favicon.png" type="image/x-icon">
<link rel="stylesheet" href="/book.min.f8de3645fe00591b41524aee174e19edd98a22255a2930a0cdc82a94835ba387.css" integrity="sha256-&#43;N42Rf4AWRtBUkruF04Z7dmKIiVaKTCgzcgqlINbo4c=" crossorigin="anonymous">
<script defer src="/flexsearch.min.js"></script>
<script defer src="/zh.search.min.3f34d7fccf0167107601775fa8a9c414ccabab8a6a9c508540f2ced427090add.js" integrity="sha256-PzTX/M8BZxB2AXdfqKnEFMyrq4pqnFCFQPLO1CcJCt0=" crossorigin="anonymous"></script>
<!--
Made with Book Theme
https://github.com/alex-shpak/hugo-book
-->
<link rel="stylesheet" href="https://academics.jamesflare.com/css/custom.css">
<script type="text/javascript" src="https://academics.jamesflare.com/js/custom.js"></script>
<script>pangu.spacingPage();</script>
</head>
<body dir="ltr">
<input type="checkbox" class="hidden toggle" id="menu-control" />
<input type="checkbox" class="hidden toggle" id="toc-control" />
<main class="container flex">
<aside class="book-menu">
<div class="book-menu-content">
<nav>
<h2 class="book-brand">
<a class="flex align-center" href="/zh/"><span>Academic Resources</span>
</a>
</h2>
<div class="book-search">
<input type="text" id="book-search-input" placeholder="搜索" aria-label="搜索" maxlength="64" data-hotkeys="s/" />
<div class="book-search-spinner hidden"></div>
<ul id="book-search-results"></ul>
</div>
<ul class="book-languages">
<li>
<input type="checkbox" id="languages" class="toggle" />
<label for="languages" class="flex justify-between">
<a role="button" class="flex align-center">
<img src="/svg/translate.svg" class="book-icon" alt="Languages" />
Chinese
</a>
</label>
<ul>
<li>
<a href="https://academics.jamesflare.com/">
English
</a>
</li>
</ul>
</li>
</ul>
<ul>
<li>
<p><a href="/zh/docs/%E5%AD%A6%E6%9C%AF%E8%B5%84%E6%BA%90/"><strong>学术资源</strong></a></p>
<ul>
<li><a href="/zh/docs/%E5%AD%A6%E6%9C%AF%E8%B5%84%E6%BA%90/%E5%AD%A6%E7%A7%91%E5%9C%A8%E7%BA%BF%E8%B5%84%E6%BA%90/">学科在线资源</a></li>
<li><a href="/zh/docs/%E5%AD%A6%E6%9C%AF%E8%B5%84%E6%BA%90/%E5%AD%A6%E6%9C%AF%E5%B7%A5%E5%85%B7%E9%9B%86/">学术工具集</a></li>
<li><a href="/zh/docs/%E5%AD%A6%E6%9C%AF%E8%B5%84%E6%BA%90/%E4%B8%93%E4%B8%9A%E4%B8%8E%E8%AF%BE%E5%A4%96%E8%B5%84%E6%BA%90/">专业与课外资源</a>
<br /></li>
</ul>
</li>
<li>
<p><a href="/zh/docs/%E5%85%88%E8%BF%9B%E5%B7%A5%E5%85%B7/"><strong>先进工具</strong></a></p>
<ul>
<li><a href="/zh/docs/%E5%85%88%E8%BF%9B%E5%B7%A5%E5%85%B7/llm%E7%B3%BB%E5%88%97/">LLM系列</a>
<br /></li>
</ul>
</li>
</ul>
<ul>
<li>
<a href="/zh/posts/news/" >
新闻
</a>
</li>
<li>
<a href="/zh/posts/about/" >
关于成员
</a>
</li>
</ul>
</nav>
<script>(function(){var e=document.querySelector("aside .book-menu-content");addEventListener("beforeunload",function(){localStorage.setItem("menu.scrollTop",e.scrollTop)}),e.scrollTop=localStorage.getItem("menu.scrollTop")})()</script>
</div>
</aside>
<div class="book-page">
<header class="book-header">
<div class="flex align-center justify-between">
<label for="menu-control">
<img src="/svg/menu.svg" class="book-icon" alt="Menu" />
</label>
<strong>Feat: Pangu JS</strong>
<label for="toc-control">
<img src="/svg/toc.svg" class="book-icon" alt="Table of Contents" />
</label>
</div>
<aside class="hidden clearfix">
<nav id="TableOfContents">
<ul>
<li><a href="#简介">简介</a></li>
<li><a href="#操作">操作</a></li>
</ul>
</nav>
</aside>
</header>
<article class="markdown">
<h1>
<a href="/zh/posts/news/pangu-js/">Feat: Pangu JS</a>
</h1>
<h5>April 28, 2023</h5>
<h2 id="简介">
简介
<a class="anchor" href="#%e7%ae%80%e4%bb%8b">#</a>
</h2>
<p>我们给hugo-book主题注入了一个新的模组 - Pangu JS。</p>
<p><a href="https://github.com/vinta/pangu.js/"><img src="https://github-readme-stats.jamesflare.com/api/pin/?username=vinta&amp;repo=pangu.js&amp;theme=github_dark_dimmed&amp;show_owner=true" alt="pangu.js Git Card" /></a></p>
<p>它的功能很简单,在中文和英文/数字字符中添加一个空格。</p>
<pre tabindex="0"><code>//输入
不能信任那些Terminal或Editor用白底的人
//输出
不能信任那些 Terminal 或 Editor 用白底的人
</code></pre><h2 id="操作">
操作
<a class="anchor" href="#%e6%93%8d%e4%bd%9c">#</a>
</h2>
<p>hugo-book在layouts/partials/docs/inject/目录有控制注入的文件。</p>
<p>我们在它下面创建一个body.html填入</p>
<pre tabindex="0"><code>{{- /* PanguJS */ -}}
{{- if eq .Site.Params.pangu.enable true -}}
&lt;script src=&#34;/js/pangu.min.js&#34;&gt;&lt;/script&gt;
&lt;script&gt;pangu.spacingPage();&lt;/script&gt;
{{- end -}}
</code></pre><p>接下来在static/js/下创建一个叫pangu.min.js的文件内容就是<a href="https://cdnjs.cloudflare.com/ajax/libs/pangu/4.0.7/pangu.min.js">pangu.min.js</a>本身。</p>
</article>
<footer class="book-footer">
<div class="flex flex-wrap justify-between">
<div><a class="flex align-center" href="https://github.com/JamesFlare1212/SCDocs/commit/59e7299700fc1a509369fd99880b18bcbaf5c90f" title='最后修改者 JamesFlare1212 | May 10, 2023' target="_blank" rel="noopener">
<img src="/svg/calendar.svg" class="book-icon" alt="Calendar" />
<span>May 10, 2023</span>
</a>
</div>
<div>
<a class="flex align-center" href="https://github.com/JamesFlare1212/SCDocs/edit/dev/content.zh/posts/news/pangu-js.md" target="_blank" rel="noopener">
<img src="/svg/edit.svg" class="book-icon" alt="Edit" />
<span>编辑本页</span>
</a>
</div>
</div>
<script>(function(){function e(e){const t=window.getSelection(),n=document.createRange();n.selectNodeContents(e),t.removeAllRanges(),t.addRange(n)}document.querySelectorAll("pre code").forEach(t=>{t.addEventListener("click",function(){if(window.getSelection().toString())return;e(t.parentElement),navigator.clipboard&&navigator.clipboard.writeText(t.parentElement.textContent)})})})()</script>
</footer>
<div class="book-comments">
</div>
<label for="menu-control" class="hidden book-menu-overlay"></label>
</div>
<aside class="book-toc">
<div class="book-toc-content">
<nav id="TableOfContents">
<ul>
<li><a href="#简介">简介</a></li>
<li><a href="#操作">操作</a></li>
</ul>
</nav>
</div>
</aside>
</main>
<script src="/js/pangu.min.js"></script>
<script>pangu.spacingPage();</script>
</body>
</html>