Skip to content

Commit 21fb9c7

Browse files
5ZYSZ3Kjsamr
authored andcommitted
fix: adjust website - change root path and fix building
1 parent 8615379 commit 21fb9c7

File tree

9 files changed

+102
-92
lines changed

9 files changed

+102
-92
lines changed

apps/website/blog/2021-06-07-foundry-announcement.mdx

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ specific components and observe how they respond to style and props changes.
4949
### The Transient Render Engine
5050

5151
The Transient Render engine (TRE) transforms DOM nodes into a ready-to-render
52-
data structure called the Transient Render Tree (TRT), which is made of <Reference type="api-def" name="TNodes" url="/react-native-render-html/api/tnode" />. It allows features such as **whitespace collapsing**, **hoisting**,
52+
data structure called the Transient Render Tree (TRT), which is made of <Reference type="api-def" name="TNodes" url="/api/tnode" />. It allows features such as **whitespace collapsing**, **hoisting**,
5353
**CSS inheritance** and more.
5454

5555
A legitimate concerns is whether it adds any overhead. The short answer is
@@ -59,16 +59,16 @@ its speed. In addition to the enumerated features, the new transient data
5959
structure offers obvious advantages for library consumers:
6060

6161
- It is totally transparent and predictable; you can create snapshots of a
62-
&ZeroWidthSpace;<Reference type="api-def" name="TNode" url="/react-native-render-html/api/tnode" /> thanks to the <Reference type="api-def" name="TNodeShape" member="snaphot()"
63-
url="/react-native-render-html/api/tnodeshape#snapshot" /> method for an
62+
&ZeroWidthSpace;<Reference type="api-def" name="TNode" url="/api/tnode" /> thanks to the <Reference type="api-def" name="TNodeShape" member="snaphot()"
63+
url="/api/tnodeshape#snapshot" /> method for an
6464
intuitive understanding of the engine internals. This feature is extremely
6565
handy for debugging and testing!
6666
- It's hackable by allowing to define custom **content models** for tags. Say
6767
hi to inline images!
6868
- It is shipped with a CSS processor which enforces strict translation rules
6969
from CSS to React Native styles. Say goodbye to native crashes caused by
7070
unsupported CSS properties! See the [**dedicated
71-
article**](/react-native-render-html/docs/flow/css-processing) for
71+
article**](/docs/flow/css-processing) for
7272
reference.
7373
- It paves the way to server side (or build-time) pre-rendering in the future,
7474
and, why not, a react fiber and MDX builder.
@@ -78,8 +78,8 @@ Below is an example of HTML transformation into a Transient Render Tree:
7878
<TNodeTransformDisplay title="Translation of HTML markup into a Transient Render Tree" caption="This figure shows how HTML markup translates to a transient render tree structure. The markup for the TRT is JSX and has been produced by the snapshot() method. Notice that whitespace have collapsed!" html="%3Ca%20href%3D%22https%3A%2F%2Fdomain.com%22%3E%0AThis%20is%0A%3Cspan%3Ephrasing%20content%3C%2Fspan%3E%0A%3Cimg%20src%3D%22https%3A%2F%2Fdomain.com%2Flogo.jpg%22%20%2F%3E%0A%20%20%20%20and%20this%20is%20%3Cstrong%3Etoo%3C%2Fstrong%3E.%0A%3C%2Fa%3E" snapshot="%3CTDocument%20tagName%3D%22html%22%3E%0A%20%20%3CTBlock%20tagName%3D%22body%22%3E%0A%20%20%20%20%3CTBlock%20tagName%3D%22a%22%20href%3D%22https%3A%2F%2Fdomain.com%22%3E%0A%20%20%20%20%20%20%3CTPhrasing%20anonymous%3E%0A%20%20%20%20%20%20%20%20%3CTText%20anonymous%20data%3D%22This%20is%20%22%20%2F%3E%0A%20%20%20%20%20%20%20%20%3CTText%20tagName%3D%22span%22%20data%3D%22phrasing%20content%22%20%2F%3E%0A%20%20%20%20%20%20%3C%2FTPhrasing%3E%0A%20%20%20%20%20%20%3CTBlock%20tagName%3D%22img%22%20src%3D%22https%3A%2F%2Fdomain.com%2Flogo.jpg%22%20%2F%3E%0A%20%20%20%20%20%20%3CTPhrasing%20anonymous%3E%0A%20%20%20%20%20%20%20%20%3CTText%20anonymous%20data%3D%22and%20this%20is%20%22%20%2F%3E%0A%20%20%20%20%20%20%20%20%3CTText%20tagName%3D%22strong%22%20data%3D%22too%22%20%2F%3E%0A%20%20%20%20%20%20%20%20%3CTText%20anonymous%20data%3D%22.%22%20%2F%3E%0A%20%20%20%20%20%20%3C%2FTPhrasing%3E%0A%20%20%20%20%3C%2FTBlock%3E%0A%20%20%3C%2FTBlock%3E%0A%3C%2FTDocument%3E" />
7979

