PreLaunch allows you to easily customize all the text content in your application. This document will guide you through the different ways to modify content, from simple text changes to creating custom content components.
You can then use this component to display Markdown content:
Copy
<MarkdownContent content={`# Welcome to PreLaunchThis is a **rich text** content block with:- Bullet points- _Italic text_- And more formatting options`} />
To customize SEO metadata for your pages, modify the metadata export in your page files:
Copy
// app/about/page.tsximport type { Metadata } from 'next';export const metadata: Metadata = { title: 'About Us | PreLaunch', description: 'Learn more about PreLaunch and our mission to help validate product ideas.', openGraph: { title: 'About PreLaunch', description: 'Learn more about PreLaunch and our mission to help validate product ideas.', images: ['/images/about-og.jpg'], },};export default function AboutPage() { // Your page content...}
For legal pages like Privacy Policy and Terms of Service, you can create dedicated page components:
Copy
// app/privacy-policy/page.tsximport { Metadata } from 'next';export const metadata: Metadata = { title: 'Privacy Policy | PreLaunch', description: 'Our privacy policy and data practices.',};export default function PrivacyPolicyPage() { return ( <div className="privacy-policy-page"> <h1>Privacy Policy</h1> <div className="content"> {/* Your privacy policy content here */} <h2>1. Information We Collect</h2> <p>...</p> <h2>2. How We Use Your Information</h2> <p>...</p> {/* More sections... */} </div> </div> );}
How do I add new text that doesn't exist in the translation files?
First, add the new text as a key-value pair in the appropriate translation file (e.g., locales/en/common.json). Then, use the useTranslations hook to access and display the text in your component.
Can I use HTML in my translation strings?
The translation system doesn’t directly support HTML tags. Instead, break down the content into smaller pieces or use components for more complex layouts. For rich text, consider using Markdown with the react-markdown package.
How do I create a new page with custom content?
Create a new file in the appropriate location in the app/ directory
Add any required translation keys to your translation files
Create your page component with the desired content and layout
Use the useTranslations hook to access localized text