Posthog.com
Official docs, website, and handbook for PostHog.
Install / Use
/learn @PostHog/Posthog.comREADME
PostHog.com - Website, docs, blog, and handbook
<p align="center"> <a href='http://makeapullrequest.com'><img alt='PRs Welcome' src='https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=shields'/></a> <img alt="GitHub contributors" src="https://img.shields.io/github/contributors/posthog/posthog.com"/> <a href='https://posthog.com/community'><img alt="Join Community" src="https://img.shields.io/badge/community-join-blue"/></a> <img alt="GitHub commit activity" src="https://img.shields.io/github/commit-activity/m/posthog/posthog.com"/> <img alt="GitHub closed pull requests" src="https://img.shields.io/github/issues-pr-closed/posthog/posthog.com"/> </p> <p align="center"> <a href="https://app.posthog.com/home#supportModal">Support</a> - <a href="https://posthog.com/roadmap">Roadmap</a> - <a href="https://github.com/PostHog/posthog.com/issues/new">Open an issue</a> - <a href="https://github.com/PostHog/posthog.com/blob/master/STYLEGUIDE.md">Style guide</a> </p>This is the repository for the PostHog website. We treat it like a product. It contains:
- All of our written content and visuals including product features, manuals, docs, blogs, case studies, tutorials, and the handbook
- Features like questions and answers (using Squeak!), job listings (using Ashby), pricing calculator, roadmap, API docs, and more
- All the components, templates, logic, and styling to make this work, look pretty, and spark joy
Table of contents
Quick start
AGENTS.mdis equipped with instructions for the most fundamental parts of running the app.If you find places where current documentation is lacking, email cory@posthog.com with the subject, "AGENTS.md".
-
Pre-installation
Install Node (version 22) - if you installed Node using nvm, you can run
nvm useto automatically switch to the correct version.Install
pnpm. The easiest way to do this is viacorepack use pnpm@latest-10. -
Start developing
Clone the repo and navigate into your new site’s directory:
git clone git@github.com:PostHog/posthog.com.git && cd posthog.com/If you're using an Apple Silicon Mac (M1 or later) you'll need to run the following commands:
rm -rf ./node_modules brew install vipsThen install the site dependencies, and start it up:
pnpm install pnpm startTip: Seeing a discrepancy between local development and staging/production? Preview the production build locally by running
gatsby build && gatsby serve -
Open the source code and start editing!
Your site is now running at
http://localhost:8001!Note: You'll also see a second link:
http://localhost:8001/___graphql. This is a tool you can use to experiment with querying your data. Learn more about using this tool in the Gatsby tutorial.
See full instructions on developing PostHog.com locally in our manual.
Advanced setup
Debugging errors on start
- Pull the latest changes from
master - Run
pnpm clean && mkdir .cache & pnpm startor deletenode_modulesand.cache - Make sure you're not in an activated flox environment for a different project
- Check builds are passing in deployment to Vercel
Working on /docs/api?
The site will load the API schema from US Cloud by default. You can override this to use your local PostHog instance with an env var:
POSTHOG_OPEN_API_SPEC_URL="http://127.0.0.1:8000/api/schema/" pnpm start
Want Ashby job listings or GitHub contributors to load?
You’ll need to set environment variables for these. See (private) instructions for this.
Developing the posts section
To see your local version of the posts section, /posts needs to be visited directly (http://localhost:8001/posts)
Developing the merch store
Additional environment variables are needed to develop the merch store:
SHOPIFY_APP_PASSWORDGATSBY_MYSHOPIFY_URLGATSBY_SHOPIFY_STOREFRONT_TOKEN
Currently, these environment variables are excluded from Vercel preview builds to disable merch store node creation and speed up build times on non-merch related PRs.
Dynamic open graph images
To develop a dynamic open graph image:
- Run
pnpm buildwith both theASHBY_API_KEYandGITHUB_API_KEYset. - In
gatsby/onPostBuild.ts, temporarily comment out the following:if (process.env.VERCEL_GIT_COMMIT_REF !== 'master') return - Find the generated open graph image in
public/og-images/
Contributing
We <3 contributions big and small. In priority order (although everything is appreciated) with the most helpful first:
- Ask a question in our community
- Submit bug reports and give us feedback in the app!
- Vote on features or get early access to beta functionality in our roadmap
- Open a PR
- Read our instructions above on developing PostHog.com locally
- Read more detailed instructions in our manual
- For basic edits, go to the file in GitHub and click the edit button (pencil icon)
- Open an issue or content idea
Related Skills
claude-opus-4-5-migration
104.6kMigrate prompts and code from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5
frontend-design
104.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
Agent Development
104.6kThis skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
Command Development
104.6kThis skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
