2021/6/23
Tag : Craft CMS

Blog starter で Craft CMS を始めてみる #craftcms

Craft CMS を使ってみる時の最初のとっかかりはいくつかある。
Craft Demo に登録してオンライン上でのデモを試す方法が一つ。

Craft Demo
https://demo.craftcms.com/

あとは、 Nitro などでローカルに構築して試すという方法。

Nitro は v2 から Docker ベースに変わったっぽい。

Nitro のインストールができているなら、 Craft CMS のBlog starterを使うと簡単に立ち上げられる。

craftcms/starter-blog: Blog starter site learning resource.
https://github.com/craftcms/st...

基本的には Blog starter の Readme に書いてある通りではあるが。。。


リポジトリをクローンする

git clone [email protected]:craftcms/starter-blog.git

cd starter-blog

rm -rf .git

starter-blog を Nitro に追加する

nitro add

Enter the hostname [starter-blog.nitro]: test-starter-blog.test
Enter the web root for the site [web]: 
Choose a PHP version:
Add a database for the site [Y/n] y
Enter the new database name: teststarterblog  
Should we update the env file? [y/N] y
Apply changes now [Y/n]? y
......
Nitro is up and running 😃

Craft CMS のインストール

composer install

http://test-starter-blog.test/admin/ へアクセスして Craft CMS をインストールする

ユーザーを作成する

サイト名や言語を設定する

インストール

インストールが完了すると、ダッシュボードが表示される。

サイトにアクセスしてみる

エントリを1つ作れば表示される。

とりあえず触ってみるというのはこれで問題なく出来る。