update to v0.9.1.
add npm package link prep for jsr support (I hope) add favicon update installation instructions
This commit is contained in:
@@ -4,6 +4,9 @@
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>twtxt-lib Demo</title>
|
||||
<link rel="shortcut icon" href="favicon.ico"/>
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
|
||||
<link rel="stylesheet" href="/demo/styles.css" />
|
||||
</head>
|
||||
|
||||
@@ -47,32 +50,65 @@
|
||||
<a href="/dist-browser/twtxt-lib.js">ES6+ library for the browser</a>,
|
||||
with NPM and JSR versions coming soon.
|
||||
<li>Fully typed and source-mapped.</li>
|
||||
<li><a href="https://caniuse.com/es6-module">ESM</a> (and <a href="https://antfu.me/posts/move-on-to-esm-only">ESM only</a>)</li>
|
||||
<li>Built as an <a href="https://caniuse.com/es6-module">ES6 module</a> (and <a href="https://antfu.me/posts/move-on-to-esm-only">ESM only</a>)</li>
|
||||
<li>Includes an interactive demo <em>(you're looking at it)</em>.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Installation</h2>
|
||||
|
||||
<p>
|
||||
Browser
|
||||
<ul>
|
||||
<li>Download <a href="/dist-browser/twtxt-lib.js">library</a> (or
|
||||
<a href="/dist-browser/twtxt-lib.min.js">minified version</a>).</li>
|
||||
<li>Import desired function(s) into your project: `import { hashTwt, loadAndParseTwtxtFile } from "./twtxt-lib.js"`</li>
|
||||
</ul>
|
||||
</p>
|
||||
<p>
|
||||
JSR
|
||||
<ul>
|
||||
<li>Coming soon</li>
|
||||
</ul>
|
||||
</p>
|
||||
<p>
|
||||
NPM
|
||||
<ul>
|
||||
<li>Coming soon</li>
|
||||
</ul>
|
||||
</p>
|
||||
<p>This library can be installed in several different ways:</p>
|
||||
|
||||
<h3>For the Browser</h3>
|
||||
|
||||
<ol>
|
||||
<li>
|
||||
Grab the latest copy of the <code>twtxt-lib.js</code> file, either by
|
||||
downloading it from the
|
||||
<a href="https://git.itsericwoodward.com/eric/twtxt-lib/raw/branch/main/dist-browser/twtxt-lib.js">git
|
||||
repo</a>, the
|
||||
<a href="/dist-browser/twtxt-lib.js">website</a>, or doing a
|
||||
<code>git clone https://git.itsericwoodward.com/eric/twtxt-lib.git</code>
|
||||
and pulling it out of the <code>dist-browser</code> folder.
|
||||
<ul>
|
||||
<li>
|
||||
Alternatively, you can grab the minified version from the
|
||||
<a href="https://git.itsericwoodward.com/eric/twtxt-lib/raw/branch/main/dist-browser/twtxt-lib.min.js">same</a>
|
||||
<a href="https://twtxt-lib.itsericwoodward.com/dist-browser/twtxt-lib.min.js">sources</a>.
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
Add the newly acquired file to your static site / progressive web app /
|
||||
over-engineered blog.
|
||||
</li>
|
||||
<li>
|
||||
Import the desired function(s) via ESM:
|
||||
<code>import { hashTwt, loadAndParseTwtxtFile } from "./twtxt-lib.js";</code>
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
<h3>For Node</h3>
|
||||
|
||||
<ol>
|
||||
<li>
|
||||
Add the package to your project.
|
||||
<ul>
|
||||
<li>
|
||||
Via <a href="https://www.npmjs.com/package/twtxt-lib">NPM</a>:
|
||||
<code>yarn add twtxt-lib</code>
|
||||
</li>
|
||||
<li>
|
||||
Via <a href="https://jsr.io/@itsericwoodward/twtxt-lib">JSR</a>:
|
||||
<code>yarn add jsr:@itsericwoodward/twtxt-lib</code>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
Import the desired function(s) into your code:
|
||||
<code>import { hashTwt, loadAndParseTwtxtFile } from "twtxt-lib";</code>
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
<p>Use the tabs to learn more.</p>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user