Skip to content
This repository has been archived by the owner on Mar 28, 2020. It is now read-only.

docs: use embedmd to display example code blocks #1904

Open
hongchaodeng opened this issue Feb 4, 2018 · 1 comment
Open

docs: use embedmd to display example code blocks #1904

hongchaodeng opened this issue Feb 4, 2018 · 1 comment

Comments

@hongchaodeng
Copy link
Member

Currently in our docs we reference to the example code under example/. This is to keep the example code in sync, organized, and reusable. If we simply put those code blocks in the docs, it is known that those examples would get dismissed in code changes. However, it makes user experience uncomfortable. It is still preferred to have the code blocks to read without jumping links.

There is a tool called embedmd recommend by @brancz . It enables us to references code blocks to the example code without losing the sight of it in md doc files.

@brancz
Copy link

brancz commented Feb 5, 2018

Best thing is: we actually have end-to-end tests for our examples, that way we don't only know that the yaml is correct, but also that the example actually works as intended (we don't have this for all, but for example for the getting started, that way we can always be confident the getting started works).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants