Giter Site home page Giter Site logo

mandrasch / ddev-wp-acf-blocks-svelte Goto Github PK

View Code? Open in Web Editor NEW
14.0 1.0 0.0 230 KB

Experimental, WordPress ACF Blocks meets Svelte + Vite ๐Ÿงก

Shell 9.34% JavaScript 9.54% Svelte 2.38% PHP 16.99% CSS 0.72% HTML 61.02%
acf ddev svelte vite wordpress

ddev-wp-acf-blocks-svelte's Introduction

ddev-wp-acf-blocks-svelte

ACF Blocks meets Svelte + Vite ๐Ÿงก

Screenshot block with svelte input binding

Status: Work in progress ๐Ÿง‘โ€๐Ÿ”ง

Made with

Inspired by fgeierst/typo3-vite-demo. See more experiments: https://my-ddev-lab.mandrasch.eu/

Local development

  • Run either ddev npm run dev or ddev vite-serve start

Use define('WP_ENV','production'); or define('WP_ENV','development'); in wp-config.php to simulate the environment. The default is development.

Local first time setup:

ddev start && \
    ddev wp core download && \
    ddev launch

# Finish installation of WordPress in browser, afterwards:

ddev wp theme install raft && \
    ddev wp theme activate raft-child && \
    ddev npm install
  1. Use ddev launch wp-admin/ to open https://ddev-wp-acf-blocks-svelte.ddev.site/wp-admin/
  2. Important: Install and activate ACF Pro https://www.advancedcustomfields.com/pro/
  3. Add Svelte Block One to a page or post of your choice

Now you can run either ddev npm run dev or ddev vite-serve start for local development.

TODOs

Notes

How was this created?

# WP Quickstart for DDEV
# https://ddev.readthedocs.io/en/latest/users/quickstart/#wordpress
ddev config --project-type=wordpress && ddev start && ddev wp core download && ddev launch

# Finish installation in browser

# Install ACF Pro for ACF Blocks feature
# https://www.advancedcustomfields.com/pro/

# We use the Raft theme by themeisle, with child theme:
ddev wp theme install raft && ddev wp theme activate raft-child

# Vite support (https://github.com/torenware/ddev-viteserve)
ddev get torenware/ddev-viteserve
# Modified /.ddev/.env for configuration

ddev npm init -y
ddev npm install --save-dev vite @sveltejs/vite-plugin-svelte

# Added scripts-section to package.json & create vite.config.js

Thanks to

ddev-wp-acf-blocks-svelte's People

Contributors

mandrasch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.