Files
yoga/website/contents/contributing/writing-documentation.md
Emil Sjölander 056b75858c Tweak documentation
Reviewed By: danielbuechele

Differential Revision: D7009695

fbshipit-source-id: 145eca292e5cf95413caf5bc81b033419adb67a1
2018-02-16 07:22:05 -08:00

1.4 KiB

path, title, hasPlayground
path title hasPlayground
contributing/writing-documentation Writing Documentation false

Writing Documentation

Documentation pages are generated from Markdown files in contents/. The files are organized in 4 sections/folders (getting-started, properties, examples, contributing) which are dynamically listed on the docs overview page. The Markdown files should contain a header with metadata.

---
path: "docs/flexDirection"
title: "Flex Direction"
hasPlayground: true
initialPlayground: eyJ3aWR0aCI6IjYwMCIsImhlaWdodCI6NTAwLCJjaGlsZHJlbiI6W3t9LHt9LHt9XX0=
---
  • The path indicates the URL path this page will be available at.
  • The title is used as the page's HTML-title and when referencing the file from the documentation overview.
  • The hasPlayground property indicates whether this documentation has an associated playground to test out the documented feature.
  • The initialPlayground property is only relevant for documentation pages with playgrounds and contains the initial playground state. This base64 string is a reference to the hash (content after #) of a playground url.

Within the markdown of a documentation page which has an associated playground you can add controls to let the user play around with the feature directly from the documenation page.

<controls prop="alignContent"></controls>