hrotti / craft
Craft CMS Scaffolding Template
Installs: 61
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:project
Requires
- craftcms/cms: ^3.6.0
- craftcms/redactor: ^2.8.5
- doublesecretagency/craft-cpcss: ^2.3.0
- ether/seo: ^3.6.7
- hrotti/kernal: ^1.0.1
- lcobucci/jwt: 4.1.4
- mmikkel/incognito-field: ^1.2.0
- mmikkel/reasons: ^2.2.4
- ostark/craft-async-queue: ^2.1.1
- panlatent/schedule: ^0.2.2
- pennebaker/craft-architect: ^2.4.0
- svenjungnickel/redactor-font-awesome: ^2.1.1
- utakka/redactor-anchors: ^1.1.0
- venveo/craft-redactor-split: ^1.1.0
- verbb/cp-nav: ^3.0.13.1
- verbb/field-manager: ^2.2.2
- verbb/redactor-tweaks: ^2.0.4
- verbb/super-table: ^2.6.5
- vlucas/phpdotenv: ^3.4.0
This package is auto-updated.
Last update: 2025-02-19 07:23:28 UTC
README
This template is intended as a scaffolding to create a new Craft CMS project. It's intended to serve as the backend for use as a headless resource (either with GraphQL or RESTful API).
I will expand with descriptions as time permits (I apologize).
How to use with Nuxt
You would need to modify the "publicPath" property in your nuxt.config.js file to something like this:
build: {
"publicPath": "/app/_nuxt"
}
In a Unix environment, you can utilize a hard link (symbolic does not work in my use case) to an html file that your templates reference in Twig, linking to the distributed result after you generate it statically.
Example Script
You may need to move the distributed folder underneath public. For example, to have the nuxt application under "app" in public, you could use the following, replacing BASE_DIR with the folder you are using.
#!/bin/bash
: ${PROJECT_NAME:="hrotti"}
: ${BASE_DIR:="/srv/apps/$PROJECT_NAME"}
: ${OPS_DIR:="${BASE_DIR}/ops"}
: ${APP_DIR:="${BASE_DIR}/app"}
: ${BACKEND_DIR:="${APP_DIR}/backend"}
: ${FRONTEND_DIR:="${APP_DIR}/frontend"}
# ----------------------------------------
cd $FRONTEND_DIR
git pull
npm ci
npm run generate
mv ${BASE_DIR}/app/frontend/dist/app/_nuxt ${BASE_DIR}/app/frontend/dist/_nuxt
rm -rf ${BASE_DIR}/app/frontend/dist/app
sudo rm -rf "${BASE_DIR}/app/backend/src/public/app"
cp -R "${BASE_DIR}/app/frontend/dist/" "${BASE_DIR}/app/backend/src/public/app"
sudo rm -f "${BASE_DIR}/app/backend/src/craftcms/templates/index.html"
ln "${BASE_DIR}/app/backend/src/public/app/index.html" "${BASE_DIR}/app/backend/src/craftcms/templates/index.html"