This repository is a companion to the A3 web development tutorials. The series aims to offer a strong foundation for understanding and effectively utilizing ApostropheCMS.
Throughout these tutorials, we'll incrementally build a sample website using the Apostrophe 3 (A3) Essentials starter kit. This project serves as a learning tool, it is not intended as a plug-and-play template for your individual projects.
For each tutorial in the series, a new branch will be added to this repository containing all the changes from previous tutorials. You can follow along at your own pace. To switch to the relevant branch at the start of each tutorial, you can either use git switch <branch-name>
on your local machine or examine the branch directly on GitHub.
- Clone or fork and clone this repository.
- Run
npm install
to install the necessary dependencies. - Add an admin user by running
node app @apostrophecms/user:add <user-name> admin
. - Whenever you switch to a new branch, remember to run
npm update
.
The main branch includes a database-backup
folder. This contains the final project database pre-populated with pieces and pages. Use npm run copy-db
to copy this database to your local MongoDB server.
⚠️ Special Warning: If you're following along with the tutorial and your project is nameda3-onboarding-project
, restoring this database will overwrite it. To avoid this, you can:
- Change the
shortname
in theapp.js
file of this project. - Modify the "copy-db" script in
package.json
. The existing script ismongorestore --gzip --nsFrom=onboarding-walkthrough.* --nsTo=a3-onboarding-project.* --drop --verbose --archive=./database-backup/onboarding
. Replace--nsTo=a3-onboarding-project.*
with your newshortname
. - This can also allow you to use this database in your personal project. Just modify the "copy-db" script to replace that same
--nsTo
with the shortname of your project, making sure to add.*
at the end.
The main
branch also contains all the images used in the final site, located in public/uploads/attachments
. You may copy these to your personal project if you decide to use this repository's database. A majority of these images are sourced from Unsplash, and a file named unsplash-credit.json
is included to give credit to the authors.
Branch | Description | Link |
---|---|---|
sec2-1b | Project initiation using apos create a3-onboarding-project . |
Code Organization |
sec2-2-pages | Creation of pages and template changes | Creating Pages |
sec2-3-assets | Addition of Bootstrap framework and other assets. | Adding CSS and JS assets |
sec2-4-widgets | Creation of a number of widgets for layout and content presentation. | Creating Widgets |
sec2-5-pieces | Creation of the main review piece and methods for displaying pieces. |
Creating Pieces |
sec2-6-navigation | Addition of different types of navigation for pages and social links. | Building Navigation |
sec2-7-ui-customization | Introduction to UI personalization. | Configuring the Admin Bar |
sec2-8-adding-extensions | Exploration of the SEO and Blog extensions. |
Adding Extensions |