Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
f44bda6
docs: fundamentals
hejsztynx Jul 16, 2026
23663fe
Apply suggestions from code review
hejsztynx Jul 16, 2026
043fa68
Update docs/docs/fundamentals/your-first-editor.mdx
hejsztynx Jul 16, 2026
b240fb8
docs: enable eslint
hejsztynx Jul 16, 2026
44ee9fe
fix: proper example code
hejsztynx Jul 16, 2026
d1feece
Apply suggestions from code review
hejsztynx Jul 17, 2026
eb62586
docs: tweaks
hejsztynx Jul 17, 2026
0585c98
docs: deps bump
hejsztynx Jul 17, 2026
fb0a032
docs: tweaks
hejsztynx Jul 17, 2026
ae0c82c
Merge branch 'feat/docs' into @ksienkiewicz/docs-fundamentals
hejsztynx Jul 17, 2026
dcc7034
Update docs/docs/fundamentals/core-concepts.md
hejsztynx Jul 17, 2026
885614f
chore: link docs enriched-html package to local source
hejsztynx Jul 19, 2026
23c2ced
chore: typecheck and linting in docs
hejsztynx Jul 19, 2026
3ebccf9
refactor: remove comments
hejsztynx Jul 20, 2026
92324a0
docs: update tsconfig
hejsztynx Jul 20, 2026
3a769f4
fix: local source packages installation on ci builds
hejsztynx Jul 20, 2026
7db83cd
cleanup
hejsztynx Jul 20, 2026
a60f30a
Merge branch 'feat/docs' into @ksienkiewicz/docs-fundamentals
hejsztynx Jul 20, 2026
af2bacb
Merge branch '@ksienkiewicz/docs-fundamentals' into @ksienkiewicz/fea…
hejsztynx Jul 20, 2026
34fa7e0
refactor: clarifying comment
hejsztynx Jul 21, 2026
32e2b6a
docs: clean up
hejsztynx Jul 21, 2026
0590aee
Merge branch 'feat/docs' into @ksienkiewicz/docs-fundamentals
hejsztynx Jul 22, 2026
fdb3c17
docs: web sanitization acknowledgement
hejsztynx Jul 27, 2026
7f9dcb4
Merge branch 'feat/docs' into @ksienkiewicz/docs-fundamentals
hejsztynx Jul 27, 2026
5cfb27d
chore: bump enriched-html
hejsztynx Jul 30, 2026
cf1a088
Merge branch '@ksienkiewicz/docs-fundamentals' into @ksienkiewicz/fea…
hejsztynx Jul 30, 2026
8105030
refactor: rewording
hejsztynx Aug 10, 2026
e738f1e
refactor: formatting
hejsztynx Aug 10, 2026
740a0df
docs: ref api clarification
hejsztynx Aug 10, 2026
5dbfdb1
docs: unctrolled nature clarification
hejsztynx Aug 10, 2026
9f38b2d
fix: grammar
hejsztynx Aug 10, 2026
fa1c6da
feat: docs typecheck ci integration
hejsztynx Aug 10, 2026
fdc88df
feat: local yarn docs scripts
hejsztynx Aug 10, 2026
31678a1
Merge branch '@ksienkiewicz/docs-fundamentals' into @ksienkiewicz/fea…
hejsztynx Aug 10, 2026
59f044a
Merge branch 'feat/docs' into @ksienkiewicz/feat-docs-project-configu…
hejsztynx Aug 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .github/workflows/docs-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,20 @@ jobs:
with:
node-version: 22
cache: yarn
cache-dependency-path: docs/yarn.lock
cache-dependency-path: |
yarn.lock
docs/yarn.lock

- name: Install library dependencies (local source)
working-directory: ${{ github.workspace }}
run: yarn install --immutable

- name: Install dependencies
run: yarn install --immutable

- name: Typecheck docs
working-directory: ${{ github.workspace }}
run: yarn typecheck:docs

