Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 8 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 45 additions & 0 deletions packages/docs-redirect/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# @revideo/docs-redirect

A tiny redirect service that replaces the old documentation site at
`docs.re.video`. Every old URL is forwarded with a `301` to its new home under
`https://midrender.com/revideo/docs`.

## How it works

- **`data/old-urls.txt`** — the authoritative list of old paths, a snapshot of
`docs.re.video`'s `sitemap.xml` (286 URLs).
- **`src/build-map.mjs`** — generates `src/redirects.json` by mapping every old
path to its new page. It reads the current docs (`packages/docs/src/content`)
to compute new URLs and to guarantee no redirect points at a 404:
- prose pages are mapped explicitly (the old Docusaurus site used custom
`slug`s, and `motion-canvas/*` became `animations/*`);
- TypeDoc API pages move from `/api/<pkg>/<module>/<Symbol>` to
`/api-reference/<pkg>/<module>/<kind>/<Symbol>`, resolved by locating each
symbol in the new tree;
- anything without an exact new page (a handful of removed API symbols such as
the `meta` module and `Presenter`) falls back to the closest section index.
- **`src/redirects.json`** — the generated map (committed). Regenerate with
`npm run build` whenever the docs are restructured.
- **`src/server.mjs`** — a zero-dependency HTTP server that looks up the request
path and issues the redirect. Unknown paths fall back to the docs home. Runs
under Node or Bun.

## Usage

```bash
npm run build # regenerate src/redirects.json from the current docs
npm start # start the server (PORT env, default 8080)
```

Health check: `GET /healthz` → `200 ok`.

## Deploying

Point `docs.re.video` at this service (any Node/Bun host or container). The
server is stateless and keeps the map in memory. Example:

