Git Product home page Git Product logo

sage-ravorona's Introduction

Development Release

๐Ÿงฉ Wordpress Starter Theme

Requirements

Theme installation

  • Make sure that you have Acorn installed
  • Install Sage using Composer from your WordPress themes directory (replace your-theme-name below with the name of your theme):
# @ app/themes/ or wp-content/themes/
$ composer create-project ravorona/sage your-theme-name

To install the latest development version of Sage, add dev-develop to the end of the command:

$ composer create-project ravorona/sage your-theme-name dev-develop

Theme structure

themes/your-theme-name/   # โ†’ Root of your Sage based theme
โ”œโ”€โ”€ app/                  # โ†’ Theme PHP
โ”‚   โ”œโ”€โ”€ Providers/        # โ†’ Service providers
โ”‚   โ”œโ”€โ”€ View/             # โ†’ View models
โ”‚   โ”œโ”€โ”€ filters.php       # โ†’ Theme filters
โ”‚   โ”œโ”€โ”€ helpers.php       # โ†’ Global helpers
โ”‚   โ”œโ”€โ”€ medias.php        # โ†’ Medias helper
โ”‚   โ””โ”€โ”€ setup.php         # โ†’ Theme setup
โ”œโ”€โ”€ composer.json         # โ†’ Autoloading for `app/` files
โ”œโ”€โ”€ public/               # โ†’ Built theme assets (never edit)
โ”œโ”€โ”€ functions.php         # โ†’ Theme bootloader
โ”œโ”€โ”€ index.php             # โ†’ Theme template wrapper
โ”œโ”€โ”€ node_modules/         # โ†’ Node.js packages (never edit)
โ”œโ”€โ”€ package.json          # โ†’ Node.js dependencies and scripts
โ”œโ”€โ”€ resources/            # โ†’ Theme assets and templates
โ”‚   โ”œโ”€โ”€ fonts/            # โ†’ Theme fonts
โ”‚   โ”œโ”€โ”€ images/           # โ†’ Theme images
โ”‚   โ”œโ”€โ”€ scripts/          # โ†’ Theme javascript
โ”‚   โ”œโ”€โ”€ styles/           # โ†’ Theme stylesheets
โ”‚   โ”œโ”€โ”€ svg/              # โ†’ Theme svgs
โ”‚   โ””โ”€โ”€ views/            # โ†’ Theme templates
โ”‚       โ”œโ”€โ”€ components/   # โ†’ Component templates
โ”‚       โ”œโ”€โ”€ forms/        # โ†’ Form templates
โ”‚       โ”œโ”€โ”€ layouts/      # โ†’ Base templates
โ”‚       โ”œโ”€โ”€ partials/     # โ†’ Partial templates
        โ””โ”€โ”€ sections/     # โ†’ Section templates
โ”œโ”€โ”€ screenshot.png        # โ†’ Theme screenshot for WP admin
โ”œโ”€โ”€ style.css             # โ†’ Theme meta information
โ”œโ”€โ”€ vendor/               # โ†’ Composer packages (never edit)
โ””โ”€โ”€ vite.config.ts        # โ†’ Vite configuration

Theme development

  • Run yarn from the theme directory to install dependencies
  • Update vite.config.ts for bundler fine tuning

Build commands

  • yarn dev โ€” Start dev server and hot module replacement
  • yarn build โ€” Compile assets
  • yarn lint โ€” Lint stylesheets & javascripts
  • yarn lint:css โ€” Lint stylesheets
  • yarn lint:js โ€” Lint javascripts

Hot Module Replacement

Project Side

Add the following variables in your project .env

# Endpoint where the bundler serve your assets
HMR_ENTRYPOINT=http://localhost:5173

Theme side

For advanced dev server configuration, copy .env.example according to Vite naming convention and loading order and update variables

FYI

Running HMR Mode remove the public/manifest.json file, so do not forget to re-run the assets compilation with yarn build if needed.

Documentation

sage-ravorona's People

Contributors

ravorona 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.