### Install Peak into Existing Statamic v5 Project Source: https://github.com/studio1902/statamic-peak-docs/blob/main/docs/getting-started/installation.md Installs the Peak starter kit into an existing, clean Statamic v5 project using the Statamic CLI. ```php php please starter-kit:install studio1902/statamic-peak ``` -------------------------------- ### Install Statamic with Peak via CLI Source: https://github.com/studio1902/statamic-peak-docs/blob/main/docs/getting-started/installation.md Installs Statamic and the Peak starter kit using the Statamic CLI. Requires the Statamic CLI to be installed globally. ```bash composer global require statamic/cli statamic new my-site studio1902/statamic-peak ``` -------------------------------- ### Install Dependencies and Watch Frontend Assets (Development) Source: https://github.com/studio1902/statamic-peak-docs/blob/main/docs/getting-started/installation.md Installs project dependencies using npm (`npm i`) and then starts the development server with asset watching (`npm run watch`). This command is used during development to automatically recompile frontend assets whenever changes are detected. ```Bash npm i && npm run watch ``` -------------------------------- ### Install and Run Statamic Peak Docs Source: https://github.com/studio1902/statamic-peak-docs/blob/main/README.md Installs project dependencies using npm and starts the development server for the Statamic Peak documentation. ```bash npm i npm run docs:dev ``` -------------------------------- ### Install and Run Documentation Locally Source: https://github.com/studio1902/statamic-peak-docs/blob/main/docs/other/contributing.md These bash commands are used to set up and run the project's documentation locally. It involves installing dependencies via npm and then starting the development server for the VuePress documentation. ```bash npm i npm run docs:dev ``` -------------------------------- ### Install Presets Screencast Source: https://github.com/studio1902/statamic-peak-docs/blob/main/docs/getting-started/screencasts.md Screencast demonstrating how to install presets in Statamic. ```html
``` -------------------------------- ### Compile Frontend Assets Source: https://github.com/studio1902/statamic-peak-docs/blob/main/docs/getting-started/installation.md Commands to install frontend dependencies and compile assets using npm. 'npm run watch' recompiles assets on changes, and 'npm run build' compiles for production. ```bash npm i && npm run watch ``` ```bash npm run build ``` -------------------------------- ### Compile Frontend Assets for Production Source: https://github.com/studio1902/statamic-peak-docs/blob/main/docs/getting-started/installation.md Compiles the frontend assets for production deployment using npm. This command minifies assets but does not purge unused CSS due to the use of the Tailwind CSS JIT compiler. It should be run on the server before deployment. ```Bash npm run build ``` -------------------------------- ### Page Builder Blocks Source: https://github.com/studio1902/statamic-peak-docs/blob/main/docs/getting-started/commands.md Provides examples of page builder blocks that can be installed and used within the Peak CMS. These blocks enhance content creation with pre-defined components. ```antlers Read more: Link to a related article. Video self hosted: Add a self hosted video. ``` -------------------------------- ### Install Peak Preset Source: https://github.com/studio1902/statamic-peak-docs/blob/main/docs/getting-started/commands.md Installs a full preset into your Peak site. Presets can include collections, blueprints, templates, configuration, pages, and page builder blocks. Run the command to select a preset from the available options. ```php php please peak:install:preset ``` -------------------------------- ### Install Page Builder Block CLI Command Source: https://github.com/studio1902/statamic-peak-docs/blob/main/docs/getting-started/commands.md Installs premade blocks into the Peak Page Builder, updating the page builder replicator, creating fieldsets, and generating partials with bespoke markup. ```php php please peak:install:block ``` -------------------------------- ### Install Peak Set Source: https://github.com/studio1902/statamic-peak-docs/blob/main/docs/getting-started/commands.md Installs premade sets into the Page Builder Article Bard field and generates necessary files. This includes adding a set to the 'article.yaml' fieldset, creating a new fieldset file, and generating a partial with custom markup. ```php php please peak:install:set ``` -------------------------------- ### Install Page Builder Block Command Source: https://github.com/studio1902/statamic-peak-docs/blob/main/docs/features/page-builder.md This command allows users to install premade blocks provided by Peak. These blocks can then be styled and utilized within the page builder. ```php php please peak:install:block ``` -------------------------------- ### Install BrowserSync Source: https://github.com/studio1902/statamic-peak-docs/blob/main/docs/other/vite.md Installs the vite-plugin-browser-sync package, which is used to enable hot module replacement and cross-device synchronization during development. ```bash npm i vite-plugin-browser-sync ``` -------------------------------- ### Create Tailwind CSS configuration files Source: https://github.com/studio1902/statamic-peak-docs/blob/main/docs/getting-started/upgrade-guide.md Create new CSS files for Peak and typography, and a JavaScript file for Tailwind integration. These files should be populated with specific content as per the upgrade guide. ```javascript // resources/css/peak.css (content from provided link) // resources/css/typography.css (content from provided link) // resources/js/tailwind.peak.js (content from provided link) ``` -------------------------------- ### Install Browsershot and Puppeteer Source: https://github.com/studio1902/statamic-peak-docs/blob/main/docs/features/social-images-generation.md Installs the necessary PHP package for Browsershot and the Node.js package for Puppeteer, which are required for social image generation. ```bash composer require spatie/browsershot npm install puppeteer ``` -------------------------------- ### Consent Gate Partial Example Source: https://github.com/studio1902/statamic-peak-docs/blob/main/docs/features/seo.md An example of how to use the `consent_gate` partial to conditionally load content based on user consent, specifically for embeds like YouTube videos. ```html {{ partial:components/consent_gate('youtube') }} {{!-- YouTube embed code here --}} {{ /partial:components/consent_gate }} {{# This partial handles the consent logic #}} {{# It checks if consent for the given type is granted #}} {{# If not, it displays a placeholder and a button to request consent #}} {{# If consent is granted, it renders the slot content #}} {{# Parameters: consent_type (e.g., 'youtube', 'scripts') #}} ``` -------------------------------- ### Stack Usage Example Source: https://github.com/studio1902/statamic-peak-docs/blob/main/docs/features/stacks.md Demonstrates how to apply stack utilities to HTML elements for controlling spacing between sibling elements. Includes classes for default spacing, disabling vertical spacing, and custom spacing. ```html
``` -------------------------------- ### Responsive Image Partial Usage Source: https://github.com/studio1902/statamic-peak-docs/blob/main/docs/features/images.md Example of how to use the `picture` partial to render responsive images with various attributes like aspect ratio, cover, sizes, and lazy loading. ```html {{ partial src="statamic-peak-tools::components/picture" :image="image" aspect_ratio="1/1 large:4/3" cover="true" sizes="(min-width: 768px) 35vw, 90vw" lazy="true" }} ``` -------------------------------- ### Enable Redis Queue Driver Source: https://github.com/studio1902/statamic-peak-docs/blob/main/docs/other/redis-queue.md Set the QUEUE_CONNECTION environment variable to 'redis' to use Redis as the queue driver. This requires Redis to be installed on your server. ```env QUEUE_CONNECTION=redis ``` -------------------------------- ### Forge Deployment Script for Statamic Peak Source: https://github.com/studio1902/statamic-peak-docs/blob/main/docs/other/deployment-script.md This bash script is tailored for deployment on Forge. It checks Forge-specific environment variables for quick deploy flags and commit messages to conditionally skip deployment. It performs a git pull, installs dependencies via Composer and npm, builds the frontend, restarts PHP-FPM using flock for safety, and clears/caches Statamic and Laravel configurations. ```bash if [[ $FORGE_QUICK_DEPLOY == 1 ]]; then if [[ $FORGE_DEPLOY_MESSAGE =~ "[BOT]" ]]; then echo "Automatically committed on production. Nothing to deploy." exit 0 fi fi cd $FORGE_SITE_PATH git pull origin $FORGE_SITE_BRANCH $FORGE_COMPOSER install --no-interaction --prefer-dist --optimize-autoloader --no-dev npm ci npm run build ( flock -w 10 9 || exit 1 echo 'Restarting FPM...'; sudo -S service $FORGE_PHP_FPM reload ) 9>/tmp/fpmlock $FORGE_PHP artisan cache:clear $FORGE_PHP artisan config:cache $FORGE_PHP artisan route:cache $FORGE_PHP artisan statamic:stache:warm $FORGE_PHP artisan queue:restart $FORGE_PHP artisan statamic:search:update --all $FORGE_PHP artisan statamic:static:clear $FORGE_PHP artisan statamic:static:warm --queue ``` -------------------------------- ### Update vite.config.js Source: https://github.com/studio1902/statamic-peak-docs/blob/main/docs/getting-started/upgrade-guide.md Update your vite.config.js file to ensure compatibility with Vite 6.0 and the new Tailwind CSS setup. This typically involves adjusting plugin configurations. ```javascript // Example content for vite.config.js (refer to provided link for exact content) // import { defineConfig } from 'vite'; // import laravel from 'laravel-vite-plugin'; // export default defineConfig({ // plugins: [ // laravel({ // input: [ // 'resources/css/site.css', // 'resources/css/peak.css', // 'resources/css/typography.css', // 'resources/js/tailwind.peak.js' // ], // refresh: true, // }), // ], // }); ``` -------------------------------- ### Sponsor and GitHub Star Buttons Source: https://github.com/studio1902/statamic-peak-docs/blob/main/docs/getting-started/welcome.md Displays a group of buttons for sponsoring the project and starring it on GitHub. Includes SVG icons for visual representation. ```html
Sponsor Star
``` -------------------------------- ### Add Collection Screencast Source: https://github.com/studio1902/statamic-peak-docs/blob/main/docs/getting-started/screencasts.md Screencast demonstrating the process of adding a new collection in Statamic. ```html
``` -------------------------------- ### Configure Local Composer Repository Source: https://github.com/studio1902/statamic-peak-docs/blob/main/docs/other/contributing.md This JSON snippet shows how to add a local path repository to your global Composer configuration. This allows you to test your locally exported Statamic starter kit by referencing its directory. ```json { "repositories": [ { "type": "path", "url": "/Users/robdekort/statamic-peak" } ] } ``` -------------------------------- ### Publish Live Preview Views Source: https://github.com/studio1902/statamic-peak-docs/blob/main/docs/features/live-preview.md Publishes the Live Preview views from the Tools Addon to your project. This allows for customization of the Live Preview experience. ```bash php artisan vendor:publish --tag="statamic-peak-tools-views" ``` -------------------------------- ### Social Image Template Example Source: https://github.com/studio1902/statamic-peak-docs/blob/main/docs/features/social-images-generation.md An example of the Antlers template file used to define the structure and content of the generated social images. This file can be customized with Antlers logic and Tailwind CSS. ```html resources/views/vendor/statamic-peak-seo/components/_social_image.antlers.html ``` -------------------------------- ### Make Partial CLI Command Source: https://github.com/studio1902/statamic-peak-docs/blob/main/docs/getting-started/commands.md Generates a new partial file with IDE hinting and location comments, allowing the user to choose the type (component, layout, snippet, typography) and provide a name and description. ```php php please peak:make:partial ``` -------------------------------- ### Make Collection CLI Command Source: https://github.com/studio1902/statamic-peak-docs/blob/main/docs/getting-started/commands.md Creates a new Statamic collection with default Peak utilities, including blueprint, index, and show partials, and optionally adds permissions. ```php php please peak:make:collection ``` -------------------------------- ### Update package.json for Tailwind and Vite Source: https://github.com/studio1902/statamic-peak-docs/blob/main/docs/getting-started/upgrade-guide.md Update the 'vite' and 'laravel-vite-plugin' dependencies in your package.json file to their latest compatible versions for Tailwind 4.0 and Vite 6.0. ```json { "dependencies": { "vite": "^6.0", "laravel-vite-plugin": "^1.1" } } ``` -------------------------------- ### Make Article (Bard) Set CLI Command Source: https://github.com/studio1902/statamic-peak-docs/blob/main/docs/getting-started/commands.md Adds a set to the Peak Page Builder Article (Bard) block, creating fieldsets and component partials, and updating the Article Bard replicator. ```php php please peak:make:set ``` -------------------------------- ### Add Page Builder Block Command Source: https://github.com/studio1902/statamic-peak-docs/blob/main/docs/features/page-builder.md This command is used to add a new block to the page builder. It guides the user through naming the block, specifying a filename, and providing fieldset instructions. ```php php please peak:make:block ``` -------------------------------- ### Publish Tools Addon Views Source: https://github.com/studio1902/statamic-peak-docs/blob/main/docs/getting-started/addons.md Publishes the views for the Tools addon, which encompasses various features like form submission logic, image handling, pagination, and live preview enhancements. ```bash php artisan vendor:publish --tag="statamic-peak-tools-views" ``` -------------------------------- ### Articles on Peak Source: https://github.com/studio1902/statamic-peak-docs/blob/main/docs/other/awesome.md Links to articles discussing Statamic Peak, covering topics like fluid grids and stack utilities for page builder blocks, and a mention on Laravel News. ```markdown * [A fluid grid to layout page builder blocks](https://1902.studio/journal/a-fluid-grid-to-layout-page-builder-blocks) * [Stack utilities to space page builder blocks](https://1902.studio/journal/stack-utilities-to-space-page-builder-blocks) * [Peak on Laravel News](https://laravel-news.com/statamic-peak) ``` -------------------------------- ### Publish Configuration File Source: https://github.com/studio1902/statamic-peak-docs/blob/main/docs/getting-started/commands.md This command publishes the configuration file for Statamic Peak Commands, allowing you to customize its settings. ```bash php artisan vendor:publish --tag=statamic-peak-commands-config ``` -------------------------------- ### Populate Hidden Fields with Alpine.js Source: https://github.com/studio1902/statamic-peak-docs/blob/main/docs/features/forms.md Provides an example of how to populate a hidden form field with custom data using Alpine.js. It includes calling `form.validate()` to ensure the hidden field is included in the precognition request. ```html
``` -------------------------------- ### Tailwind CSS Motion-Safe Variant Example Source: https://github.com/studio1902/statamic-peak-docs/blob/main/docs/other/reduced-motion.md Illustrates how Tailwind CSS's `motion-safe:` variant is used to apply transitions only when the user has not enabled the 'prefers-reduced-motion' setting. This ensures animations are only shown to users who prefer them. ```html ``` -------------------------------- ### Upgrade Tailwind CSS and Vite Source: https://github.com/studio1902/statamic-peak-docs/blob/main/docs/getting-started/upgrade-guide.md Steps to upgrade Tailwind CSS from v3.4 to v4.0 and Vite from v5 to v6. This involves modifying package.json, running the Tailwind upgrade command, and updating configuration files. ```bash npx @tailwindcss/upgrade@next ``` -------------------------------- ### Style Bard Content with Prose Partial Source: https://github.com/studio1902/statamic-peak-docs/blob/main/docs/features/typography.md Explains how to style content from Statamic's Bard fieldtype using the `typography/prose` partial. It includes an example of applying custom prose modifiers and passing additional classes for specific styling needs. ```html {{ partial:typography/prose as="article" class="prose-h4:text-neutral" }} {{ block:text }} {{ /partial:typography/prose }} ``` -------------------------------- ### Add Page Builder Block Screencast Source: https://github.com/studio1902/statamic-peak-docs/blob/main/docs/getting-started/screencasts.md Screencast explaining how to add a Page Builder block in Statamic. ```html
``` -------------------------------- ### Publishing Statamic Peak Tools Views Source: https://github.com/studio1902/statamic-peak-docs/blob/main/docs/features/skip-to-content.md This command allows you to publish the views associated with the Statamic Peak Tools Addon. Publishing the views enables you to modify them directly. The `--tag="statamic-peak-tools-views"` specifies which assets to publish. ```bash php artisan vendor:publish --tag="statamic-peak-tools-views" ``` -------------------------------- ### Using Fluid Grid with Nested Grid and Subgrid HTML Source: https://github.com/studio1902/statamic-peak-docs/blob/main/docs/features/fluid-grid.md This HTML example demonstrates using the `fluid-grid` with a nested grid that utilizes the CSS `subgrid` value for its columns. This allows the children of the nested grid to directly align with the column tracks defined by the parent `fluid-grid`. ```html
Children will fall on a new 12 column element that aligns with the parent fluid grid using subgrid.
``` -------------------------------- ### Tailwind CSS Configuration for Custom Fonts Source: https://github.com/studio1902/statamic-peak-docs/blob/main/docs/other/custom-fonts.md Configures the Tailwind CSS `font-sans` utility to use the custom 'awesome' font family. This example demonstrates how to set a custom font as the primary sans-serif font, including fallback font stacks for broader compatibility and emoji support. ```html --font-sans: Awesome, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; ``` -------------------------------- ### Publish Browser Appearance Fieldsets and Views Source: https://github.com/studio1902/statamic-peak-docs/blob/main/docs/features/browser-appearance.md Commands to publish the fieldsets and views for the Statamic Peak Browser Appearance addon. This allows for customization of the addon's appearance settings and related files. ```bash php artisan vendor:publish --tag="statamic-peak-browser-appearance-fieldsets" php artisan vendor:publish --tag="statamic-peak-browser-appearance-views" ``` -------------------------------- ### Make Nav CLI Command Source: https://github.com/studio1902/statamic-peak-docs/blob/main/docs/getting-started/commands.md Generates a new navigation, its blueprint, attaches collections, and optionally grants edit permissions to the 'editor' role. ```php php please peak:make:nav ``` -------------------------------- ### Ploi Deployment Script for Statamic Peak Source: https://github.com/studio1902/statamic-peak-docs/blob/main/docs/other/deployment-script.md This bash script is designed for deployment on Ploi. It checks for specific commit messages and deployment sources to skip deployment if automatically committed. It then pulls the latest code, installs dependencies using Composer and npm, builds the frontend, reloads PHP-FPM, and clears/caches various Statamic and Laravel configurations. ```bash if [[ {COMMIT_MESSAGE} =~ "[BOT]" ]] && [[ {DEPLOYMENT_SOURCE} == "quick-deploy" ]]; then echo "Automatically committed on production. Nothing to deploy." {DO_NOT_NOTIFY} exit 0 fi cd {SITE_DIRECTORY} git pull origin {BRANCH} {SITE_COMPOSER} install --no-interaction --prefer-dist --optimize-autoloader --no-dev npm ci npm run build {RELOAD_PHP_FPM} {SITE_PHP} artisan cache:clear {SITE_PHP} artisan config:cache {SITE_PHP} artisan route:cache {SITE_PHP} artisan statamic:stache:warm {SITE_PHP} artisan queue:restart {SITE_PHP} artisan statamic:search:update --all {SITE_PHP} artisan statamic:static:clear {SITE_PHP} artisan statamic:static:warm --queue echo "🚀 Application deployed!" ``` -------------------------------- ### CSS @font-face Rules for Custom Fonts Source: https://github.com/studio1902/statamic-peak-docs/blob/main/docs/other/custom-fonts.md Defines custom font families using @font-face rules within the Tailwind CSS base layer. This example includes multiple weights and styles for a font named 'awesome', specifying WOFF2 and WOFF formats for broad browser compatibility. The `font-display: swap;` property ensures text remains visible during font loading. ```css @layer base { @font-face { font-family: 'awesome'; src: url('/resources/fonts/awesome-regular.woff2') format('woff2'), url('/resources/fonts/awesome-regular.woff') format('woff'); font-weight: 400; font-style: normal; font-display: swap; } @font-face { font-family: 'awesome'; src: url('/resources/fonts/awesome-regular-italic.woff2') format('woff2'), url('/resources/fonts/awesome-regular-italic.woff') format('woff'); font-weight: 400; font-style: italic; font-display: swap; } @font-face { font-family: 'awesome'; src: url('/resources/fonts/awesome-bold.woff2') format('woff2'), url('/resources/fonts/awesome-bold.woff') format('woff'); font-weight: 700; font-style: normal; font-display: swap; } @font-face { font-family: 'awesome'; src: url('/resources/fonts/awesome-bold-italic.woff2') format('woff2'), url('/resources/fonts/awesome-bold-italic.woff') format('woff'); font-weight: 700; font-style: italic; font-display: swap; } } ``` -------------------------------- ### Sites Made with Peak Source: https://github.com/studio1902/statamic-peak-docs/blob/main/docs/other/awesome.md An alphabetically ordered list of websites built using Statamic Peak, including the site name and the developer or studio responsible. ```markdown * [1902.studio](https://1902.studio) by [Studio 1902](https://1902.studio) * [aanbestedingen.corusadvies.nl](https://aanbestedingen.corusadvies.nl) by [Studio 1902](https://studio1902.nl) * [arubawatersportscenter.com](https://arubawatersportscenter.com) by [Van Nut](https://vannut.nl) * [avond4daagsebaflo.nl](https://avond4daagsebaflo.nl) by [Studio 1902](https://1902.studio) * [buckettlaw.co.nz](https://buckettlaw.co.nz) by [Josh Tristram](https://joshtristram.com) * [buijstandartsen.nl](https://buijstandartsen.nl) by [Sythe Veenje](https://sythe.nl) * [connect2id.com](https://connect2id.com) by [Dave Smyth](https://davesmyth.studio) & [Studio 1902](https://1902.studio) * [careaboutit.eu](https://careaboutit.eu) by [Studio 1902](https://1902.studio) * [crazyceramic.de](https://www.crazyceramic.de) by [Daniel Wentsch](https://wentsch.me) * [codegorilla.nl](https://codegorilla.nl) by [Studio 1902](https://studio1902.nl) & [Merkactivisten](https://merkactivisten.nl) * [daarchitektur.com](https://daarchitektur.com) by [croox](https://croox.com) & [Daniel Wentsch](https://wentsch.me) * [eensamen050.nl](https://eensamen050.nl) by [Studio 1902](https://studio1902.nl) * [facit.ai](https://facit.ai) by [Dave Smyth](https://davesmyth.studio) & [Studio 1902](https://1902.studio) * [franselente.nl](https://franselente.nl) by [Studio 1902](https://studio1902.nl) * [gtb.co.nz](https://gtb.co.nz) by [Josh Tristram](https://joshtristram.com) * [hufeland.com](https://hufeland.com) by [croox](https://croox.com) & [Daniel Wentsch](https://wentsch.me) * [ien-ingenieurs.nl](https://ien-ingenieurs.nl) by [Studio 1902](https://studio1902.nl) * [janeandherdragon.com](https://janeandherdragon.com) by [Josh Tristram](https://joshtristram.com) * [joshtristram.com](https://joshtristram.com) by [Josh Tristram](https://joshtristram.com) * [klimaatadaptatiegroningen.nl](https://klimaatadaptatiegroningen.nl) by [Studio 1902](https://studio1902.nl) & [Merkactivisten](https://merkactivisten.nl) * [lutjegeluk.nl](https://lutjegeluk.nl) by [Studio 1902](https://1902.studio) * [merkactivisten.nl](https://merkactivisten.nl) by [Studio 1902](https://studio1902.nl) & [Merkactivisten](https://merkactivisten.nl) * [mam.org.mm](https://mam.org.mm) by [Studio 1902](https://studio1902.nl) * [merkactivisten.nl](https://merkactivisten.nl) by [Studio 1902](https://studio1902.nl) & [Merkactivisten](https://merkactivisten.nl) * [roerganger.com](https://roerganger.com) by [VanNut](https://vannut.nl) * [schoolholidays.com.au](https://schoolholidays.com.au) by [Ruslan Osipov](https://ruslan.rocks/about) * [schreinerei-neub.de](https://schreinerei-neub.de) by [Daniel Wentsch](https://wentsch.me) * [securepractice.co](https://securepractice.co) by [Dave Smyth](https://davesmyth.studio) & [Studio 1902](https://1902.studio) * [sdghousegroningen.nl](https://sdghousegroningen.nl) by [Studio 1902](https://studio1902.nl) * [socialebenadering.nl](https://socialebenadering.nl) by [Studio 1902](https://studio1902.nl) & [Merkactivisten](https://merkactivisten.nl) * [spottery.nl](https://spottery.nl) by [Studio 1902](https://studio1902.nl) * [startupcity.hamburg](https://startupcity.hamburg) by [Codetopia](https://codetopia.de) * [socialebenadering.nl](https://socialebenadering.nl) by [Studio 1902](https://1902.studio) & [Merkactivisten](https://merkactivisten.nl) * [stadthausmensch.de](https://stadthausmensch.de) by [croox](https://croox.com) & [Triolog](https://www.triolog-web.de) * [takingwonderland.com](https://takingwonderland.com) by [Josh Tristram](https://joshtristram.com) * [thegood.nl](https://www.thegood.nl) by [Studio 1902](https://studio1902.nl) & [TheGood](https://thegood.nl) * [vespa2rent.be](https://vespa2rent.be) by [VanNut](https://vannut.nl) * [voltexsloepverhuur.nl](https://voltexsloepverhuur.nl) by [VanNut](https://vannut.nl) * [macmaz.co.nz](https://www.macmaz.co.nz) by [Josh Tristram](https://joshtristram.com) ``` -------------------------------- ### Programmatic Configuration with Registry Facade Source: https://github.com/studio1902/statamic-peak-docs/blob/main/docs/getting-started/commands.md This section details how to programmatically configure Statamic Peak Commands using the `Registry` facade in your addon's ServiceProvider. It covers methods for managing paths and namespaces for custom operations, presets, blocks, and sets. ```APIDOC Registry: getPaths(): array Returns all registered paths for presets, blocks, and sets. addPresetsPath(string $path) Adds a path to the list of preset directories. addBlocksPath(string $path) Adds a path to the list of block directories. addSetsPath(string $path) Adds a path to the list of set directories. removePresetsPath(string $path) Removes a path from the list of preset directories. removeBlocksPath(string $path) Removes a path from the list of block directories. removeSetsPath(string $path) Removes a path from the list of set directories. getNamespaces(): array Returns all registered namespaces for custom operations. appendNamespace(string $namespace) Appends a namespace to the list of operation namespaces. prependNamespace(string $namespace) Prepends a namespace to the list of operation namespaces. removeNamespace(string $namespace) Removes a namespace from the list of operation namespaces. resolveOperation(string $class, array $config): Resolves and instantiates an operation class with the given configuration. Example Usage in ServiceProvider: ```php use \Studio1902\PeakCommands\Facades\Registry; public fuction bootAddon(){ // Registers the namespace for your own operations Registry::prependNamespace('\Acme\YourAddon\Operations'); // Registers a path for your own presets Registry::addPresetsPath(base_path('vendor/acme/your_addon/resources/presets')); } ``` ``` -------------------------------- ### Publish SEO Assets Source: https://github.com/studio1902/statamic-peak-docs/blob/main/docs/getting-started/addons.md Publishes the fieldsets and views for the SEO addon. This includes assets for general SEO, OG image generation, and redirects. ```bash php artisan vendor:publish --tag="statamic-peak-seo-fieldsets" php artisan vendor:publish --tag="statamic-peak-seo-views" ```