```bash
PORT=8080 node src/server.mjs
# or
PORT=8080 bun src/server.mjs
```
286 changes: 286 additions & 0 deletions packages/docs-redirect/data/old-urls.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,286 @@
/
/3d-animations-with-threejs
/api/2d
/api/2d/code
/api/2d/code/CodeFragment
/api/2d/code/CodeFragmentDrawingInfo
/api/2d/code/CodeHighlighter
/api/2d/code/CodeScope
/api/2d/code/CodeSignalContext
/api/2d/code/CodeSignalHelpers
/api/2d/code/HighlightResult
/api/2d/code/LezerHighlighter
/api/2d/code/RawCodeFragment
/api/2d/components
/api/2d/components/Audio
/api/2d/components/Bezier
/api/2d/components/BezierOverlayInfo
/api/2d/components/Circle
/api/2d/components/CircleProps
/api/2d/components/Code
/api/2d/components/CodeProps
/api/2d/components/CubicBezier
/api/2d/components/CubicBezierProps
/api/2d/components/Curve
/api/2d/components/CurveProps
/api/2d/components/DrawHooks
/api/2d/components/DrawTokenHook
/api/2d/components/FunctionComponent
/api/2d/components/Grid
/api/2d/components/GridProps
/api/2d/components/Icon
/api/2d/components/IconProps
/api/2d/components/Img
/api/2d/components/ImgProps
/api/2d/components/JSXProps
/api/2d/components/Knot
/api/2d/components/KnotProps
/api/2d/components/Latex
/api/2d/components/LatexProps
/api/2d/components/Layout
/api/2d/components/LayoutProps
/api/2d/components/Line
/api/2d/components/LineProps
/api/2d/components/Media
/api/2d/components/MediaProps
/api/2d/components/Node
/api/2d/components/NodeConstructor
/api/2d/components/NodeProps
/api/2d/components/Path
/api/2d/components/PathProps
/api/2d/components/Polygon
/api/2d/components/PolygonProps
/api/2d/components/QuadBezier
/api/2d/components/QuadBezierProps
/api/2d/components/Ray
/api/2d/components/RayProps
/api/2d/components/Rect
/api/2d/components/RectProps
/api/2d/components/Rive
/api/2d/components/RiveProps
/api/2d/components/SVG
/api/2d/components/SVGDocument
/api/2d/components/SVGDocumentData
/api/2d/components/SVGProps
/api/2d/components/SVGShape
/api/2d/components/SVGShapeData
/api/2d/components/Shape
/api/2d/components/ShapeProps
/api/2d/components/Spline
/api/2d/components/SplineProps
/api/2d/components/Txt
/api/2d/components/TxtProps
/api/2d/components/Video
/api/2d/components/VideoProps
/api/2d/components/View2D
/api/2d/components/View2DProps
/api/2d/curves
/api/2d/curves/CircleSegment
/api/2d/curves/CubicBezierSegment
/api/2d/curves/CurveDrawingInfo
/api/2d/curves/CurvePoint
/api/2d/curves/CurveProfile
/api/2d/curves/KnotInfo
/api/2d/curves/LineSegment
/api/2d/curves/Polynomial
/api/2d/curves/Polynomial2D
/api/2d/curves/QuadBezierSegment
/api/2d/curves/Segment
/api/2d/decorators
/api/2d/decorators/FiltersSignalContext
/api/2d/decorators/PropertyMetadata
/api/2d/partials
/api/2d/partials/Filter
/api/2d/partials/FilterProps
/api/2d/partials/Gradient
/api/2d/partials/GradientProps
/api/2d/partials/GradientStop
/api/2d/partials/Pattern
/api/2d/partials/PatternProps
/api/2d/scenes
/api/2d/scenes/Scene2D
/api/2d/utils
/api/core
/api/core/app
/api/core/app/AssetInfo
/api/core/app/LogLevel
/api/core/app/LogPayload
/api/core/app/Logger
/api/core/app/PlaybackState
/api/core/app/PlaybackStatus
/api/core/app/Player
/api/core/app/PlayerSettings
/api/core/app/PlayerState
/api/core/app/Presenter
/api/core/app/PresenterInfo
/api/core/app/PresenterSettings
/api/core/app/PresenterState
/api/core/app/Project
/api/core/app/ProjectMetadata
/api/core/app/ProjectSettings
/api/core/app/Renderer
/api/core/app/RendererResult
/api/core/app/RendererSettings
/api/core/app/RendererState
/api/core/app/SharedWebGLContext
/api/core/app/Stage
/api/core/app/StageSettings
/api/core/app/Versions
/api/core/decorators
/api/core/events
/api/core/events/AsyncEventDispatcher
/api/core/events/AsyncEventHandler
/api/core/events/EventDispatcher
/api/core/events/EventDispatcherBase
/api/core/events/EventHandler
/api/core/events/FlagDispatcher
/api/core/events/Subscribable
/api/core/events/SubscribableValueEvent
/api/core/events/ValueDispatcher
/api/core/exporter
/api/core/exporter/Exporter
/api/core/exporter/ExporterClass
/api/core/exporter/FFmpegExporterClient
/api/core/exporter/WasmExporter
/api/core/flow
/api/core/flow/EveryCallback
/api/core/flow/EveryTimer
/api/core/flow/LoopCallback
/api/core/media
/api/core/media/AudioData
/api/core/media/AudioManager
/api/core/meta
/api/core/meta/BoolMetaField
/api/core/meta/ColorMetaField
/api/core/meta/EnumMetaField
/api/core/meta/ExporterMetaField
/api/core/meta/MetaField
/api/core/meta/MetaOption
/api/core/meta/NumberMetaField
/api/core/meta/RangeMetaField
/api/core/meta/StringMetaField
/api/core/meta/Vector2MetaField
/api/core/plugin
/api/core/plugin/Plugin
/api/core/scenes
/api/core/scenes/CachedSceneData
/api/core/scenes/FullSceneDescription
/api/core/scenes/GeneratorScene
/api/core/scenes/Inspectable
/api/core/scenes/LifecycleEvents
/api/core/scenes/Random
/api/core/scenes/Scene
/api/core/scenes/SceneConstructor
/api/core/scenes/SceneDescription
/api/core/scenes/SceneDescriptionReload
/api/core/scenes/SceneRenderEvent
/api/core/scenes/SceneState
/api/core/scenes/Slide
/api/core/scenes/Slides
/api/core/scenes/ThreadGeneratorFactory
/api/core/scenes/Threadable
/api/core/scenes/Variables
/api/core/signals
/api/core/signals/CompoundSignalContext
/api/core/signals/Computed
/api/core/signals/ComputedContext
/api/core/signals/DependencyContext
/api/core/signals/PromiseHandle
/api/core/signals/Signal
/api/core/signals/SignalContext
/api/core/signals/SignalExtensions
/api/core/signals/SignalGetter
/api/core/signals/SignalSetter
/api/core/signals/SignalTween
/api/core/threading
/api/core/threading/Promisable
/api/core/threading/Thread
/api/core/threading/ThreadsCallback
/api/core/threading/ThreadsFactory
/api/core/transitions
/api/core/tweening
/api/core/tweening/InterpolationFunction
/api/core/tweening/Spring
/api/core/tweening/TimingFunction
/api/core/types
/api/core/types/BBox
/api/core/types/Center
/api/core/types/Direction
/api/core/types/Matrix2D
/api/core/types/Origin
/api/core/types/Spacing
/api/core/types/Type
/api/core/types/Vector2
/api/core/types/WebGLConvertible
/api/core/utils
/api/core/utils/DetailedError
/api/core/utils/ExperimentalError
/api/core/utils/Reference
/api/core/utils/ReferenceReceiver
/api/player-react/player
/api/renderer/renderVideo
/category/api-reference
/category/building-web-apps
/category/code-snippets
/category/common-issues
/category/designing-videos
/category/get-help
/category/motion-canvas-guide
/category/performance-considerations
/category/platform
/category/revideoffmpeg
/category/revideoplayer-react
/category/revideorenderer
/category/upgrading
/category/usage-guide
/changing-object-size-over-time-with-signals
/code-animations
/common-issues/ffmpeg
/common-issues/slow-rendering
/configuration
/custom-components
/custom-font
/decoders
/designing-animations
/emojis
/experimental
/ffmpeg/concatenateMedia
/ffmpeg/mergeAudioWithVideo
/filters-and-effects
/flow
/get-help/discord
/hierarchy
/hls-video
/installation-and-setup
/layouts
/logging
/logical-separation
/moving-manipulating-objects
/node-parent-reloading
/parameterized-video
/platform/introduction
/platform/render-endpoint
/positioning
/preview-with-player
/project-structure
/project-variables
/random-values
/references
/render-endpoint
/renderer/renderPartialVideo
/rendering-in-production
/rendering-videos
/rive-animations
/saas-template
/search
/shaders
/signals
/spawners
/streaming-text
/time-events
/transitions
/transparent-video
/tweening
/understanding-scene-flow
/upgrading/from_0.2.x_to_0.3
/upgrading/from_0.3.x_to_0.4
14 changes: 14 additions & 0 deletions packages/docs-redirect/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "@revideo/docs-redirect",
"version": "0.0.0",
"private": true,
"description": "Redirect service that forwards old docs.re.video URLs to the new docs under midrender.com/revideo/docs.",
"type": "module",
"scripts": {
"build": "node src/build-map.mjs",
"start": "node src/server.mjs"
},
"engines": {
"node": ">=18"
}
}
Loading
Loading