Skip to content

Commit 0abeff5

Browse files
committed
docs: update readme
1 parent 8bbf08c commit 0abeff5

1 file changed

Lines changed: 19 additions & 6 deletions

File tree

README.md

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ This repository contains `html2rss` feed configurations for many websites.
2222

2323
## Dynamic Parameters
2424

25-
Configs must include a `parameters` section to define default values for dynamic parameters:
25+
Parameterized configs should include a `parameters` section with default values:
2626

2727
```yaml
2828
parameters:
@@ -38,20 +38,31 @@ channel:
3838
# ... rest of config
3939
```
4040

41-
The `type` field specifies the parameter type (currently only `string` is supported), and `default` provides the default value when no parameter is explicitly provided.
41+
The `type` field specifies the parameter type (currently only `string` is supported), and `default` provides the default value used by this repository's validation and fetch tests.
42+
43+
Notes:
44+
45+
- Only configs that use `%<param>s` placeholders need a `parameters` section.
46+
- Callers can still override those defaults at runtime with `html2rss feed ... --params ...`.
47+
- Dynamic substitution applies to `channel` and `headers`; selectors are not parameterized by this feature.
4248

4349
## Validation
4450

45-
Validate configs against the html2rss schema before committing:
51+
Use both schema-aware editing and runtime validation before committing:
4652

4753
```bash
48-
# Validate all configs
54+
# Validate all configs with the runtime validator
4955
make validate
5056

5157
# Validate a single config directly
5258
bundle exec html2rss validate lib/html2rss/configs/github.com/releases.yml
59+
60+
# Export the current JSON Schema locally for editor use
61+
make schema
5362
```
5463

64+
The JSON Schema is useful for editor autocompletion and basic structural checks. Runtime validation remains authoritative for merged defaults and cross-field rules.
65+
5566
## Testing
5667

5768
Uses **dynamic test generation** - no individual spec files needed!
@@ -67,7 +78,7 @@ make test-config CONFIG=github.com/releases.yml
6778
make test-domain DOMAIN=github.com
6879
```
6980

70-
**Adding new configs**: Just create the YAML file and run `make validate` then tests. No spec file needed.
81+
**Adding new configs**: Create the YAML file, run `make validate`, then run the generated tests. No dedicated spec file is needed.
7182

7283
**Config folder convention**: Place configs under the registrable domain folder (e.g., `example.com/` or `bbc.co.uk/`). Legacy subdomain folders (e.g., `news.example.com/`) are allowed but not preferred.
7384

@@ -92,6 +103,8 @@ configs via a glob pattern, so new files get validation before the modeline is a
92103
93104
## Documentation
94105

95-
- [Main Documentation](https://html2rss.github.io/html2rss-configs/)
106+
- [Selectors Reference](https://html2rss.github.io/ruby-gem/reference/selectors/)
107+
- [Dynamic Parameters](https://html2rss.github.io/ruby-gem/how-to/dynamic-parameters/)
108+
- [CLI Reference](https://html2rss.github.io/ruby-gem/reference/cli-reference/)
96109
- [Contributing Guide](https://html2rss.github.io/get-involved/contributing)
97110
- [Sponsorship Page](https://html2rss.github.io/get-involved/sponsoring)

0 commit comments

Comments
 (0)