You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Clean up cookbook toc and add it to learn dropdown (vuejs#1481)
* clean up cookbook toc and add it to learn dropdown
* clean up intro page and remove warning, make the guidelines for contributing more cohesive with the explanation of recipes
* make the cookbook more clear in the intro title, remove redundant blog title
* Fix typo in cookbook intro
* add in beta tags and header to sidebar
Copy file name to clipboardExpand all lines: src/v2/cookbook/index.md
+59-13Lines changed: 59 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -4,10 +4,6 @@ type: cookbook
4
4
order: 0
5
5
---
6
6
7
-
## WORK IN PROGRESS
8
-
9
-
<pclass="tip">This cookbook is still in its very early stages. At this point, we will not be linking to it from anywhere else. Pages may be removed or reorganized at any time. Even the goals and overall format are still in flux.</p>
10
-
11
7
## The Cookbook vs the Guide
12
8
13
9
How is the cookbook different from the guide? Why is this necessary?
@@ -20,22 +16,72 @@ How is the cookbook different from the guide? Why is this necessary?
20
16
21
17
***Exploring the Ecosystem**: For advanced features, we assume some ecosystem knowledge. For example, if you want to use single-file components in Webpack, we don't explain how to configure the non-Vue parts of the Webpack config. In the cookbook, we have the space to explore these ecosystem libraries in more depth - at least to the extent that is universally useful for Vue developers.
22
18
23
-
## Guidelines for Recipes
19
+
## Cookbook Contributions
20
+
21
+
### What we're looking for
22
+
23
+
The Cookbook gives developers examples to work off of that both cover common or interesting use cases, and also progressively explain more complex detail. Our goal is to move beyond a simple introductory example, and demonstrate concepts that are more widely applicable, as well as some caveats to the approach.
24
+
25
+
If you're interested in contributing, please initiate collaboration by filing an issue under the tag **cookbook idea** with your concept so that we can help guide you to a successful pull request. After your idea has been approved, please follow the template below as much as possible. Some sections are required, and some are optional. Following the numerical order is strongly suggested, but not required.
24
26
25
27
Recipes should generally:
26
28
27
-
> 1. Solve a specific, common problem
29
+
> * Solve a specific, common problem
30
+
> * Start with the simplest possible example
31
+
> * Introduce complexities one at a time
32
+
> * Link to other docs, rather than re-explaining concepts
33
+
> * Describe the problem, rather than assuming familiarity
34
+
> * Explain the process, rather than just the end result
35
+
> * Explain the pros and cons of your strategy, including when it is and isn't appropriate
36
+
> * Mention alternative solutions, if relevant, but leave in-depth explorations to a separate recipe
37
+
38
+
### Simple Example
39
+
40
+
_required_
41
+
42
+
1. Articulate the problem in a sentence or two.
43
+
2. Explain the simplest possible solution in a sentence or two.
44
+
3. Show a small code sample.
45
+
4. Explain what this accomplishes in a sentence.
46
+
47
+
### Details about the Value
48
+
49
+
_required_
50
+
51
+
1. Address common questions that one might have while looking at the example. (Blockquotes are great for this)
52
+
2. Show examples of common missteps and how they can be avoided.
53
+
3. Show very simple code samples of good and bad patterns.
54
+
4. Discuss why this may be a compelling pattern. Links for reference are not required but encouraged.
55
+
56
+
### Real-World Example
57
+
58
+
_required_
59
+
60
+
Demonstrate the code that would power a common or interesting use case, either by:
61
+
62
+
1. Walking through a few terse examples of setup, or
63
+
2. Embedding a codepen/jsfiddle example
64
+
65
+
If you choose to do the latter, you should still talk through what it is and does.
66
+
67
+
### Additional Context
68
+
69
+
_optional_
70
+
71
+
It's extremely helpful to write a bit about this pattern, where else it would apply, why it works well, and run through a bit of code as you do so or give people further reading materials here.
72
+
73
+
### When To Avoid This Pattern
28
74
29
-
> 2. Start with the simplest possible example
75
+
_optional_
30
76
31
-
> 3. Introduce complexities one at a time
77
+
This section is not required, but heavily recommended. It won't make sense to write it for something very simple such as toggling classes based on state change, but for more advanced patterns like mixins it's vital. The answer to most questions about development is ["It depends!"](https://codepen.io/rachsmith/pen/YweZbG), this section embraces that. Here, we'll take an honest look at when the pattern is useful and when it should be avoided, or when something else makes more sense.
32
78
33
-
> 4. Link to other docs, rather than re-explaining concepts
79
+
### Alternative Patterns
34
80
35
-
> 5. Describe the problem, rather than assuming familiarity
81
+
_required_
36
82
37
-
> 6. Explain the process, rather than just the end result
83
+
This section is required when you've provided the section above about avoidance. It's important to explore other methods so that people told that something is an antipattern in certain situations are not left wondering. In doing so, consider that the web is a big tent and that many people have different codebase structures and are solving different goals. Is the app large or small? Are they integrating Vue into an existing project, or are they building from scratch? Are their users only trying to achieve one goal or many? Is there a lot of asynchronous data? All of these concerns will impact alternative implementations. A good cookbook recipe gives developers this context.
38
84
39
-
> 7. Explain the pros and cons of your strategy, including when it is and isn't appropriate
85
+
## Thank you
40
86
41
-
> 8. Mention alternative solutions, if relevant, but leave in-depth explorations to a separate recipe
87
+
It takes time to contribute to documentation, and if you spend the time to submit a PR to this section of our docs, you do so with our gratitude.
Copy file name to clipboardExpand all lines: src/v2/cookbook/serverless-blog.md
-2Lines changed: 0 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -4,8 +4,6 @@ type: cookbook
4
4
order: 5
5
5
---
6
6
7
-
# Create a CMS-Powered Blog Using Vue.js
8
-
9
7
So you've just launched your Vue.js website, congrats! Now you want to add a blog that quickly plugs into your website and you don't want to have to spin up a whole server just to host a Wordpress instance (or any DB-powered CMS for that matter). You want to just be able to add a few Vue.js blog components and some routes and have it all just work, right? What you're looking for a blog that's powered entirely by API's you can consume directly from your Vue.js application. This tutorial will teach you how to do just that, let's dive in!
10
8
11
9
We're going to quickly build a CMS-powered blog with Vue.js. It uses [ButterCMS](https://buttercms.com/), an API-first CMS that lets you manage content using the ButterCMS dashboard and integrate our content API into your Vue.js app. You can use ButterCMS for new or existing Vue.js projects.
0 commit comments