imarc / padstone
Craft CMS
Installs: 421
Dependents: 0
Suggesters: 0
Security: 0
Stars: 21
Watchers: 10
Forks: 6
Language:Twig
Type:project
Requires
- php: ^8.0.2
- craftcms/cms: ^4.0.0
- craftcms/contact-form: ^3.0
- craftcms/contact-form-honeypot: ^2.0
- craftcms/element-api: ^3.0.0
- craftcms/feed-me: ^5.0.4
- craftcms/redactor: ^3.0.0
- imarc/craft-googlecustomsearch: ^2.1
- imarc/craft-kindling: ^2.1
- imarc/craft-pickture: ^1.0
- luwes/craft3-codemirror: dev-master
- nystudio107/craft-retour: ^4.0.0
- nystudio107/craft-seomatic: ^4.0.0
- nystudio107/craft-vite: ^4.0
- sebastianlenz/linkfield: ^2.1.3-rc
- spicyweb/craft-neo: ^3.0
- verbb/expanded-singles: ^2.0.0-beta.1
- verbb/field-manager: ^3.0.0-beta.1
- verbb/super-table: ^3.0.0-beta.4
- vlucas/phpdotenv: ^5.3
- wbrowar/adminbar: ^3.1
- dev-master
- 5.0.1
- 5.0.0
- 5.0.0-alpha.2
- 5.0.0-alpha.1
- 4.x-dev
- 4.2.3
- 4.2.2
- 4.2.1
- 4.2.0
- 4.1.4
- 4.1.3
- 4.1.2
- 4.1.1
- 4.1.0
- 4.0.5
- 4.0.4
- 4.0.3
- 4.0.2
- 4.0.1
- 4.0.0
- 4.0.0-beta.3.1
- 4.0.0-beta.3
- 4.0.0-beta.2.1
- 4.0.0-beta.2
- 4.0.0-beta.1
- 3.x-dev
- 3.8.1
- 3.8.0
- 3.8.0-beta.6
- 3.8.0-beta.5
- 3.8.0-beta.4
- 3.8.0-beta.3
- 3.8.0-beta.2
- 3.8.0-beta.1
- 3.7.4
- 3.7.3
- 3.7.2
- 3.7.1
- 3.7.0
- 3.6.0
- 3.5.1
- 3.5.0
- 3.4.0
- 3.3.0
- 3.2.1
- 3.2.0
- 3.1.1
- 3.1.0
- 3.0.7
- 3.0.6
- 3.0.5
- 3.0.4
- 3.0.3
- 3.0.2
- 3.0.1
- 3.0.0
- 2.1.2
- 2.1.1
- 2.1.0
- 2.0.1
- 2.0.0
- 1.6.3
- 1.6.2
- 1.6.1
- 1.6.0
- 1.5
- 1.4.10
- 1.4.9
- 1.4.8
- 1.4.7
- 1.4.6
- 1.4.5
- 1.4.4
- 1.4.3
- 1.4.2
- 1.4.1
- 1.4.0
- 1.3.0
- 1.2.5
- 1.2.4
- 1.2.3
- 1.2.2
- 1.2.1
- 1.0.1
- 1.0.0
- dev-next-craft5
- dev-postgres-craft5
- dev-module-changes
- dev-next
- dev-db-sessions-app-web-next
- dev-db-sessions-app-web
- dev-admin-css
- dev-74-handle-bad-types-element-api
- dev-hero-bg-image-fix
- dev-78-make-responsive-image-fix
- dev-fix-nav-deprecation-errors
- dev-user-manual
- dev-neo-block-changes
- dev-testing-with-codeception
- dev-212-make-mobile-nav-dynamic
- dev-with-neo
- dev-update-readme
- dev-add-codeception-testing
- dev-db-sessions
- dev-package-updates
- dev-503-template
- dev-move-index-templates
- dev-htmlpurifier
- dev-redactor-configs
- dev-404-500-fixes
- dev-ops
- dev-craft3-bill
- dev-craft3.1
- dev-craft2
- dev-laravel-mix
- dev-docker
- dev-localdev
This package is auto-updated.
Last update: 2024-12-01 13:48:15 UTC
README
Padstone for Craft CMS
Padstone is a starter package for Craft 4 built by Imarc. It provides a simple project config as well as example entries and templates.
If you would like to use the older version of Padstone for Craft 2 or 3, see the craft2 branch or 4.x.
Features
- Pre-built CMS sections, including ones for the Homepage, a Blog, News, and Resources. (18 in total!)
- A set of Imarc Boilerplate twig templates for you to replace or customize.
- A neo-based Content Designer field, built within Craft, for laying out pages beyond simple rich text.
- A set of plugins selected by Imarc that we recommend for new projects.
Getting Started
Create a new padstone project with the following composer command:
composer create-project imarc/padstone [folder]
Using ops (the fast way)
Go into your the new project folder, and run
ops padstone-install
This will run all the following steps, including prompting you for values to add to your .env file. You likely want to leave DB_SERVER as mariadb
(the default), but you can change the other settings if you'd like.
The manual way
-
Copy .env.example to be .env and update settings inside. In particular, DB_DATABASE, DB_SERVER, DB_USER and DB_PASSWORD.
-
Run
./craft setup/security-key
to generate a SECURITY_KEY for your .env file. -
If you'd like to use Padstone's SQL file, import padstone.sql into your site.
-
The default Padstone site is configured to store user sessions in the database. The phpsessions table needs to be added to the new database. If you import the padstone.sql file the table will be created by the import. As an alternative, you can create the table manually by runnng the craft console command.
craft setup/php-session-table
Then run the installer by going to /admin (except for your domain.)
Logging in
If you use the ops method or import padstone.sql
manually, the username is admin and the password is padstone. Please change the password after you first login.
Front-End Build
Beyond the typical craft files, you will also see a resources/ folder. Padstone uses Laravel Mix to compile JS and Sass files from the resources/ folder and store the results into the public/ folder:
resources/assets/sass/main.scss
is compiled topublic/css/main.css
resources/assets/js/main.js
is compiled topublic/js/main.js
Additionally, Padstone produces manifest.js
and vendor.js
files that
must be included, in that order, before any of your own JS files. You can
customize this behavior in webpack.mix.js
.
Watching/Building assets
While developing, you most likely want to watch the files you are working on, so the build happens automatically after every save.
npm run watch
If you want to run this same build process for dev without watching, you can run the following:
npm run dev
If you are building to production, run:
npm run prod
What's Included
Sections
Padstone includes the following sections:
- Homepage
- Pages with entry types for Blog, News, Resources, Team, and Contact pages
- Shared Sections for building shared pieces of of pages
- Blog Articles, News Articles and Authors
- Team, Events and Resources
- Alerts
- Error Page and 404 Page
Plugins
The following plugins are currently included and installed via composer, which is what Craft uses for the Plugin Store as well:
- Admin Bar
- CodeMirror
- Contact Form Honeypot
- Contact Form
- Craft Kindling
- Element API
- Expanded Singles
- Feed Me
- Field Manager
- Google Custom Search
- Mix
- Neo
- Redactor
- Retour
- Sprout Fields
- Super Table
- Tags
- Typed link field
Suggested Additional Plugins
These plugins didn't make the cut for Padstone, but they are plugins we'd recommend people look at if they have specific needs:
- Guide - add documentation with Craft. Currently $39 and $19/year.
- Maps - a Map field type for picking locations that works with Google Maps and other services.
- Sprout Forms - a form builder that can track submissions within Craft.
Macros
There is a _macros.twig
file that provides The following macros:
- renderAllBlocks, renderBlock, and renderColumn - these are used to render the contentDesigner field.
- responsiveImage - macro that uses the responsiveImage.twig partial to embed an image with an appropriate picture tag with srcsets for working with lazysizes.
- pagination - used to generate pagination.
- commaSeparate - used to generate a comma separated list of elements based on title.
- columnsSlug - used to generate a classname appropriate slug for for a section.
- numberToWord - used to convert a number from 0 through 10 to an english word.
Sections
The Content Designer Field (contentDesigner) allows CMS users to use the following sections out of the box:
- Designed Section - the most common section, it allows you to pick a combination of up to two columns to render together out of the following:
- Text - a regular rich text column. Within a Text column, you can additionally add a Call to Action.
- Call to Action - a call to action, typically styled to look like a button.
- Image - an image.
- Related Entry - a related entry.
- Testimonial - a testimonial.
- Video - a video.
- Embed - an embed.
- Rich Text Section - a more traditional section of just rich text, relying on redactor for styling or floating images within the content.
- Call to Action Section - A full width section featuring a call to action.
- Related Entries Section - A section of related entries, such as related blog articles or resources.
- Testimonial Section - A section featuring a testimonial.
- Icon Grid Section - An icon grid, typically used to showcase partner, brand or technology logos.
- Shared Section - allows you to include a Shared Section, a separate type of entry in the CMS that itself contains a Content Designer field. This lets you build a block once (within a Shared Section) and include it into multiple pages on the site.
License
Padstone is released under the MIT License.
Contributing
Set up a padstone project with the ability to contribute back.
# clone project and enter directory
git clone git@github.com:imarc/padstone.git
cd padstone
# install composer deps
composer install
# create .env file. if you are using Ops, you can copy .env.example.ops
cp .env.example.server .env
# generate craft security key
php craft setup/security-key
# install boilerplate components
npx imarc/boilerplate-components
echo '@import "~bootstrap/scss/bootstrap";' >> resources/styles/main.scss"
echo 'import "bootstrap";' >> resources/js/main.js"
# import sql into db. If you are using Ops, the command is:
ops mariadb import padstone padstone.sql
# Manual step:
# set DB_DATABASE in your .env to 'padstone'
© 2019-2022 Imarc