Skip to content

Commit c76ef75

Browse files
committed
docs: Update README with new extension links, documentation references, and remove outdated code examples.
1 parent de11c7f commit c76ef75

File tree

1 file changed

+6
-19
lines changed

1 file changed

+6
-19
lines changed

README.md

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ This script helps you identify which elements are out of order.
1515

1616
_New: Install the [Capo Chrome extension](https://chrome.google.com/webstore/detail/capo-get-your-%3Chead%3E-in-o/ohabpnaccigjhkkebjofhpmebofgpbeb)_
1717

18-
1. Install the [Chrome extension](https://chrome.google.com/webstore/detail/capo/ohkeehjepccojmgephomofandmjaafid)
19-
3. Explore the console logs
18+
1. Install the [Chrome extension](https://chrome.google.com/webstore/detail/capo-get-your-%3Chead%3E-in-o/ohabpnaccigjhkkebjofhpmebofgpbeb)
19+
2. Explore the console logs
2020

2121
<img width="1552" alt="capo screenshot" src="https://github.com/rviscomi/capo.js/assets/1120896/b29672f9-1f05-4a05-a85e-df27acd153bd">
2222

@@ -45,17 +45,7 @@ console.log(result.violations); // Number of ordering violations
4545
console.log(result.warnings); // Validation warnings
4646
```
4747

48-
### Using Adapters
49-
50-
Capo.js uses adapters to work with different HTML representations:
51-
52-
```javascript
53-
import { analyzeHead, BrowserAdapter } from '@rviscomi/capo.js';
54-
55-
// For browser DOM (if using in browser context)
56-
const browserAdapter = new BrowserAdapter();
57-
const browserResult = analyzeHead(document.head, browserAdapter);
58-
```
48+
Learn more about building your own adapters in the [custom adapters docs](https://rviscomi.github.io/capo.js/developer/custom-adapters/).
5949

6050
### Subpath Exports
6151

@@ -68,9 +58,6 @@ import { analyzeHead, checkOrdering } from '@rviscomi/capo.js';
6858
// Import just adapters
6959
import { BrowserAdapter } from '@rviscomi/capo.js/adapters';
7060

71-
// Import specific adapters
72-
import { BrowserAdapter } from '@rviscomi/capo.js/adapters/browser';
73-
7461
// Import rules API
7562
import { ElementWeights, getWeight } from '@rviscomi/capo.js/rules';
7663

@@ -111,7 +98,7 @@ Plus individual detector functions: `isMeta()`, `isTitle()`, `isPreconnect()`, e
11198

11299
### Migration from v1.x
113100

114-
See [MIGRATION.md](MIGRATION.md) for detailed migration guide.
101+
See the [migration guide](docs/src/content/docs/migration-v2.mdx) for detailed migration guide.
115102

116103
**Key changes:**
117104
- All analysis functions now require an adapter parameter
@@ -122,7 +109,7 @@ See [MIGRATION.md](MIGRATION.md) for detailed migration guide.
122109

123110
![Capo.js Chrome extension](https://github.com/rviscomi/capo.js/assets/1120896/389bcec0-567d-448f-9897-eee5ca373e6b)
124111

125-
WIP see [crx/](crx/)
112+
See the [extension docs](docs/src/content/docs/user/extension.mdx) for detailed usage instructions.
126113

127114

128115
### Other
@@ -135,7 +122,7 @@ Another idea would be to use something like Cloudflare workers to inject the scr
135122

136123
The script logs two info groups to the console: the actual order of the `<head>`, and the optimal order. In this collapsed view, you can see at a glance whether there are any high impact elements out of order.
137124

138-
Each "weight" has a corresponding color, with red being the highest and blue/grey being the lowest. See [capo.js](https://github.com/rviscomi/capo.js/blob/main/capo.js#L1-L13) for the exact mapping.
125+
Each "weight" has a corresponding color, with red being the highest and blue/grey being the lowest. See [src/lib/rules.js](src/lib/rules.js) for the exact mapping.
139126

140127
Here are a few examples.
141128

0 commit comments

Comments
 (0)