Skip to content

Commit 20e2c50

Browse files
authored
Merge pull request #46 from cloudflare/docs-engine-content
Docs engine content updates
2 parents 4ba1e70 + 00f7a31 commit 20e2c50

File tree

22 files changed

+731
-203
lines changed

22 files changed

+731
-203
lines changed

products/docs-engine/src/content/contributors-guide.md renamed to products/docs-engine/src/content/contributing/content-framework.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
2-
order: 3
2+
order: 1
33
---
44

5-
# Contributor’s guide
5+
# Content framework
66

77
This page provides an overview of how best to contribute to Cloudflare’s documentation. This is a living document and will be updated as recommendations change.
88

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
---
2+
order: 0
3+
---
4+
5+
# Development setup
6+
7+
<Aside>
8+
9+
__Note for Cloudflare employees__
10+
11+
Follow the [Migrate a Product](/how-to-guides/migrate-a-product) how-to guide instead.
12+
13+
The content below is here for completeness, and describes the theoretical way to set up the Docs Engine with _any_ project. At Cloudflare we’ve decided to follow the monorepo approach for our docs content, putting all of our docs content inside [@cloudflare/cloudflare-docs](http://github.com/cloudflare/cloudflare-docs) rather than a per-product repo. As such, the how-to guide listed above includes the specific instructions for setting up a development environment with our monorepo.
14+
15+
</Aside>
16+
17+
The basic steps for setting up a development are as follows.
18+
19+
1. Clone [@cloudflare/cloudflare-docs-engine](http://github.com/cloudflare/cloudflare-docs-engine) and your repo (`@example-username/my-docs-content` below):
20+
21+
```sh
22+
~/ $ git clone [email protected]:cloudflare/cloudflare-docs-engine.git
23+
~/ $ git clone [email protected]:example-username/my-docs-content.git
24+
```
25+
26+
2. `cd` into `cloudflare-docs-engine`, run `npm link`, then return to the parent directory.
27+
28+
```sh
29+
~/ $ cd cloudflare-docs-engine
30+
~/cloudflare-docs-engine $ npm link
31+
~/cloudflare-docs-engine $ cd ..
32+
```
33+
34+
3. `cd` into `my-docs-content`:
35+
36+
```sh
37+
~/ $ cd my-docs-content
38+
```
39+
40+
5. Inside your project’s folder, link the engine:
41+
42+
```sh
43+
~/my-docs-content $ npm link cloudfare-docs-engine
44+
```
45+
46+
6. Run the engine’s [`bootstrap` command](https://github.com/cloudflare/cloudflare-docs-engine/blob/765bc30127b0e80b570aade7044036925928c3ea/bin/commands.sh#L19-L39):
47+
48+
```sh
49+
~/my-docs-content $ npm run bootstrap
50+
```
51+
52+
7. Run the local development server:
53+
54+
```sh
55+
~/my-docs-content $ npm run develop
56+
```
57+
58+
8. Open up `localhost:8000` in your browser to see your docs site.
59+
60+
At this point, you can make changes to the Markdown files inside the contect directory (e.g. `my-docs-content/src/content`) to improve your docs site.
61+
62+
<Aside>
63+
64+
__Note:__ Unfortunately, for now you’ll need to stop and restart `npm run develop` every time you make changes. This is something we’re urgently looking to fix and can be tracked [in this Github issue](https://github.com/cloudflare/cloudflare-docs-engine/issues/279), which also includes a workaround which may help in the interim.
65+
66+
</Aside>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
type: overview
3+
order: 3
4+
---
5+
6+
# Contributing
7+
8+
<DirectoryListing path="/contributing"/>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
title: To Docs Engine
3+
order: 2
4+
---
5+
6+
# Contribute to the Docs Engine
7+
8+
## Background
9+
10+
The Cloudflare Docs Engine is based on [Gatsby](https://www.gatsbyjs.com), and enables developers to quickly build out docs sites by allowing them to focus on the Markdown content.
11+
12+
Authors can leverage the power of MDX by building custom compontents or utilize the powerful [built-in components](/reference/markdown).
13+
14+
## Contributing
15+
16+
To contribute, just make a pull request on [@cloudflare/cloudflare-docs-engine](https://github.com/cloudflare/cloudflare-docs-engine).
17+
18+
There are a number of [open issues](https://github.com/cloudflare/cloudflare-docs-engine/issues) we would love the community’s help with solving.
19+
20+
## More to come
21+
22+
There are a number of meaty issues we’re really excited to tackle with the community. Stay tuned for more information about those here.

products/docs-engine/src/content/example-pages/index.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

products/docs-engine/src/content/markdown/code-block-examples.md renamed to products/docs-engine/src/content/examples/code-block-examples.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Code blocks inside [Docs Engine Markdown](/reference/markdown) offer a variety of custom presentation mechanisms. This page contains practical examples for inspiration.
44

5-
Learn more about [using code blocks inside Markdown](/reference/markdown#codeblocks).
5+
Learn more about [using code blocks inside Markdown](/reference/markdown#code-blocks).
66

77
--------------------------------
88

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
type: overview
3+
order: 5
4+
---
5+
6+
# Examples
7+
8+
<DirectoryListing path="/examples"/>
File renamed without changes.
File renamed without changes.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
order: 3
3+
---
4+
5+
# Example pages
6+
7+
Use these as a starting point for writing consistent docs.
8+
9+
<DirectoryListing path="/examples/example-pages"/>

0 commit comments

Comments
 (0)