8080
:::tip Learn More
81-
A detailed review of the Transient Render Engine has its [**dedicated article**](/react-native-render-html/docs/flow/transient-render-engine).
82-
You can also learn more about the new data flow in the [**Architecture article**](/react-native-render-html/docs/architecture).
81+
A detailed review of the Transient Render Engine has its [**dedicated article**](/docs/flow/transient-render-engine).
82+
You can also learn more about the new data flow in the [**Architecture article**](/docs/architecture).
8383
:::
8484

8585
### Custom Renderers
@@ -106,9 +106,9 @@ function H1Renderer({
106106
}
107107
```
108108
Default renderers support `onPress` and many more interesting props! See
109-
&ZeroWidthSpace;<Reference type="api-def" name="TDefaultRendererProps" url="/react-native-render-html/api/tdefaultrendererprops" />.
109+
&ZeroWidthSpace;<Reference type="api-def" name="TDefaultRendererProps" url="/api/tdefaultrendererprops" />.
110110
Moreover, you can customize the rendering of children thanks to the <Reference
111-
type="api-def" name="TChildrenRenderer" url="/react-native-render-html/api/tchildrenrenderer" /> component!
111+
type="api-def" name="TChildrenRenderer" url="/api/tchildrenrenderer" /> component!
112112

113113
```jsx title="Foundry Custom Renderer with Children Tampering"
114114
import React from 'react';
@@ -135,14 +135,14 @@ function ArticleWithAds({
135135
}
136136
```
137137
This custom renderer will insert an `AdComponent` element after the second and
138-
fourth children of this <Reference type="api-def" name="TNode" url="/react-native-render-html/api/tnode" />.
138+
fourth children of this <Reference type="api-def" name="TNode" url="/api/tnode" />.
139139

140140
Last but not least, custom renderers can reuse internal renderers (those
141141
special renderers displaying lists, images and anchors). For this purpose,
142-
you can use the <Reference type="api-def" name="InternalRenderer" url="/react-native-render-html/api/customrendererprops#internalrenderer" /> prop or <Reference type="api-def" name="useInternalRenderer" url="/react-native-render-html/api/useinternalrenderer" /> hook.
142+
you can use the <Reference type="api-def" name="InternalRenderer" url="/api/customrendererprops#internalrenderer" /> prop or <Reference type="api-def" name="useInternalRenderer" url="/api/useinternalrenderer" /> hook.
143143

144144
:::tip Learn More
145-
[**Check-out the Custom Rendering guide**](/react-native-render-html/docs/guides/custom-renderers).
145+
[**Check-out the Custom Rendering guide**](/docs/guides/custom-renderers).
146146
:::
147147

148148
### Font Selection
@@ -153,10 +153,10 @@ the system will often lead to native crashes. To reconcile this inconsistency, t
153153
Processor will try to match each font in a `font-family` property with a list
154154
of supported fonts available in the system by the library consumer. The prop to
155155
declare such fonts is <Reference type="api-def" name="systemFonts"
156-
url="/react-native-render-html/api/renderhtmlprops#systemfonts"/>.
156+
url="/api/renderhtmlprops#systemfonts"/>.
157157

158158
:::tip Learn More
159-
[**Check-out the Font Selection section from the Textual guide**](/react-native-render-html/docs/content/textual#font-selection).
159+
[**Check-out the Font Selection section from the Textual guide**](/docs/content/textual#font-selection).
160160
:::
161161

162162
### A Revamped List Renderer
@@ -173,7 +173,7 @@ Note that the **thai** and **arabic indic** counters have been rendered via
173173
[@jsamr/counter-style](https://github.com/jsamr/react-native-li/tree/master/packages/counter-style#readme)
174174
presets, and the **russian** counter has been rendered with a custom, 2
175175
lines-of-code counter renderer. Learn more about this fancy feature and examples [**in the dedicated
176-
article**](/react-native-render-html/docs/content/lists).
176+
article**](/docs/content/lists).
177177

178178
### Extensible Internal Image Renderer
179179

@@ -185,39 +185,39 @@ rendering**:
185185

186186
<dt>
187187

188-
&ZeroWidthSpace;<Reference library="react-native-render-html" name="IMGElementContainer" url="/react-native-render-html/api/imgelementcontainer" member={undefined} full={false} type="api-def" plural={undefined} />
188+
&ZeroWidthSpace;<Reference library="react-native-render-html" name="IMGElementContainer" url="/api/imgelementcontainer" member={undefined} full={false} type="api-def" plural={undefined} />
189189

190190
</dt><dd>
191191

192192
To render the container of the &ZeroWidthSpace;<Reference full={false} name="&lt;img&gt;" url="https://mdn.io/img" type="html-el" /> element.
193193

194194
</dd><dt>
195195

196-
&ZeroWidthSpace;<Reference library="react-native-render-html" name="IMGElementContentError" url="/react-native-render-html/api/imgelementcontenterror" member={undefined} full={false} type="api-def" plural={undefined} />
196+
&ZeroWidthSpace;<Reference library="react-native-render-html" name="IMGElementContentError" url="/api/imgelementcontenterror" member={undefined} full={false} type="api-def" plural={undefined} />
197197

198198
</dt><dd>
199199

200200
To render the fallback view on error state.
201201

202202
</dd><dt>
203203

204-
&ZeroWidthSpace;<Reference library="react-native-render-html" name="IMGElementContentLoading" url="/react-native-render-html/api/imgelementcontentloading" member={undefined} full={false} type="api-def" plural={undefined} />
204+
&ZeroWidthSpace;<Reference library="react-native-render-html" name="IMGElementContentLoading" url="/api/imgelementcontentloading" member={undefined} full={false} type="api-def" plural={undefined} />
205205

206206
</dt><dd>
207207

208208
To render the fallback view on loading state.
209209

210210
</dd><dt>
211211

212-
&ZeroWidthSpace;<Reference library="react-native-render-html" name="IMGElementContentSuccess" url="/react-native-render-html/api/imgelementcontentsuccess" member={undefined} full={false} type="api-def" plural={undefined} />
212+
&ZeroWidthSpace;<Reference library="react-native-render-html" name="IMGElementContentSuccess" url="/api/imgelementcontentsuccess" member={undefined} full={false} type="api-def" plural={undefined} />
213213

214214
</dt><dd>
215215

216216
To render the image on success state..
217217

218218
</dd><dt>
219219

220-
&ZeroWidthSpace;<Reference library="react-native-render-html" name="useIMGElementState" url="/react-native-render-html/api/useimgelementstate" member={undefined} full={false} type="api-def" plural={undefined} />
220+
&ZeroWidthSpace;<Reference library="react-native-render-html" name="useIMGElementState" url="/api/useimgelementstate" member={undefined} full={false} type="api-def" plural={undefined} />
221221

222222
</dt><dd>
223223

@@ -229,7 +229,7 @@ To get the state of the image resource fetching.
229229

230230

231231
:::tip Learn More
232-
[**Check-out the Images article**](/react-native-render-html/docs/content/images).
232+
[**Check-out the Images article**](/docs/content/images).
233233
:::
234234

235235
### Composite Rendering Architecture
@@ -253,14 +253,14 @@ is equivalent to this (**explicit 3 layers**):
253253
```
254254

255255
:::tip Learn More
256-
[**Check-out the rendering article**](/react-native-render-html/docs/flow/rendering).
256+
[**Check-out the rendering article**](/docs/flow/rendering).
257257
:::
258258

259259
It also offers the ability to select the root of the document to render, and to
260260
inspect the DOM object asynchronously before rendering.
261261

262262
:::tip Learn More
263-
[**Check-out the DOM Tampering guide**](/react-native-render-html/docs/guides/dom-tampering)
263+
[**Check-out the DOM Tampering guide**](/docs/guides/dom-tampering)
264264
:::
265265

266266
## Massive dumps of squashed bugs
@@ -280,10 +280,10 @@ tags specified in the [HTML5 WHATWG living
280280
standard](https://html.spec.whatwg.org/). However, not all tags will be
281281
rendered. Tags with a **content model** set to `none` will not be rendered (you
282282
can override this model though). Check-out the list of all tags and their
283-
models in the <Reference type="api-doc" name="defaultHTMLElementModels" url="/react-native-render-html/api/defaulthtmlelementmodels/" /> definition.
283+
models in the <Reference type="api-doc" name="defaultHTMLElementModels" url="/api/defaulthtmlelementmodels/" /> definition.
284284

285285
:::tip Learn More
286-
[Check-out the release notes for more details](https://github.com/meliorence/react-native-render-html/releases/tag/v6.0.0-beta.0).
286+
[Check-out the release notes for more details](https://github.com/meliorence/releases/tag/v6.0.0-beta.0).
287287
:::
288288

289289
## Ready for Production?
@@ -300,7 +300,7 @@ rise to above **90%** by the end of the beta stage.
300300
### Migrating from v4 and v5
301301

302302
[**Check-out our dedicated
303-
guide**](/react-native-render-html/docs/migration-guide), and please don't
303+
guide**](/docs/migration-guide), and please don't
304304
hesitate to ask for help in [**our discord channel**](https://discord.gg/dbEMMJM).
305305

306306
## Final Notes

apps/website/blog/2021-06-28-create-blog-app-rnrh-II.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ To render the article, we'll need to follow the below steps:
241241
4. Render the headings in a Drawer and the DOM in a `ScrollView` with <APIReference name="RenderHTMLSource" />.
242242

243243
One important note is that we must use the [explicit composite rendering
244-
architecture](/react-native-render-html/docs/flow/rendering#composite-rendering-architecture)
244+
architecture](/docs/flow/rendering#composite-rendering-architecture)
245245
because we want access to the DOM object from the controlling component to
246246
easily extract headings, which is more tedious when using the
247247
implicit composite architecture (e.g., with the <APIReference name="RenderHTML"
@@ -793,4 +793,4 @@ However, pressing an entry won't do anything. **It is hence time to tackle the
793793
implementation of the tap-to-scroll feature! Let's jump to [Part
794794
III](./2021-06-29-create-blog-app-rnrh-III.mdx)**.
795795

796-
<SocialLinks twitterUrl="https://twitter.com/jsamrn/status/1409520975226490880" redditUrl="https://www.reddit.com/r/reactnative/comments/o948fs/i_wrote_a_demo_and_tutorial_for_a_webviewfree/" />
796+
<SocialLinks twitterUrl="https://twitter.com/jsamrn/status/1409520975226490880" redditUrl="https://www.reddit.com/r/reactnative/comments/o948fs/i_wrote_a_demo_and_tutorial_for_a_webviewfree/" />

apps/website/blog/2021-06-29-create-blog-app-rnrh-III.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ export default function TOC({
387387

388388
The `Scroller` is still missing the coordinates of each heading to be able to
389389
properly `scrollToEntry`. For this purpose, we are going to create a [custom
390-
renderer](/react-native-render-html/docs/guides/custom-renderers#component-based-custom-rendering)
390+
renderer](/docs/guides/custom-renderers#component-based-custom-rendering)
391391
for `<h2>` and `<h3>` tags. We will also need to register a `<header>` renderer
392392
to store the header height. If you remember well, the DOM has a structure like
393393
below:
@@ -665,7 +665,7 @@ So, let's fix it!
665665
### Fixing Code Samples
666666

667667
Code samples are rendered by Docusaurus in a `<pre class="prism-code">` tag. We need to fix two issues:
668-
668+
669669
- Define a custom renderer for `pre` tags, which renders inside a `ScrollView` when matching the `"prism-code"` class.
670670
- Define a custom renderer for `span` tags. We need to do that because the
671671
whole code block is rendered inside a `code` element with a `display: flex;
@@ -820,7 +820,7 @@ CSS, it only spans to the text content-area. Below is a diagram explaining the d
820820
![](https://iamvdo.me/content/01-blog/30-css-avance-metriques-des-fontes-line-height-et-vertical-align/line-height.png) See a complete explanation [in this excellent article on CSS text styling](https://iamvdo.me/en/blog/css-font-metrics-line-height-and-vertical-align).
821821
2. `padding` and `border` are ignored in nested text elements.
822822

823-
All these features are required to get the official blog appealing anchors styles:
823+
All these features are required to get the official blog appealing anchors styles:
824824

825825
![](/img/react-native-blog-anchors.png)
826826

@@ -845,4 +845,4 @@ below features have been implemented:
845845
That's all for this tutorial! Don't forget to [give us a star](https://github.com/meliorence/react-native-render-html) if you enjoy this library.
846846
You can also [follow me on Twitter](https://twitter.com/jsamrn), and [rate this library on Open Base](https://openbase.com/js/react-native-render-html?utm_source=embedded&utm_medium=badge&utm_campaign=rate-badge).
847847

848-
<SocialLinks twitterUrl="https://twitter.com/jsamrn/status/1409520975226490880" redditUrl="https://www.reddit.com/r/reactnative/comments/o948fs/i_wrote_a_demo_and_tutorial_for_a_webviewfree/" />
848+
<SocialLinks twitterUrl="https://twitter.com/jsamrn/status/1409520975226490880" redditUrl="https://www.reddit.com/r/reactnative/comments/o948fs/i_wrote_a_demo_and_tutorial_for_a_webviewfree/" />

apps/website/blog/2021-10-23-6-2-updates.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ of those bugs.
428428

429429
## Learn More
430430

431-
Check out [the release notes in the official repository](https://github.com/meliorence/react-native-render-html/releases/tag/v6.2.0).
432-
Moreover, if you encounter any issue while upgrading from a lower minor (6.0.x, 6.1.x), you are welcome to [comment this Github issue](https://github.com/meliorence/react-native-render-html/issues/526)!
431+
Check out [the release notes in the official repository](https://github.com/meliorence/releases/tag/v6.2.0).
432+
Moreover, if you encounter any issue while upgrading from a lower minor (6.0.x, 6.1.x), you are welcome to [comment this Github issue](https://github.com/meliorence/issues/526)!
433433

434434
<SocialLinks twitterUrl="https://twitter.com/jsamrn/status/1452137777508667397" redditUrl="https://www.reddit.com/r/reactnative/comments/qe9pam/checkout_whats_new_in_react_native_render_html_v62/" />

apps/website/docs/.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
**/*.mdx
22
**/*.md
33
!migration-guide.mdx
4-
!architecture.mdx

apps/website/docs/architecture.mdx

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)