Git Product home page Git Product logo

craft-master's Introduction

Craft Master

Craft Master is designed to be a set of base templates and starter code for Craft CMS. It is not meant to be used as is, but as a starting place for several different possible goals.

If you are looking for a basic Team Multi-Environment config, you may want to check out the more simple Craft Multi-Environment Config.

Craft Master includes:

Multi-environment Config

We've updated Craft to run comfortably in any environment that we send it to. A few changes have to be made to the primary index.php file and to the environment-specfic config and database files, and then you can work on localhost, staging, dev, production, or wherever else you fancy.

  • Added test for environment to /public/index.php
  • Override and define CRAFT_ENVIRONMENT variable in index.php
  • Added craft/config/local folder for local config settings
  • Added example general.php and db.php in craft/config/local
  • Updated /craft/config/general.php to merge in environment specific config settings
  • Updated /craft/config/db.php to merge in environment specific database settings
  • Set URI_SCHEME, SITE_URL, and BASEPATH variables in /craft/config/general.php
  • Moved some config overrides to /craft/config/general.php for easier access
    • Added environmentVariables 'siteUrl' => SITE_URL
    • Added environmentVariables 'basePath' => BASEPATH
  • Added some config overrides to general.php in local and dev environments dev
    • Set devMode to true local
    • Set devMode to true
    • Make it easier to access testToEmailAddress
    • Make it easier to access some config settings useful for debugging phpMaxMemoryLimit, backupDbOnUpdate, translationDebugOutput, useCompressedJs, cacheDuration
    • Set several member login settings to 101 years userSessionDuration, rememberedUserSessionDuration, rememberUsernameDuration, invalidLoginWindowDuration
    • Set cooldownDuration to 1 second
    • Set maxInvalidLogins to 101

Customizable .htaccess

We've added a handful of things to our base .htaccess file. Since many rules require certain server settings to be turned on and may throw errors if they are not, all rules except the default Craft .htaccess rules are commented out by default. You can enable them as you choose to in your own environment.

  • Redirect public access to an offline page while updates are being made
  • Password protect a single environment
  • Set proper MIME type for all files
  • Set gzip compression rules
  • Set Expires headers
  • ETag removal
  • Remove www from beginning of URL
  • Force www at beginning of URL
  • Force SSL when using dashboard
  • Remove trailing slashes from end of URL
  • Prevent 404 errors for non-existing redirected folders
  • Set UTF-8 encoding
  • Add various security enhancements
  • Relative 301 redirects that will work in any environment
  • Remove index.php from the URL'

craft-master's People

Contributors

benparizek avatar bransinanderson avatar danieltott avatar

Watchers

James Cloos avatar Webremote 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.