You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**Removed**: `extended-markdown-filter` (no longer maintained, incompatible with html-pipeline 3)
16
+
17
+
#### Breaking Changes for Advanced Users
18
+
19
+
1.**Custom html-pipeline filters no longer work**
20
+
- html-pipeline 3.x has a completely different filter API
21
+
- If you configured custom filters via `pipeline_config[:pipeline]`, they will not work
22
+
-**Migration**: Rewrite custom filters using html-pipeline 3.x API (see [html-pipeline migration guide](https://github.com/jch/html-pipeline/blob/main/CHANGELOG.md))
23
+
- The gem now handles markdown and emoji rendering directly
24
+
25
+
2.**Custom Renderer API changes**
26
+
- If you implemented a custom renderer that directly uses CommonMarker:
Copy file name to clipboardExpand all lines: README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -198,7 +198,7 @@ generator.generate
198
198
199
199
By default, the HTML generation process uses ERB to layout the content. There are a bunch of default options provided for you, but feel free to override any of these. The _Configuration_ section below has more information on what you can change.
200
200
201
-
It also uses [html-pipeline](https://github.com/jch/html-pipeline)to perform the rendering by default. You can override this by providing a custom rendering class.You must implement two methods:
201
+
It uses [Commonmarker](https://github.com/gjtorikian/commonmarker) (v2.x) to perform the Markdown rendering by default, with GitHub Flavored Markdown extensions enabled including automatic header anchors. Emoji shortcodes (like `:smile:`) are automatically converted to emoji characters using [gemoji](https://github.com/github/gemoji). You can override this by providing a custom rendering class.You must implement two methods:
202
202
203
203
-`initialize` - Takes two arguments, the parsed `schema` and the configuration `options`.
204
204
-`render` Takes the contents of a template page. It also takes two optional kwargs, the GraphQL `type` and its `name`. For example:
@@ -330,7 +330,7 @@ The following options are available:
330
330
|`use_default_styles`| Indicates if you want to use the default styles. |`true`|
331
331
|`base_url`| Indicates the base URL to prepend for assets and links. |`""`|
332
332
|`delete_output`| Deletes `output_dir` before generating content. |`false`|
333
-
|`pipeline_config`| Defines two sub-keys, `pipeline` and `context`, which are used by `html-pipeline` when rendering your output. |`pipeline`has `ExtendedMarkdownFilter`, `EmojiFilter`, and `TableOfContentsFilter`. `context` has `gfm: false` and `asset_root` set to GitHub's CDN. |
333
+
|`pipeline_config`| Defines two sub-keys, `pipeline` and `context`. The `context` hash can contain an `unsafe` key to enable raw HTML rendering (needed for custom layouts). Note: In v6.0+, markdown and emoji rendering are handled directly by the gem, not via html-pipeline filters. |`pipeline`is empty. `context` has `gfm: false`, `unsafe: true`, and `asset_root` set to GitHub's CDN. |
334
334
|`renderer`| The rendering class to use. |`GraphQLDocs::Renderer`|
335
335
|`templates`| The templates to use when generating HTML. You may override any of the following keys: `default`, `includes`, `operations`, `objects`, `mutations`, `interfaces`, `enums`, `unions`, `input_objects`, `scalars`, `directives`. | The defaults are found in _lib/graphql-docs/layouts/_. |
336
336
|`landing_pages`| The landing page to use when generating HTML for each type. You may override any of the following keys: `index`, `query`, `object`, `mutation`, `interface`, `enum`, `union`, `input_object`, `scalar`, `directive`. | The defaults are found in _lib/graphql-docs/landing_pages/_. |
0 commit comments