Skip to content

Commit 1897dd1

Browse files
committed
Add Command docs
1 parent 703a215 commit 1897dd1

12 files changed

Lines changed: 83 additions & 9 deletions

File tree

docs/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Peak Statamic Starter Kit Docs
1+
# Peak docs
22

3-
These are the [docs](https://peak.studio1902.nl) repo for Peak. The docs run on https://vuepress.vuejs.org.
3+
These are the [docs](https://peak.studio1902.nl) repo for Peak. The docs run on https://vuepress.vuejs.org.
44

55
## Compile
66

1.5 MB
Binary file not shown.
-12.9 MB
Binary file not shown.
3.71 MB
Binary file not shown.

docs/docs/.vuepress/.temp/pages/features/assets.html.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
</blockquote>
1616
<h2 id="background-images" tabindex="-1"><a class="header-anchor" href="#background-images" aria-hidden="true">#</a> Background images</h2>
1717
<p>Peak comes with a background image snippet you can use to apply responsive images (WebP included) to an elements background. Just use</p>
18-
<div class="language-html ext-html line-numbers-mode"><pre v-pre class="language-html"><code>{{ partial:snippets/background_image image="YOUR_IMAGE" selector="SELECTOR_OF_ELEMENT_THAT_NEEDS_BG_IMAGE" }}
18+
<div class="language-html ext-html line-numbers-mode"><pre v-pre class="language-html"><code>{{ partial:snippets/background_image image="YOUR_IMAGE" class="CLASS_OF_ELEMENT_THAT_NEEDS_BG_IMAGE" }}
1919
</code></pre><div class="line-numbers"><span class="line-number">1</span><br></div></div><p>The predefined sizes used in <code>resources/views/snippets/_background_image.antlers.html</code> are defined in <code>config/statamic/assets.php</code>.</p>
2020
<blockquote>
2121
<p>Note: You can use either a hardcoded image or an image from an asset field.</p>

docs/docs/.vuepress/.temp/pages/other/awesome.html.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
<ul>
44
<li><a href="https://laravel-news.com/statamic-peak" target="_blank" rel="noopener noreferrer">Peak on Laravel News<OutboundLink/></a></li>
55
</ul>
6-
<h2 id="video-s-on-peak" tabindex="-1"><a class="header-anchor" href="#video-s-on-peak" aria-hidden="true">#</a> Video's on Peak</h2>
7-
<div class='embed-container'><iframe src='https://www.youtube.com/embed/79Ist1HrHoA' frameborder='0' allowfullscreen></iframe></div>
86
<h2 id="made-with-peak" tabindex="-1"><a class="header-anchor" href="#made-with-peak" aria-hidden="true">#</a> Made with Peak</h2>
97
<p>This is a collection of sites made with Statamic using Peak:</p>
108
<ul>

docs/docs/.vuepress/.temp/pages/other/configuration-changes.html.vue

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,21 @@
2525
<td>A command to generate all files needed to add a block to the <RouterLink to="/features/page-builder.html#adding-blocks">page builder</RouterLink>.</td>
2626
</tr>
2727
<tr>
28+
<td><code>app/Console/Commands/AddBlock.php</code></td>
29+
<td></td>
30+
<td>A command to generate all files needed to add a block to the <RouterLink to="/features/page-builder.html#adding-blocks">page builder</RouterLink>.</td>
31+
</tr>
32+
<tr>
33+
<td><code>app/Console/Commands/stubs/block.html.stub</code></td>
34+
<td></td>
35+
<td>A stub file for the <code>peak:add-block</code> command.</td>
36+
</tr>
37+
<tr>
38+
<td><code>app/Console/Commands/stubs/fieldset.yaml.stub</code></td>
39+
<td></td>
40+
<td>A stub file for the <code>peak:add-block</code> command.</td>
41+
</tr>
42+
<tr>
2843
<td><code>app/Actions/GenerateSocialImages.php</code></td>
2944
<td></td>
3045
<td>An action to <RouterLink to="/features/social-images-generation.html">generate social images</RouterLink> for entries.</td>
Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,29 @@
11
<template><h1 id="contributing" tabindex="-1"><a class="header-anchor" href="#contributing" aria-hidden="true">#</a> Contributing</h1>
22
<p>Contributions and discussions are always welcome, no matter how large or small. Treat each other with respect. Read the <a href="https://github.com/studio1902/statamic-peak/blob/main/.github/CODE_OF_CONDUCT.md" target="_blank" rel="noopener noreferrer">Code of Conduct<OutboundLink/></a>.</p>
3-
<p>These docs are setup using VuePress by <a href="https://github.com/robertguss/" target="_blank" rel="noopener noreferrer">Robert Guss<OutboundLink/></a>. Thank you so much!</p>
3+
<p>Statamic Peak is a mono repo. If you want to contribute make sure you target files the <code>/dev/</code> folder and run your local install from this folder. When you use valet you can navigate to the folder and type: <code>valet link statamic-peak</code>.</p>
4+
<h2 id="repo-structure" tabindex="-1"><a class="header-anchor" href="#repo-structure" aria-hidden="true">#</a> Repo structure</h2>
5+
<table>
6+
<thead>
7+
<tr>
8+
<th>Location</th>
9+
<th>Purpose</th>
10+
</tr>
11+
</thead>
12+
<tbody>
13+
<tr>
14+
<td><code>/</code></td>
15+
<td>The root level contains the actual kit that gets installed by Statamic.</td>
16+
</tr>
17+
<tr>
18+
<td><code>/docs/</code></td>
19+
<td>The documentation auto deployed to <a href="https://peak.studio1902.nl" target="_blank" rel="noopener noreferrer">peak.studio1902.nl<OutboundLink/></a> running on Netlify.</td>
20+
</tr>
21+
<tr>
22+
<td><code>/dev/</code></td>
23+
<td>The actual development environment. A running Statamic Peak instance.</td>
24+
</tr>
25+
</tbody>
26+
</table>
27+
<h2 id="thanks" tabindex="-1"><a class="header-anchor" href="#thanks" aria-hidden="true">#</a> Thanks</h2>
28+
<p>These docs are initially setup using VuePress 1 by <a href="https://github.com/robertguss/" target="_blank" rel="noopener noreferrer">Robert Guss<OutboundLink/></a>. Thank you so much! Today we run VuePress 2.</p>
429
</template>

docs/docs/.vuepress/config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ module.exports = {
5858
'/features/bard.md',
5959
'/features/browser-appearance.md',
6060
'/features/buttons.md',
61+
'/features/commands.md',
6162
'/features/dark-mode.md',
6263
'/features/forms.md',
6364
'/features/globals.md',
@@ -83,6 +84,7 @@ module.exports = {
8384
'/other/lighthouse.md',
8485
'/other/localization.md',
8586
'/other/reduced-motion.md',
87+
'/other/screencasts.md',
8688
'/other/tags.md',
8789
'/other/toolbar.md',
8890
'/other/upcoming-features.md',

docs/docs/features/commands.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Commands
2+
3+
Peak comes with a growing collection of CLI commands to make tedious recurring tasks easier.
4+
5+
## Add Page Builder Block
6+
This command adds a block to the Peak Page Builder and generates the files needed.
7+
8+
Run `php please peak:add-block` to:
9+
10+
* Add a set to the Page Builder replicator in `resources/fieldsets/page_builder.yaml`.
11+
* Create a fieldset for your block in `resources/fieldsets/{file_name}.yaml`.
12+
* Create a partial with default markup and IDE hinting in `resources/views/page_builder/_{file_name}.antlers.html`.
13+
14+
<div class='embed-container'><iframe src='https://www.youtube.com/embed/wW1D53nG61c' frameborder='0' allowfullscreen></iframe></div>
15+
16+
## Add Collection
17+
This command creates a new collection and scaffolds out all needed files with some sane default markup containing the various Peak utilities we use.
18+
19+
Run `php please peak:add-collection` to:
20+
21+
* Create a collection in `content/collections/{handle}.yaml` with the variables you defined in the CLI.
22+
* Create a blueprint for collection in `resources/blueprints/collections/pages/{handle}.yaml` containing the page builder fieldset and the SEO tab when your collection has a public route defined.
23+
* Optionally create an index partial in `resources/views/{handle}/index.antlers.html` with default Peak markup.
24+
* Optionally set the index template to the entry you chose to mount the collection on.
25+
* Optionally create a show partial in `resources/views/{handle}/show.antlers.html` with default Peak markup.
26+
27+
<div class='embed-container'><iframe src='https://www.youtube.com/embed/JWVDvTFDvHA' frameborder='0' allowfullscreen></iframe></div>

0 commit comments

Comments
 (0)