# Site rules in the extension

> When the extension saves the wrong part of a page, point at the right part with the mouse. It makes a rule for that site that you can edit, export and share.

Source: https://crawl-docs.pdhq.win/guide/site-rules-in-the-extension/
Last updated: 2026-12-02

For most pages the extension finds the article by itself. When it gets a site wrong (nothing found, the wrong part, a page built only from plain boxes) you can teach it that one site. The lesson is a **site rule**, kept in the extension itself.

## Choose the article area

1. Open the page and click the extension's icon.
2. If the reader could not decide, the panel offers **Choose the article area**. For an article it is always there, under the save button.
3. Move the mouse over the page. The part under the pointer is outlined. Click the part you want to save.
4. Make the choice bigger or smaller with the **Up** and **Down** arrow keys or the toolbar. **Enter** confirms, **Esc** cancels.
5. The rule is saved for that site. Click the icon again and save the page.

> [!SCREEN] A web page with one part outlined in blue under the mouse pointer, and a small bar at the top of the page with the buttons for bigger, smaller, confirm and cancel, and a short line of help.

The panel says when a rule is used for the page. **Forget it** removes the rule. If a rule stopped working because the site changed, the button reads **Fix the rule**.

## A page with very little text

A page with very little text offers **Save anyway**. A short post with a picture is saved without asking.

## Edit, export and import rules

Open the extension's settings, **Site rules**:

- **Add or edit a rule (JSON)** lets you write a rule by hand, then **Save rule**.
- **Export my rules** and **Import rules** move your rules to another browser or share them.
- **Built-in rules** lists the ones that come with the extension. Your own rule for a site always wins over a built-in one.

A rule is only a set of CSS selectors and a few switches. It never runs code. The fields are described in [Site rules](https://crawl-docs.pdhq.win/advanced/site-rules.md).

## What works without any rule

These work on every page already:

- Plain `<details>` boxes and ARIA accordions are opened while reading.
- Pages built from many blocks (Notion and similar) are scrolled once and every block is kept, even those the page throws away when they leave the screen.
- A file card (a button holding a file name and size) is saved as a file.
- Links inside the article that download with one click are saved with it, of any type: documents, archives, programs, data, audio, video, design files. The extension recognises them by their file ending, by the `download` attribute, or by a download hint in the address (such as `?dl=1`). Links to pages stay links.

The server keeps up to **20 files of at most 50 MB per post**. A link that answers with a web page stays online-only.

## Built-in rules

The extension ships rules for a few well-known sites. X Articles (the long pieces at `x.com/<name>/article/<id>`), GitHub repositories (the README) and Notion pages are among them. **Built-in rules** in the extension's settings lists them all. They were checked against the sites' markup as known, not on the live pages. A Notion page was checked against real saved copies; Notion toggles were not on that page and are untested.

> [!NOT-TESTED]
> The readers for Facebook, Instagram, X posts, Pinterest and LinkedIn are separate from site rules and were not tested on the live sites. See [What is not tested](https://crawl-docs.pdhq.win/guide/what-is-not-tested.md).
