Skip to content

🎥 Make videos programmatically with React

New Code Hike Template

Jonny Burgere772eea6cd5d
diff --git a/packages/create-video/src/templates.tsx b/packages/create-video/src/templates.tsx
index c91a6c0193..fd4fdc4b67 100644
--- a/packages/create-video/src/templates.tsx
+++ b/packages/create-video/src/templates.tsx
@@ -42,7 +42,8 @@ export type Template = {
| 'tailwind'
| 'overlay'
| 'stargazer'
- | 'tiktok';
+ | 'tiktok'
+ | 'code-hike';
defaultBranch: string;
featuredOnHomePage: string | null;
previewURL?: string | null;
@@ -338,6 +339,30 @@ export const FEATURED_TEMPLATES: Template[] = [
defaultBranch: 'main',
featuredOnHomePage: null,
},
+ {
+ homePageLabel: 'Code Hike',
+ shortName: 'Code Hike',
+ org: 'remotion-dev',
+ repoName: 'template-code-hike',
+ description: 'Beautiful code animations',
+ longerDescription: (
+ <>
+ Add code snippets and animate between them using{' '}
+ <a href="https://codehike.org/">Code Hike</a>. Supports many languages,
+ TypeScript error annotations, and many themes.
+ </>
+ ),
+ promoVideo: {
+ muxId: 'fKwnpTAOqvnZpu00fwEezi00cpF3927NumGcS1gGdUj8A',
+ width: 1080,
+ height: 1080,
+ },
+ cliId: 'code-hike' as const,
+ type: 'video' as const,
+ defaultBranch: 'main',
+ featuredOnHomePage: null,
+ previewURL: 'https://template-code-hike.vercel.app/',
+ },
{
homePageLabel: 'Stargazer',
shortName: 'Stargazer',
diff --git a/packages/docs/src/components/IconForTemplate.tsx b/packages/docs/src/components/IconForTemplate.tsx
index 413710f5ae..7d3e6f58c0 100644
--- a/packages/docs/src/components/IconForTemplate.tsx
+++ b/packages/docs/src/components/IconForTemplate.tsx
@@ -1,6 +1,7 @@
import type {Template} from 'create-video';
import React from 'react';
import {Blank} from './icons/blank';
+import {CodeHike} from './icons/code-hike';
import {Cubes} from './icons/cubes';
import {JSIcon} from './icons/js';
import {NextIcon} from './icons/next';
@@ -16,8 +17,8 @@ import {TTSIcon} from './icons/tts';
import {Waveform} from './icons/waveform';
export const IconForTemplate: React.FC<{
- template: Template;
- scale: number;
+ readonly template: Template;
+ readonly scale: number;
}> = ({template, scale = 1}) => {
if (template.cliId === 'hello-world') {
return (
@@ -150,6 +151,10 @@ export const IconForTemplate: React.FC<{
return <TikTok style={{height: scale * 36}} />;
}
+ if (template.cliId === 'code-hike') {
+ return <CodeHike style={{height: scale * 36}} />;
+ }
+
return (
<Blank
style={{
diff --git a/packages/docs/src/components/icons/code-hike.tsx b/packages/docs/src/components/icons/code-hike.tsx
new file mode 100644
index 0000000000..b163ab093c
--- /dev/null
+++ b/packages/docs/src/components/icons/code-hike.tsx
@@ -0,0 +1,15 @@
+import type {SVGProps} from 'react';
+import React from 'react';
+
+export const CodeHike: React.FC<SVGProps<SVGSVGElement>> = (props) => {
+ return (
+ <svg {...props} viewBox="-100 -100 200 200" fill="currentColor">
+ <path d="M 70 60 L 42 -27 L 72 -27 L 100 60 Z" />
+ <path d="M 20.419540229885058 40.05357142857142 L 42 -27 L 72 -27 L 50.41954022988506 40.05357142857142 Z" />
+ <path d="M 20.419540229885058 40.05357142857142 L -15 -70 L 15 -70 L 50.41954022988506 40.05357142857142 Z" />
+ <path d="M -50.41954022988506 40.05357142857142 L -15 -70 L 15 -70 L -20.419540229885058 40.05357142857142 Z" />
+ <path d="M -50.41954022988506 40.05357142857142 L -72 -27 L -42 -27 L -20.419540229885058 40.05357142857142 Z" />
+ <path d="M -100 60 L -72 -27 L -42 -27 L -70 60 Z" />
+ </svg>
+ );
+};