Once you have cloned the repo, the
contents folder contains a few key areas:
docs= all of the documentation for PostHog's platform
handbook= the PostHog company handbook
blog= our blog posts
Inside each of these are a series of markdown files for you to edit.
New changes should be created as a Pull Request.
To get changes into production, the website deploys automatically from
master. The build takes 5-10 minutes.
At the top of the file, it is necessary to have the following for the page to appear:
--- title: Example Title sidebar: Example Sidebar showTitle: true ---
sidebar is the sidebar menu that will attach. You can see a list of available sidebars in
/src/sidebars/sidebars.json. You can choose not to have a sidebar by setting this to
showTitle should be left to true.
For our markdown, we use gatsby-remark-copy-linked-files.
This copies local files linked to/from Markdown files to the root directory.
Place images in
To include an image in a markdown file, you can now use nice local references, ie:
Note that it may be necessary to change the folder depending on your file structure, ie if you needed to go up two directories, it could be:
Notice the extra
For most images, this plugin will automatically generate a range of sizes to optimize for the device and they'll even have a blurry low filesize loading image created to hold the place. Pretty cool.
Once you've made a new markdown file, you should link to it from the sidebar where appropriate.
The sidebar is generated from