Giter Club home page Giter Club logo

murby's Introduction

Murby

A plain Kirby 3 starterkit on steroids. πŸš€ You get a composer based workflow, a modern asset pipeline with Webpack, Sass, Babel, a live reload server, and much more. Murby just wants to help you quickly start developing and maybe saves you a few hours set up time.

Features

  • Composer based Kirby workflow for easy updating the core and adding plugins
  • A webpack configuration with Sass, Babel, Postcss and autoprefixer, Imagemin and more
  • Live reloading when you change anything to your assets like JavaScript or Sass
  • Easy npm scripts to start developing in no time and build optimized assets for production
  • A pretty basic template scructure with Header, Footer, Treemenu, etc.

Requirements

Of course you need to fullfil all Kirby requirements like PHP 7.3 and a webserver on your machine. If you're on Mac you shouldn't have any problems.

For development purposes this project uses the built-in PHP server. Of course you can also use MAMP, XAMPP, or everything else. You just have to adjust the NPM scripts to fit your environment. Since this starterkit uses the composer based workflow, you need to have that installed on your machine.

Also, for all that frontend stuff like Webpack, Babel and more you need to have Node.js (>= 10.0.0) and NPM (>= 6.0.0) installed on your machine. Find out more.

Installation

  1. Just clone this repo:
git clone [email protected]:FNGR2911/murby.git myproject
  1. Go into your new project directory:
cd myproject
  1. Install kirby and all vendors by:
composer install
  1. Install all required NPM packages by:
npm install
  1. Run the development script with npm run start and register your admin user by visiting http://localhost:8282/panel.

Usage

To start developing (frontend and backend) just run:

npm run start

The start script starts Webpack in watch mode, the built-in PHP webserver on http://localhost:8282 and opens that site in your default browser.

Your source assets are stored in the /assets folder.

To build the frontend assets for production run:

npm run build

Deployment

Deployment is exactly like deploying a normal Kirby project with one exception: Your web servers root should point to the /web directory and not the root directory of your project. You should also run npm run build to get optimized frontend assets before deploying to production ;)

Roadmap

  • Remove all unnecessary files and folders from /web
  • Ideas? Suggestions? Feel free to open PR or Issue!

License

MIT

murby's People

Contributors

dependabot[bot] avatar fngr2911 avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

murby's Issues

Plugins Problem

I tried installing the locator plugin and couldnt get it to load. I removed the "web" folder and rejigged to get all in the root which seems to have resolved the issue.

[suggestion] only inject livereload script on dev env

Hello !

Here is a suggestion to avoid to inject the livereload script in the footer even on a production environement.

I'm setting a env variable in my Apache conf file httpd.conf :

SetEnv DEV_ENV true

And in the footer I wrapped the script inject with a condifition :

<?php
    $env = getenv('DEV_ENV', true) ?: getenv('DEV_ENV');
    if($env == true):?>
    <script src="http://localhost:35729/livereload.js"></script>
  <?php endif ?>

Let me know what you think, I could make a PR if needed :)

panel without images | startup with router.php

Kudos for your great project!

The Kirby docs suggest to startup the local PHP server with a reference to kirby/router.php:

php -S localhost:8000 kirby/router.php

The page will work without the router, but images are not shown in the panel. A click on the resource results in an error:
The JSON response from the API could not be parsed. Please check your API connection.

cd murby/web and php -S localhost:8282 kirby/router.php -t ../web will show the images in the panel without errors.

package.json contains the local php server startup on line 6:

	 "server": "php -S localhost:8282  -t web",

A change to

 "server": "php -S localhost:8282 web/kirby/router.php -t web",

won't work.

I there a chance to startup the server with the router.php?

Cheers, Johannes

Support multiple pages

Is it possible to have multiple pages (templates) all with their own js and css bundle files?

Add concurrently to the devDependencies

Tried your boilerplate for the first time, nice job. npm run start won’t work without having concurrently global, so probably it’s best to add it to the devDependencies.

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.