- name: Build docs
run: yarn build
12 changes: 11 additions & 1 deletion .github/workflows/docs-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,21 @@ jobs:
with:
node-version: 22
cache: yarn
cache-dependency-path: docs/yarn.lock
cache-dependency-path: |
yarn.lock
docs/yarn.lock

- name: Install library dependencies (local source)
working-directory: ${{ github.workspace }}
run: yarn install --immutable

- name: Install dependencies
run: yarn install --immutable

- name: Typecheck docs
working-directory: ${{ github.workspace }}
run: yarn typecheck:docs

- name: Build docs
run: yarn build

Expand Down
52 changes: 45 additions & 7 deletions docs/docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion

import { topbarBannerReservationScript } from '@swmansion/t-rex-ui/topbar-banner';
import { TOP_BAR_BANNER } from './src/components/topbarBanner.config.ts';
import { topbarBannerReservationScript } from '@swmansion/t-rex-ui/topbar-banner';
import { TOP_BAR_BANNER } from './src/components/topbarBanner.config.ts';

const path = require('path');

const lightCodeTheme = require('./src/theme/CodeBlock/highlighting-light.js');
const darkCodeTheme = require('./src/theme/CodeBlock/highlighting-dark.js');
Expand All @@ -22,6 +24,38 @@ function reactNativeWebPlugin() {
};
}

function enrichedHtmlLocalSourcePlugin() {
const librarySource = path.resolve(__dirname, '../src');
return {
name: 'enriched-html-local-source',
configureWebpack(_config, isServer, utils) {
return {
module: {
rules: [
{
test: /\.tsx?$/,
include: librarySource,
use: [utils.getJSLoader({ isServer })],
},
],
},
resolve: {
alias: {
'react-native-enriched-html$': path.resolve(
librarySource,
'index.tsx'
),
// The react-native-enriched-html has separate react and react-dom dependencies in node_modules,
// so React would otherwise be resolved from the repo root and bundled twice.
'react': path.resolve(__dirname, 'node_modules/react'),
'react-dom': path.resolve(__dirname, 'node_modules/react-dom'),
},
},
};
},
};
}

const firstBannerZone = TOP_BAR_BANNER.zones[0];
const bannerReservationHeadTags = firstBannerZone
? [
Expand All @@ -31,7 +65,7 @@ const bannerReservationHeadTags = firstBannerZone
innerHTML: topbarBannerReservationScript(
firstBannerZone.zoneId,
firstBannerZone.contentId,
TOP_BAR_BANNER.hiddenPaths,
TOP_BAR_BANNER.hiddenPaths
),
},
]
Expand Down Expand Up @@ -99,10 +133,13 @@ const config = {

headTags: bannerReservationHeadTags,

clientModules: [require.resolve('./src/clientModules/topbarBannerRefresh.ts')],
clientModules: [
require.resolve('./src/clientModules/topbarBannerRefresh.ts'),
],

plugins: [
reactNativeWebPlugin,
enrichedHtmlLocalSourcePlugin,
function transpileTRexUiTheme() {
return {
name: 'transpile-t-rex-ui-theme',
Expand Down Expand Up @@ -160,9 +197,10 @@ const config = {
dropdownActiveClassDisabled: true,
},
{
href: 'https://github.com/software-mansion/react-native-enriched-html/',
position: 'right',
className: 'header-github',
'href':
'https://github.com/software-mansion/react-native-enriched-html/',
'position': 'right',
'className': 'header-github',
'aria-label': 'GitHub repository',
},
],
Expand Down
1 change: 0 additions & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
"react": "19.1.1",
"react-dom": "19.1.1",
"react-native": "0.86.0",
"react-native-enriched-html": "1.1.0",
"react-native-web": "0.21.2"
},
"resolutions": {
Expand Down
12 changes: 12 additions & 0 deletions docs/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"extends": "../tsconfig.base.json",
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@site/*": ["./*"],
"react-native-enriched-html": ["../src/index.tsx"],
},
},
"exclude": [".docusaurus", "build"],
"include": ["src/examples"],
}
Loading
Loading