From a125839267c5a91342a6e0205f769aa1a9ccf9c2 Mon Sep 17 00:00:00 2001 From: Bryan Braun Date: Mon, 1 Apr 2024 10:55:52 -0400 Subject: [PATCH] :memo: update docs site (broken link) and README --- README.md | 8 +++++++- docs/{anchor.js => docs-anchor.js} | 0 docs/index.html | 4 ++-- package.json | 4 ++-- 4 files changed, 11 insertions(+), 5 deletions(-) rename docs/{anchor.js => docs-anchor.js} (100%) diff --git a/README.md b/README.md index 048d11d..f8a4310 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ Currently Supports: IE9+ and modern browsers To contribute: 1. Fork/Clone the repo. -2. Make your changes. +2. Make your changes (the main source file is `anchor.js`). 3. Write tests as needed. 4. Run tests locally to confirm everything is working: - Install test modules: Run `npm ci` @@ -61,6 +61,12 @@ To contribute: 5. Minify and prepare the code: `npm run build` 6. Submit a Pull Request. +### Docs + +The docs site (in `/docs`) is a good place to test changes visually, because it has a lot of AnchorJS examples. The site can be viewed locally by opening `/docs/index.html` in a web browser. The docs are written in plain HTML and can be edited directly. + +The version of AnchorJS used in the docs (`docs-anchor.js`) is a copy of the true source file (`anchor.js`), and is unminified (for easy testing, editing, and debugging). You don't need to include changes to `docs-anchor.js` in your PR. `docs-anchor.js` is overwritten to the latest version of AnchorJS source as part of `npm run build` (which is run when publishing a new version of anchor-js). + ## License Licensed with the [MIT License](/LICENSE). diff --git a/docs/anchor.js b/docs/docs-anchor.js similarity index 100% rename from docs/anchor.js rename to docs/docs-anchor.js diff --git a/docs/index.html b/docs/index.html index 5d3d8c0..a2c71bb 100644 --- a/docs/index.html +++ b/docs/index.html @@ -331,7 +331,7 @@

Section IDs

<script> anchors.add('h3'); </script> -

This allows you to do things like highlight sections when your users jump to them.

+

This allows you to do things like highlight sections when your users jump to them.

Multiple sets of anchors

@@ -811,7 +811,7 @@

Tooltip

- +