Skip to content

Suggest installing Bootstrap assets via composer #402

@mehov

Description

@mehov

FriendsOfCake/bootstrap-ui does not come with Bootstrap itself, so we need to install the whole thing separately.

Right now the recommended way to do that seems to be via npm, either using bin/cake bootstrap install or manually:

Consider recommending getting Bootstrap from composer. I think that's much faster, more native to PHP and does not require npm to be available.

composer require twbs/bootstrap:5.3.3
composer require twbs/bootstrap-icons

(I had to install twbs/bootstrap-icons separately because twbs/bootstrap doesn't seem to contain the font directory.)

Link your application webroot to where Bootstrap files are actually located:

mkdir ./webroot/bootstrap_u_i
ln -s ../../vendor/twbs/bootstrap/dist/css ./webroot/bootstrap_u_i/css
ln -s ../../vendor/twbs/bootstrap/dist/js ./webroot/bootstrap_u_i/js
ln -s ../../vendor/twbs/bootstrap-icons/font ./webroot/bootstrap_u_i/font

The default FriendsOfCake/bootstrap-ui layout expects the files to be available under /bootstrap_u_i, so by symlinking the path like that, it picks almost everything up right away automatically.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions