<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom">

    <title>mersy note</title>
    <link href="https://note.mersy418.com/" />
    <link type="application/atom+xml" rel="self" href="https://note.mersy418.com/atom.xml?token=80_XSZzYExAHGSKASwj8M_D42708-Jx8" />
    <updated>2025-01-23T07:19:08+08:00</updated>
    <id>https://note.mersy418.com/atom.xml?token=80_XSZzYExAHGSKASwj8M_D42708-Jx8</id>
    <author>
        <name>mersy</name>
        <email>mersy418@gmail.com</email>
    </author>
                    <entry>
            <id>https://note.mersy418.com/article/craft-5-4-2-released</id>
            <link type="text/html" rel="alternate" href="https://note.mersy418.com/article/craft-5-4-2-released?utm_source=feed" />
            <title>Craft 5.4.2 リリース！</title>
            <published>2024-09-07T06:00:00+08:00</published>
            <updated>2024-09-07T06:38:55+08:00</updated>
            <author>
                <name>mersy</name>
                <uri>https://note.mersy418.com/</uri>
            </author>
            <content type="html"><![CDATA[
                
<p>Craft CMS の 5.4.2 がリリースされた。</p><blockquote><p>Release 5.4.2 · craftcms/cms<br><a href="https://github.com/craftcms/cms/releases/tag/5.4.2">https://github.com/craftcms/cms/releases/tag/5.4.2</a>&nbsp;</p></blockquote><p>Craft 5 で普段使わないようなフィールドとかを試しで触ったりしていると、時々バグっぽい挙動に出会う。<br>多言語対応されてるからこそのローカライズ的な問題っぽいなぁというかんじ。</p><p>日本語ユーザはそこまで多くないと思うけど issue 立てるとすぐ直してくれる。</p><ul><li><a href="https://github.com/craftcms/cms/issues/15565">https://github.com/craftcms/cms/issues/15565</a></li><li><a href="https://github.com/craftcms/cms/issues/15668">https://github.com/craftcms/cms/issues/15668</a></li></ul><p>ありがたい。</p><p>address フィールドで都道府県だけが日本語で表示されない、というのを issue にした。</p>

<figure class="figure">
  <img src="https://asset.mersy418.com/asset/20240905-105846.png" class="figure-img img-fluid rounded" loading="lazy" alt="">
  </figure>

<p>5.4.2 ですぐ直ったうえに、カードでの住所表示が日本的にわかりやすい並び順にも変えてくれてありがたい。</p>

<figure class="figure">
  <img src="https://asset.mersy418.com/asset/20240907-061510.png" class="figure-img img-fluid rounded" loading="lazy" alt="">
  </figure>

            ]]></content>
        </entry>
                <entry>
            <id>https://note.mersy418.com/article/checking-specifications</id>
            <link type="text/html" rel="alternate" href="https://note.mersy418.com/article/checking-specifications?utm_source=feed" />
            <title>仕様を確認・すりあわせていく仕事</title>
            <published>2024-08-14T07:00:00+08:00</published>
            <updated>2024-08-14T08:47:25+08:00</updated>
            <author>
                <name>mersy</name>
                <uri>https://note.mersy418.com/</uri>
            </author>
            <content type="html"><![CDATA[
                
<p>こちらを読んで。</p><blockquote><p>デザイナーとコーダーと開発PMを経験したからこそ、仕様の書き方が気になる話。 - Goodpatch Tech Blog<br><a href="https://goodpatch-tech.hatenablog.com/entry/specification">https://goodpatch-tech.hatenablog.com/entry/specification</a></p></blockquote><p>普段の自分のやってることがこんな感じのことだなぁ、と。</p><p>デザイン or ワイヤーフレームをもらって、それをみて表示仕様を確認するようなことをよくやる。<br>細かく質問をしてそこからどういう風な想定かを整理して、フロントエンドの仕様だったり、CMS に必要なものを整理することが多い。</p><p>受託（下請け）という立場だから確認するものが、デザイン・ワイヤーになるか、HTML とかざっくり作られたものになるかはあるけれど。<br>CMS 側の設計に関わるところをどういう風に作っていくかを考える。</p><p>Figma のデータなりで確認やりとりして、そこに仕様をまとめて残せるとある程度は楽になりそうな気がしている。<br>CMS 側を設定していくにはまた別の整理があった方が便利そうだと思っている。<br>デザイン・ワイヤーフレームの方でも考慮するにしても、こちらから確認してすりあわせるにしても、何かしら抜け漏れがあったりするからこのすりあわせはどうしても必要な気がする。</p><p>自分達の作業で手戻りが増えるのでここをしっかりやっておかないと、という意識はある。<br>とはいえ、実際に CMS の実装を始めるとポツポツ確認がでてくるから毎度まだまだだと反省ばかり。</p><p>とりあえず、普段やっているのがそういう繋ぎの仕事っていうイメージ。</p>

            ]]></content>
        </entry>
                <entry>
            <id>https://note.mersy418.com/article/craftcms-alt-edit</id>
            <link type="text/html" rel="alternate" href="https://note.mersy418.com/article/craftcms-alt-edit?utm_source=feed" />
            <title>エントリのアセットフィールドにaltの内容を表示する #craftcms</title>
            <published>2024-08-13T07:00:00+08:00</published>
            <updated>2024-08-13T17:36:04+08:00</updated>
            <author>
                <name>mersy</name>
                <uri>https://note.mersy418.com/</uri>
            </author>
            <content type="html"><![CDATA[
                
<p>Craft CMS に画像とかのアセットのフィールドを設定する。</p><p>ボリューム毎にフィールドレイアウトの設定ができ、そこでaltのフィールドを追加する事ができる。</p>

<figure class="figure">
  <img src="https://asset.mersy418.com/asset/20240809-122538.png" class="figure-img img-fluid rounded" loading="lazy" alt="">
  </figure>

<p>これを追加する事で画像にaltを設定することができる</p>

<figure class="figure">
  <img src="https://asset.mersy418.com/asset/20240809-122621.png" class="figure-img img-fluid rounded" loading="lazy" alt="">
  </figure>

<p>alt は画像毎に設定するのがいいのか、利用箇所毎に設定するのがいいのかは色々考えがありそうだけど。</p><p>このaltに設定した内容は、エントリの編集画面から画像をクリックすれば画像の編集画面がスライドしてくるのでそこで確認できる。</p><hr><p>画像のフィールドの表示を「カード」にするとエントリの編集画面上で alt を表示することができる。</p>

<figure class="figure">
  <img src="https://asset.mersy418.com/asset/20240809-122645.png" class="figure-img img-fluid rounded" loading="lazy" alt="">
  </figure>

<p>ボリュームのフィールドレイアウトで、alt フィールドの設定で「エレメントカードで表示」を有効にする。</p>

<figure class="figure">
  <img src="https://asset.mersy418.com/asset/20240809-122705.png" class="figure-img img-fluid rounded" loading="lazy" alt="">
  </figure>

<p>これをすることで、表示はカードっぽくなり、alt の内容も表示される。</p>

<figure class="figure">
  <img src="https://asset.mersy418.com/asset/20240809-122841.png" class="figure-img img-fluid rounded" loading="lazy" alt="">
  </figure>

<p>ぱっと見このテキストが alt フィールドのものなのかどうかはわかりにくいが、、、<br>慣れてしまえばあることがすぐ確認できてありがたい。</p><p>アセットフィールドの表示形式が「カード」以外の他の「リスト」「大きなサムネイル」の場合は alt フィールドの値は表示されない。</p>

<figure class="figure">
  <img src="https://asset.mersy418.com/asset/20240809-122733.png" class="figure-img img-fluid rounded" loading="lazy" alt="">
  </figure>

<p>アセットフィールドの表示形式で「カード」が追加されたのは最近なイメージだけど、場所をとるからどうなんだろうなぁ、、、と思ったりしていた。<br>このブログの設定もこんな感じで Matrix の中にリストにしてある。</p>

<figure class="figure">
  <img src="https://asset.mersy418.com/asset/20240809-125619.png" class="figure-img img-fluid rounded" loading="lazy" alt="">
  </figure>

<p>とはいえ、こういう用途があるなら常に「カード」にしておくのもいいかもなぁと思い始めている。</p><p>フィールド毎に表示形式を選べるよりは、インスタンスで同じフィールドも複数設置できるので、フィールドレイアウトの方で表示形式の設定をできたり、上書き出来るといいのかもなぁ、、と思ったりもする。</p><p>とはいえこういう細かい改善は、著者の人にとって使いやすくするための改善なんだろう。</p>

            ]]></content>
        </entry>
                <entry>
            <id>https://note.mersy418.com/article/craft-5-3-link-fields</id>
            <link type="text/html" rel="alternate" href="https://note.mersy418.com/article/craft-5-3-link-fields?utm_source=feed" />
            <title>Craft 5.3：Link fields を触ってみる</title>
            <published>2024-08-09T07:00:00+08:00</published>
            <updated>2024-08-09T12:08:32+08:00</updated>
            <author>
                <name>mersy</name>
                <uri>https://note.mersy418.com/</uri>
            </author>
            <content type="html"><![CDATA[
                
<p>Craft 5.3 で追加された Link fields を触ってみる。</p>

<figure class="figure">
  <img src="https://asset.mersy418.com/asset/20240808-054218.png" class="figure-img img-fluid rounded" loading="lazy" alt="">
  </figure>

<p>これまでのURLフィールドみたいな感じではあるが、リンク先の指定方法を選べる</p>

<figure class="figure">
  <img src="https://asset.mersy418.com/asset/20240808-040832.png" class="figure-img img-fluid rounded" loading="lazy" alt="">
  </figure>

<p>設定で選べるのはこんな感じ</p>

<figure class="figure">
  <img src="https://asset.mersy418.com/asset/20240808-054340.png" class="figure-img img-fluid rounded" loading="lazy" alt="">
  </figure>

<p>アセットはボリュームやファイルの種類を設定出来る</p>

<figure class="figure">
  <img src="https://asset.mersy418.com/asset/20240807-145628.png" class="figure-img img-fluid rounded" loading="lazy" alt="">
  </figure>

<p>Entry も同様にどのセクションを対象にするかを選ぶ事ができる</p>

<figure class="figure">
  <img src="https://asset.mersy418.com/asset/20240808-041021.png" class="figure-img img-fluid rounded" loading="lazy" alt="">
  </figure>

<p>最初、セクションが選択肢に出てこないなぁ、、、、と思っていたが。<br>セクション自体の設定の方でURLの設定をしてなかったのが原因。</p>

<figure class="figure">
  <img src="https://asset.mersy418.com/asset/20240808-054703.png" class="figure-img img-fluid rounded" loading="lazy" alt="">
  </figure>

<p>カテゴリは将来的にエントリで管理してく想定だろうから、ここでは試さず。</p><hr><p>別窓で開くリンクにするかどうか、リンクテキストをカスタマイズするか、といったことは出来ない。<br>なのでそれらが必要な場合はこれまで通りプラグインを使って対応するなり、別途フィールドを用意して Matrix にするなどして対応するのがよさそう。</p>

            ]]></content>
        </entry>
                <entry>
            <id>https://note.mersy418.com/article/craft-cloud-introduce</id>
            <link type="text/html" rel="alternate" href="https://note.mersy418.com/article/craft-cloud-introduce?utm_source=feed" />
            <title>Craft Cloud を使っていきたい気がする</title>
            <published>2024-08-08T06:00:00+08:00</published>
            <updated>2024-08-08T06:15:27+08:00</updated>
            <author>
                <name>mersy</name>
                <uri>https://note.mersy418.com/</uri>
            </author>
            <content type="html"><![CDATA[
                
<p>Craft Cloud の紹介記事がでてた</p><blockquote><p>Introducing Craft Cloud | Craft CMS<br><a href="https://craftcms.com/blog/introducing-craft-cloud">https://craftcms.com/blog/introducing-craft-cloud</a></p></blockquote><p>CMSの開発元が提供するクラウドサービス。<br>Acquia の Drupal みたいなかんじか。</p><p>Movable Type の MTクラウド、 PowerCMS の PowerCMS クラウド。<br>サーバー込みの方が選ばれる方もあるし。</p><h2>月額$120からの料金設定</h2><p>料金設定がこんな感じだけど、</p><blockquote><p>Craft Cloud Team is $130 per month, or $120 per month if paid annually. It includes Craft CMS Team edition, two environments, 10GB asset storage (upgradable to 250GB), unlimited build minutes, and unlimited database storage.</p><p>Craft Cloud Pro is $260 per month, or $240 per month if paid annually. It includes Craft CMS Pro edition, three environments, 20GB asset storage (upgradable to 250GB), unlimited build minutes, and unlimited database storage.</p></blockquote><p>ライセンス込みで考えたら1ヶ月分はライセンス代。</p><p>Craft CMS 自体は他のCMSと同様に安いレンタルサーバでも動くから、その構成よりは確かに高いが。<br>サーバのメンテ含めてやってもらえると考えたら人が動くより安い。</p><p>自分のブログにこの値段だせるか？というのはあるが、、、<br>これを使ってサービスとかできたら面白そう（手段の逆転</p><h2>All in One 的な機能群</h2><blockquote><p>Craft Cloud — Craft CMS hosting you can trust.<br><a href="https://craftcms.com/cloud">https://craftcms.com/cloud</a></p></blockquote><p>リポジトリとも連携するし、CLIコマンドも使えるし、CDNもある。<br>環境整備とかの手間を考えたら、とりあえずこれでいいんじゃ無いかなぁと思う案件はありそう。<br>SSHしたいとかは無理だろうけど。</p><p>CDN込みとかなら Blitz が要らなくなるとかはありそう。</p><p>ドメインの設定周りどんな感じだろう？と思ったけど、そこはトライアルでは確認出来なかった。<br>今度試しておこう。</p><h2>Headless CMS の選択肢の1つになるか？</h2><p>別に Twig をかかずに Headless に使ったっていいわけで。<br>標準の GraphQL でよければすぐ使えそう。</p><p>そういう用途でも使うユーザが増えてほしいところだなぁ。<br>Craft 5 になってだいぶ便利になったし。</p>

            ]]></content>
        </entry>
                <entry>
            <id>https://note.mersy418.com/article/craft-5-3-released</id>
            <link type="text/html" rel="alternate" href="https://note.mersy418.com/article/craft-5-3-released?utm_source=feed" />
            <title>Craft 5.3 リリース！ #craftcms</title>
            <published>2024-08-07T07:00:00+08:00</published>
            <updated>2024-08-07T07:24:17+08:00</updated>
            <author>
                <name>mersy</name>
                <uri>https://note.mersy418.com/</uri>
            </author>
            <content type="html"><![CDATA[
                
<p>Craft 5.3 がリリースされた</p><blockquote><p>Craft 5.3 Released | Craft CMS<br><a href="https://craftcms.com/blog/craft-5-3-released">https://craftcms.com/blog/craft-5-3-released</a></p></blockquote><p>beta 試す前に beta は終わった。</p><ul><li>Content model cleanup commands.</li><li>Entry portability.</li><li>Link fields.</li><li>Multi-instance relation fields.</li><li>Translatable relation fields.</li><li>Entry type and field sorting.</li><li>Front-end header management.</li></ul><p>どれも便利そうだ。<br>一つずつ触って確認していこう。</p><p>構築済みのサイトも 5.3 にすると色々便利になりそうだし、構築中のものも 5.3 前提であれこれ変えていく必要がありそうだ（やり直し）。<br>command も用意されてるので整理自体も結構スムーズに出来るんじゃなかろうか、、、と期待。</p>

            ]]></content>
        </entry>
                <entry>
            <id>https://note.mersy418.com/article/craft-composer-json-craft-up</id>
            <link type="text/html" rel="alternate" href="https://note.mersy418.com/article/craft-composer-json-craft-up?utm_source=feed" />
            <title>Craft の composer.json を書き換えたときは craft up も実行しておく</title>
            <published>2024-08-06T20:00:00+08:00</published>
            <updated>2024-08-07T07:16:24+08:00</updated>
            <author>
                <name>mersy</name>
                <uri>https://note.mersy418.com/</uri>
            </author>
            <content type="html"><![CDATA[
                
<p>Craft 5.3 のベータが出たと思ったら、</p>



  <div class="max-w-3xl px-8 py-4 bg-white rounded-lg shadow-md dark:bg-gray-800">
    <div class="flex items-center justify-between">
      <span class="text-sm font-light text-gray-600 dark:text-gray-400">2024/8/1</span>
          </div>

    <div class="mt-2">
      <a href="https://note.mersy418.com/article/craft-cms-5-3-0-beta-1" class="text-xl font-bold text-gray-700 dark:text-white hover:text-gray-600 dark:hover:text-gray-200 hover:underline">Craft CMS 5.3.0-beta.1 リリース！</a>
          </div>
  </div>

<p>5.3 はもうリリースされた</p><blockquote><p>Craft 5.3 Released | Craft CMS<br><a href="https://craftcms.com/blog/craft-5-3-released">https://craftcms.com/blog/craft-5-3-released</a></p></blockquote><p>先日試したときは beta をインストール出来ないなぁ、、、と思っていて、サポートに聞いてみたら、以下の手順を教えてくれた。<br>Tommyさんが日本語で回答してくれるのでありがたすぎる。。。（一応英語もつけてメールしているが）</p>

<pre>composer.json で 5.3.0-beta.2 に設定
composer update
craft up</pre>

<p><code>craft up</code> をやっていなかった。</p><p><code>craft up</code> を実行したところmigrationするかを聞かれて</p>

<pre>$ ./craft up
Checking for pending Craft and plugin migrations ...
Total 2 new Craft migrations to be applied:
    - m240723_214330_drop_bulkop_fk
    - m240731_053543_soft_delete_fields

Apply the above migrations? (yes|no) [no]:yes
Create database backup? (yes|no) [yes]:
Backing up the database ... done
*** applying m240723_214330_drop_bulkop_fk
    &gt; dropping foreign key on {{%elements_bulkops}} if it exists ... done (time: 0.013s)
*** applied m240723_214330_drop_bulkop_fk (time: 0.020s)

*** applying m240731_053543_soft_delete_fields
    &gt; add column dateDeleted datetime NULL DEFAULT NULL AFTER `dateUpdated` to table {{%fields}} ... done (time: 0.013s)
    &gt; create index idx_ggluzpvacjtlqxjusdvotzytxkglshfzxwnp on {{%fields}} (dateDeleted) ... done (time: 0.016s)
*** applied m240731_053543_soft_delete_fields (time: 0.034s)


2 migrations were applied.

Migrated up successfully.

Checking for pending content migrations ...
No new migrations found. Your system is up-to-date.</pre>

<p>無事 5.3 ベータがインストール出来た。</p><p><a href="https://x.com/bun">@BUN</a> に聞いてみたら、composer.json 書き換えて <code>composer update</code> した後は <code>./craft migrate/all</code> か <code>./craft up</code> はやっておいた方がよさそうな感じだった。<br>今後気をつけていこう。</p><hr><p>ちなみに終わってないなーと、途中で終わってたと思われるのはこんな感じ</p>

<pre>$ composer update
Deprecation Notice: Using ${var} in strings is deprecated, use {$var} instead in phar:///usr/local/bin/composer8/src/Composer/Autoload/AutoloadGenerator.php:879
Deprecation Notice: Using ${var} in strings is deprecated, use {$var} instead in phar:///usr/local/bin/composer8/src/Composer/Autoload/AutoloadGenerator.php:884
Loading composer repositories with package information
Updating dependencies
Lock file operations: 0 installs, 4 updates, 0 removals
  - Upgrading craftcms/cms (5.2.10 =&gt; 5.3.0-beta.2)
  - Upgrading enshrined/svg-sanitize (0.16.0 =&gt; 0.19.0)
  - Upgrading yiisoft/yii2 (2.0.50 =&gt; 2.0.51)
  - Upgrading yiisoft/yii2-debug (2.1.22 =&gt; 2.1.25)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 0 installs, 4 updates, 0 removals
  - Upgrading craftcms/cms (5.2.10 =&gt; 5.3.0-beta.2): Extracting archive
  - Upgrading yiisoft/yii2 (2.0.50 =&gt; 2.0.51): Extracting archive
  - Upgrading yiisoft/yii2-debug (2.1.22 =&gt; 2.1.25): Extracting archive
  - Upgrading enshrined/svg-sanitize (0.16.0 =&gt; 0.19.0): Extracting archive
Generating optimized autoload files

  Seems you have upgraded Yii Framework from version 2.0.50 to 2.0.51.

  Please check the upgrade notes for possible incompatible changes
  and adjust your application code accordingly.

  Upgrade from Yii 2.0.50
  -----------------------
  
  * Correcting the behavior for `JSON` column type in `MariaDb`.
  
  Example usage of `JSON` column type in `db`:
  
  ```php
  &lt;?php
  
  use yii\db\Schema;
  
  $db = Yii::$app-&gt;db;

以下略</pre>

            ]]></content>
        </entry>
                <entry>
            <id>https://note.mersy418.com/article/craft-cms-5-3-0-beta-1</id>
            <link type="text/html" rel="alternate" href="https://note.mersy418.com/article/craft-cms-5-3-0-beta-1?utm_source=feed" />
            <title>Craft CMS 5.3.0-beta.1 リリース！</title>
            <published>2024-08-01T08:30:00+08:00</published>
            <updated>2024-08-01T08:52:45+08:00</updated>
            <author>
                <name>mersy</name>
                <uri>https://note.mersy418.com/</uri>
            </author>
            <content type="html"><![CDATA[
                
<p>本日 Craft 5.3 beta1 が公開された</p><p>Release 5.3.0-beta.1 · craftcms/cms<br><a href="https://github.com/craftcms/cms/releases/tag/5.3.0-beta.1">https://github.com/craftcms/cms/releases/tag/5.3.0-beta.1</a></p><p>5になってから色々と追加・改善されてるものが色々とまた変わっていきそう</p><p>BUNさんが書いてるけどコマンドが追加されたり</p><div class="raw-html-embed"><blockquote class="twitter-tweet"><p lang="ja" dir="ltr">まだ beta1 だけど、Craft 5.3 の下記2つが特に期待。<br><br>・Added the entry-types/merge command.<br>・Added the fields/merge command. <a href="https://t.co/HtEk95kvJ1">https://t.co/HtEk95kvJ1</a></p>— 國分 亨 (@BUN) <a href="https://twitter.com/BUN/status/1818797988585820560?ref_src=twsrc%5Etfw">July 31, 2024</a></blockquote> <script async="" src="https://platform.twitter.com/widgets.js" charset="utf-8"></script> </div><blockquote><p>Added the “Link” field type, which replaces “URL”, and can store URLs, mailto and tel URIs, and entry/asset/category relations.&nbsp;</p></blockquote><p>URLフィールドがだいぶ改善されそうだし</p><blockquote><p>Added the ability to move entries between sections that allow the same entry type, via a new “Move to…” bulk action.&nbsp;</p></blockquote><p>入力タイプが同じセクション同士ならエントリの移動が出来るようになる様子<br>なんかそういう使い方したいときはありそう</p><blockquote><p>Relation fields are now multi-instance.&nbsp;</p></blockquote><p>とかも気になる。</p><p>ということで早速ベータを触ってこよう。</p>

            ]]></content>
        </entry>
                <entry>
            <id>https://note.mersy418.com/article/logseq-sync</id>
            <link type="text/html" rel="alternate" href="https://note.mersy418.com/article/logseq-sync?utm_source=feed" />
            <title>Logseq Sync を設定して同期がだいぶ早くなった</title>
            <published>2024-07-31T17:30:00+08:00</published>
            <updated>2024-07-31T17:59:07+08:00</updated>
            <author>
                <name>mersy</name>
                <uri>https://note.mersy418.com/</uri>
            </author>
            <content type="html"><![CDATA[
                
<p>今日は Logseq Sync の設定をやってみようと思っていたら、 Workflowy にコードブロックが追加されてた。</p><blockquote><p>コードブロック, インラインコード, 引用ブロック, 打ち消し線 – Workflowy<br><a href="https://blog.workflowy.com/ja-code-blocks-inline-code-quotes-strikethrough/">https://blog.workflowy.com/ja-code-blocks-inline-code-quotes-strikethrough/</a></p></blockquote><p>これはこれで魅力的。</p><p><strong>訂正 2024-07-31 17:51:40</strong><br>試しに触っていた Remnote の方がコードブロックをキーボードではインデント出来ない感じだった。<br>D&amp;Dで親子にすることは出来る。<br>ちょっと触った感じはコードの種類を選べたりと良さそう。</p><p>Workflowy の方はコードブロックをインデントしたり並べたりできた。<br>その分、コードブロック内でのタブ利用はできない。</p><p>Workflowy でデイリーノートやプロジェクト関係のノートをどう管理するか？を考えていたところでまずは Logseq Sync 試してからにすることにした。</p><hr><p>日常的にLogseq を使ってるけど、時々（ほんとまれ）スマホでみたときに iCloud 経由にしてるとほぼ同期されないというのがツラいところ。<br>Syncthing を使う方法がある中で、とりあえずは公式の Logseq Sync の設定をすることにした。</p><blockquote><p>How to Setup and Use Logseq Sync<br><a href="https://blog.logseq.com/how-to-setup-and-use-logseq-sync/">https://blog.logseq.com/how-to-setup-and-use-logseq-sync/</a></p></blockquote><p>その方が開発継続にも繫がるんじゃなかろうかという期待。。。</p><p>色々なツールを触ったりしてみてるけど、ひとまず書くだけであれば、 Logseq が一番なじんでいるというところで。<br>そこから色々と使いこなせているかどうかはまた別問題。</p><p>手順通りにやって同期して、大体問題無く出来た。<br>初回の同期がスマホ側はどうしても時間がかかったけど。1時間もかからなかったかな、、</p><p>一度全ての同期が済んでしまえば後は差分の同期のようなので、PCから更新して、後でスマホでみれば、少し待って同期されて反映が確認出来る。<br>いつ同期されるかわからない iCloud経由よりは全然いい感じ。</p><p>remote graph になったからかファイル名の制限が少し増えたっぽいように見える。<br>ファイル名変更のサジェストが結構出ている。「スラッシュを別のものに〜」的な感じで。</p><p>だいぶ改善できたとは思うのでもうしばらく触ってみる。<br>スマホ側でしばらく開いていないと更新差分が大きくなるだろうから、そいうときは遅いだろうなぁ。</p>

            ]]></content>
        </entry>
                <entry>
            <id>https://note.mersy418.com/article/github-project-item-limit-1200</id>
            <link type="text/html" rel="alternate" href="https://note.mersy418.com/article/github-project-item-limit-1200?utm_source=feed" />
            <title>GitHub Project で紐付けられるアイテムの上限は1200</title>
            <published>2024-06-21T11:00:00+08:00</published>
            <updated>2024-06-21T12:47:38+08:00</updated>
            <author>
                <name>mersy</name>
                <uri>https://note.mersy418.com/</uri>
            </author>
            <content type="html"><![CDATA[
                
<p>GitHub Projects でリポジトリに分散している issue を集約して確認出来るようにしていたのだけど、上限は 1200 だった。</p>

<figure class="figure">
  <img src="https://asset.mersy418.com/asset/20240619-111647.png" class="figure-img img-fluid rounded" loading="lazy" alt="">
  </figure>

<p>これまで特に意識してなかった。</p><p>ドキュメントにも書いてある。</p><blockquote><p>project への項目の追加 - GitHub Docs<br><a href="https://docs.github.com/ja/issues/planning-and-tracking-with-projects/managing-items-in-your-project/adding-items-to-your-project">https://docs.github.com/ja/issues/planning-and-tracking-with-projects/managing-items-in-your-project/adding-items-to-your-project</a></p></blockquote><p>とりあえず自動でアーカイブするようにしておいた方がよさそうだ。</p><blockquote><p>アイテムを自動的にアーカイブする - GitHub Docs<br><a href="https://docs.github.com/ja/issues/planning-and-tracking-with-projects/automating-your-project/archiving-items-automatically">https://docs.github.com/ja/issues/planning-and-tracking-with-projects/automating-your-project/archiving-items-automatically</a>&nbsp;</p></blockquote><p>アーカイブしたものを一定期間経過したら削除するとかできるのかな。<br>調べてみよう。</p>

            ]]></content>
        </entry>
                <entry>
            <id>https://note.mersy418.com/article/checkvist-outliner</id>
            <link type="text/html" rel="alternate" href="https://note.mersy418.com/article/checkvist-outliner?utm_source=feed" />
            <title>checkvist はアウトライナーっぽく使えそうな雰囲気がある</title>
            <published>2024-06-12T12:00:00+08:00</published>
            <updated>2024-06-12T12:08:49+08:00</updated>
            <author>
                <name>mersy</name>
                <uri>https://note.mersy418.com/</uri>
            </author>
            <content type="html"><![CDATA[
                
<p>アウトライナーでそのまま公開出来るようなのはなさそうか？？というのを先日書いた。</p>



  <div class="max-w-3xl px-8 py-4 bg-white rounded-lg shadow-md dark:bg-gray-800">
    <div class="flex items-center justify-between">
      <span class="text-sm font-light text-gray-600 dark:text-gray-400">2024/6/8</span>
          </div>

    <div class="mt-2">
      <a href="https://note.mersy418.com/article/diary_20240608" class="text-xl font-bold text-gray-700 dark:text-white hover:text-gray-600 dark:hover:text-gray-200 hover:underline">ウェブサイト・ブログ記事の代わりにアウトライナーで作ったものをそのまま公開する方法が無いかを考えてみる</a>
          </div>
  </div>

<p>たまたま見つけた checkvist というのはアウトライナーっぽく使える感じではあった。</p><blockquote><p>checkvist<br><a href="https://checkvist.com/">https://checkvist.com/</a></p></blockquote><p>Todo管理っぽいのをメインで想定してそうではあるのだけど、チェックボックスとかにしなければアウトライナーとして色々使えそうな雰囲気はある。<br>インデントやフォーカスも問題無い。</p><p>若干もっさりというか、引っかかる感じはあるけど、仕方無いところなのかも知れない。</p><p>アウトライナーであれこれかいていってそこにやることメモったり、やっていった内容もメモったりするわけだから、とりあえず先にタスクっぽいのを洗い出す、というのが始まりになるツールと似た感じになるんだろうなぁ。</p><p>これを使っていこうとはならなかったが、ひとまず悪くなさそう。<br>これならLogseq から Export したものをどこかで公開した方がいいのかも知れない、とおもったので、今度はそれをやってみる。</p>

            ]]></content>
        </entry>
                <entry>
            <id>https://note.mersy418.com/article/craftcms-ckeditor-height</id>
            <link type="text/html" rel="alternate" href="https://note.mersy418.com/article/craftcms-ckeditor-height?utm_source=feed" />
            <title>Craft CMS の CKEditor フィールドの高さを設定する #craftcms</title>
            <published>2024-06-11T10:00:00+08:00</published>
            <updated>2024-06-11T10:43:18+08:00</updated>
            <author>
                <name>mersy</name>
                <uri>https://note.mersy418.com/</uri>
            </author>
            <content type="html"><![CDATA[
                
<p><a href="https://x.com/SHIN_DEVELOP">@SHIN_DEVELOP</a> さんが <a href="https://x.com/SHIN_DEVELOP/status/1799042900862574834">Tweet</a> されてて、CKEditor の高さを初期値設定出来るのかな？と思って調べてみた。</p><p>↓デフォルトの状態</p>

<figure class="figure">
  <img src="https://asset.mersy418.com/asset/20240611-103432.png" class="figure-img img-fluid rounded" loading="lazy" alt="">
  </figure>

<p>CKEditor のドキュメント見た感じで、これは Angular のだけど</p><blockquote><p>Angular rich text editor component | CKEditor 5 documentation<br><a href="https://ckeditor.com/docs/ckeditor5/latest/installation/integrations/angular.html#setting-the-height-via-a-global-style-sheet">https://ckeditor.com/docs/ckeditor5/latest/installation/integrations/angular.html#setting-the-height-via-a-global-style-sheet</a></p></blockquote><p>CKEditor の config に</p>

<pre>.ck-editor__editable_inline {
    min-height: 250px;
}</pre>

<figure class="figure">
  <img src="https://asset.mersy418.com/asset/20240611-103816.png" class="figure-img img-fluid rounded" loading="lazy" alt="">
  </figure>

<p>って感じで書くことで初期値の高さは反映出来た。</p>

<figure class="figure">
  <img src="https://asset.mersy418.com/asset/20240611-103838.png" class="figure-img img-fluid rounded" loading="lazy" alt="">
  </figure>

<p>ただ、 Craft CMS 公式は下記のリンクを紹介してたからまたなんか違うのかも知れない。</p><blockquote><p>ckeditor5 - How to set the height of CKEditor 5 (Classic Editor) - Stack Overflow<br>https://stackoverflow.com/questions/46559354/how-to-set-the-height-of-ckeditor-5-classic-editor/46559355#46559355</p></blockquote>

            ]]></content>
        </entry>
                <entry>
            <id>https://note.mersy418.com/article/whats-feature-outliner-i-need</id>
            <link type="text/html" rel="alternate" href="https://note.mersy418.com/article/whats-feature-outliner-i-need?utm_source=feed" />
            <title>自分がアウトライナーに求めている機能はなんだろうか</title>
            <published>2024-06-10T00:00:00+08:00</published>
            <updated>2024-06-11T16:48:44+08:00</updated>
            <author>
                <name>mersy</name>
                <uri>https://note.mersy418.com/</uri>
            </author>
            <content type="html"><![CDATA[
                
<p>アウトライナーで管理したコンテンツをそのまま公開する方法はないか？？と考えていたが。</p><p>まずはよく聞くアウトライナーで自分がやりたいことはできるのだろうか？ということを改めて考えてみる。<br>アウトライナーは文章を書くのによく使われるからテキスト書いて、並び替えてっていうのはどのツールも当然できるわけだけど。</p><p>自分がメモしたい内容とかを考えると、画像を入れたいし、コードも入れたい。<br>この場合はスマホとかで使えるのはそこまで重視しないだろうから、そういう所だろうか。<br>アウトライナーとは少し別の話として、別のノートなり項目（node）にリンクを張れるといいかもしれない。<br>キーボードショートカットであれこれ出来るのも必要だろう。</p><p>って事をあれこれ考えて試してみていると、今の所は Logseq がそれを十分に満たしてくれているように思う。<br>Heptabase なんかはどういう感じなんだろうなぁ。</p><p><a href="https://heptabase.com/">https://heptabase.com/</a></p><p>トライアル7日しかないのでやってみるタイミングが重要そうだけど。</p><hr><p>Bear はアウトラインぽい感じにはできるがショートカットで項目の並び替えがうまく出来なかった気がする。</p><p>Bike は画像とかが入れられなかった気がする</p><p>Workflowy , Dynalist はよかったのだけど、コードが複数行の物を入れられなかった。</p><p>Roam Research は公開出来そうには見えるが、、、</p><p>Obsidian は Outline のプラグインを使うとコードの管理はイマイチな感じだった。</p><p>Scrapbox は Markdown と違う記法であることさえ覚えられれば、 Zoom すること以外はできそうな感じではある。</p><p>テキスト以外を管理するとなると、色々と影響があるんだなぁというところ。</p>

            ]]></content>
        </entry>
                <entry>
            <id>https://note.mersy418.com/article/diary_20240608</id>
            <link type="text/html" rel="alternate" href="https://note.mersy418.com/article/diary_20240608?utm_source=feed" />
            <title>ウェブサイト・ブログ記事の代わりにアウトライナーで作ったものをそのまま公開する方法が無いかを考えてみる</title>
            <published>2024-06-08T13:00:00+08:00</published>
            <updated>2024-06-08T13:11:37+08:00</updated>
            <author>
                <name>mersy</name>
                <uri>https://note.mersy418.com/</uri>
            </author>
            <content type="html"><![CDATA[
                
<p>日々のメモとかで Logseq をつかっている。<br>アウトライナーとして使いこなせているか？というとそれほどまではつかえていないのだけど、メモとか色々書いておくぶんには不自由ない感じでは使えてるかなぁというところ。<br>モバイルで使うのが同期の面で使いづらいところはあるのが。</p><p>ブログの記事とかをそこまで書いてないでいうのもおかしい話ではあるのだけど、ノートとかをアウトライナー的につかっていると、ブログの記事とかも丸っとアウトライナーで公開できないものかなぁ、と考えた。</p><p>記事を書こうと思うとなんかちゃんとしたものを書かないと、っていうところで手が止まったり、書きっぱなしになってしまうと、ストックというよりフローに近いのではないかと思ったり。</p><p>とりあえずは量書くなり、内容を見直してアップデートしていけばいい話ではあるのだけど。<br>それでればアウトライナーで日々コンテンツを更新したり追加する形でやっていく方がいいのではないかなぁ、と。<br>Obsidian Publish でやるようなのがイメージとしては近い所な気はする。</p><p>アウトライナーでWebサイトのように公開出来るようなツールっていうのはあるんだろうか？</p><p>Logseq は公開設定にしたページを HTML 出力するような機能はあるから、それを使えばそれっぽいことは出来そうではあるが。<br>その辺の手間が若干気にはなる。</p>

            ]]></content>
        </entry>
                <entry>
            <id>https://note.mersy418.com/article/super-table-eol</id>
            <link type="text/html" rel="alternate" href="https://note.mersy418.com/article/super-table-eol?utm_source=feed" />
            <title>Super Table プラグインが EOL</title>
            <published>2024-05-22T11:00:00+08:00</published>
            <updated>2024-05-22T14:49:44+08:00</updated>
            <author>
                <name>mersy</name>
                <uri>https://note.mersy418.com/</uri>
            </author>
            <content type="html"><![CDATA[
                
<p>Craft CMS でよく使われている Super Table プラグインが EOL になるという案内が出ていた。</p><blockquote><p>So long Super Table! | Verbb<br><a href="https://verbb.io/blog/so-long-super-table">https://verbb.io/blog/so-long-super-table</a></p></blockquote><p>Craft CMS といったら Matrix フィールドで柔軟にあれこれ出来るわけだけど。<br>とはいえ手が届かない細かい所をこの Super Table がフォローしてくれていた。</p><p>表形式の見た目で入力出来たりそれを増やしていくことができたり、と。</p><p>Craft 5 の Matrix in Matrix とかで機能的にはほぼまかなえてしまうからここで終了ということらしい。<br>おつかれさまでした＆これまでありがとうございました。</p><hr><p>Matrix への Migration も提供してくれるみたいなのもありがたい。<br>この辺は Craft 本体もそうだけど、 Migration, Update がコマンドでやりやすくフォローされているところがありがたすぎる。<br>もちろんこけるときもあるわけだけど、調整しながらで解消できる。</p>

            ]]></content>
        </entry>
                <entry>
            <id>https://note.mersy418.com/article/translate-call-felo-translator</id>
            <link type="text/html" rel="alternate" href="https://note.mersy418.com/article/translate-call-felo-translator?utm_source=feed" />
            <title>Felo Translator を使って通話を同時通訳しようとしてみた</title>
            <published>2024-05-21T13:00:00+08:00</published>
            <updated>2024-05-21T13:57:53+08:00</updated>
            <author>
                <name>mersy</name>
                <uri>https://note.mersy418.com/</uri>
            </author>
            <content type="html"><![CDATA[
                
<p>4月後半から我が家のインターネットが調子悪くなり、先日よりついに繫がらなくなってしまった、、、</p><blockquote><p>家のネットが不調でなかなかしんどい | mmmyanagiya<br><a href="https://mmm.mersy418.com/entry/707123">https://mmm.mersy418.com/entry/707123</a></p></blockquote><p>↑このときはまだ繫がってはいたが「しょっちゅう切れてる」みたいな感じで、仕事をしてるなかで不快な状況だった。</p><p>アポイントメントで来てくれた人はルーターを変えて「早くなったね？」といって帰って行った。<br>もう少しいてもらって状況確認してもらうようにすればよかった。</p><p>その後は状況は以前と同様で特に変わった感じはなく、、、</p><hr><p>それ以降もずっとサポートとやりとりしているのだが先週5月14日に「1時間程度モデムとルーターをオフにしてから再起動して」ということで実施したら残念ながらネット自体に繫がらなくなってしまった。</p><p>あれこれ試したりしてみるも変わる気配がないから、なんとなくもっと上流の問題なんだろうなぁと思うことにした。</p><p>サイトには<a href="https://myrepublic.net/sg/outage-notification-and-updates-broadband-voice-network/">障害報告</a>も出てるし、Facebook のプロモーションには繫がらないっていう苦情コメントで<a href="https://www.facebook.com/MyRepublicSG/posts/pfbid035XMVCQH1W4w9CJtnWVBtMeLHiuKXrSzvmgCsfhK9oW7ZwcFxqw7W4ZSgFLCNNQ2ml">軽く炎上</a>してるし、色々困った状況。<br>サポートには「どうしてもネットが繫がらなかったら電話してくれ」と言われていたので電話をすることにした。</p><h2>英語での電話に備える</h2><p>対面で英語話すならまだ身振り手振りなりなにかしらの対応ができるも、英語で電話のやりとりはなかなかにハード。。。</p><p>妻が在宅ならいいけど、いないときもあるし。。。<br>っていうことで電話でのやりとりに備えて準備をした。</p>

<figure class="figure">
  <img src="https://asset.mersy418.com/asset/IMG_0149.jpeg" class="figure-img img-fluid rounded" loading="lazy" alt="">
  </figure>

<p>iPhone と iPad のスピーカー・マイクの位置を確認してから良さそうな感じでレイアウト。<br>電話は iPhone のスピーカーでやる想定で、 iPad に <a href="https://x.com/h2ham">@h2ham</a> に教えてもらった <a href="https://translator.felo.me/ja">Felo Translator</a> をいれてリアルタイムに翻訳させてみた。</p><blockquote><p>Felo Translator<br><a href="https://translator.felo.me/ja">https://translator.felo.me/ja</a></p></blockquote><p>翻訳のスピードも早いし安定している。<br>事前の準備として Podcast を聞かせてみたりして翻訳状況を試した。</p><p>それぞれの言語も自動で認識してくれて適切に翻訳してくれるのでよさそう。</p><h2>Felo Translator 以外のアプリ</h2><p>他には iOS の翻訳アプリと ChatGPT 4o のアプリを試した。</p><p>翻訳アプリはいい感じで翻訳してくれてたんだけど、時々聞き取ってくれない事が多かった。</p><p>ChatGPT 4o のは事前に日英翻訳してくれと伝えておけば問題無い。<br>ただ、ボイスチャット自体に繫がらないことが結構あり、電話して話してる時にこれをつかっても繫がらなかったらワタワタして大変だなぁ、、、ということで一旦除外。</p><h2>当日実際に電話してみる</h2><p>当日、実際にサポートに電話かけてみたが、待てど暮らせど流れるのは自動応答メッセージのみ。<br>翻訳はちゃんとうごいてて、 Felo Translator はだいたい翻訳してくれてた 。（写真の状態）</p><p>翻訳されてるのをみてると、自分で音声をちゃんと聞いてないからこの翻訳が正しいのかどうかはわからない。<br>が、自分よりちゃんと聞き取れてるのは確実だろう。</p><p>どのアプリも対面で使いやすい感じにはなってるけど、電話もこれで行けそうな雰囲気がわかってよかった。<br>実際に人間が話す英語をこの2台の端末間でうまいことやれるのかは未知数ではある。</p><hr><p>Felo Translator は初めての課金だったからか1日100円くらいだった。<br>この100円はほぼ無駄になってしまったのが残念ではある。</p><p>ちなみにここ数日はサポートからメールのレスは来なくなったので、面倒くさくなったんだろうと思われる。<br>問い合わせが殺到してるのかも知れない。</p>

            ]]></content>
        </entry>
                <entry>
            <id>https://note.mersy418.com/article/postman-mt-dataapi-authentication</id>
            <link type="text/html" rel="alternate" href="https://note.mersy418.com/article/postman-mt-dataapi-authentication?utm_source=feed" />
            <title>Postman で認証が必要なMTのエンドポイントをまとめて認証する #movabletype</title>
            <published>2024-05-14T07:00:00+08:00</published>
            <updated>2024-05-14T07:01:24+08:00</updated>
            <author>
                <name>mersy</name>
                <uri>https://note.mersy418.com/</uri>
            </author>
            <content type="html"><![CDATA[
                
<p>普段、APIの動作確認をするときとかに <a href="https://www.postman.com/">Postman</a> をよく使う。</p><blockquote><p>Postman API Platform<br><a href="https://www.postman.com/">https://www.postman.com/</a>&nbsp;</p></blockquote><p>MTAppjQuery の問い合わせで DataAPI の確認したり、 Craft CMS の GraphQL の確認したり。<br>他のサービスの API 叩いてみたりするときに使っている。</p><h2>DataAPI の認証をまとめてやる</h2><p>MT の DataAPI を使う場合は認証が必要なエンドポイントとかがあって、そういうときは <a href="https://movabletype.github.io/mt-docs-data-api-reference/v6.html#tag/Authentication/paths/~1authentication/post">Authentication</a> のエンドポイントで認証して、受け取った accessToken をつかってあれこれ処理をする</p><blockquote><p>Movable Type Data API v6<br><a href="https://movabletype.github.io/mt-docs-data-api-reference/v6.html#tag/Authentication/paths/~1authentication/post">https://movabletype.github.io/mt-docs-data-api-reference/v6.html#tag/Authentication/paths/~1authentication/post</a>&nbsp;</p></blockquote><p>Collection の設定の中に「認証情報」「変数」の設定をするのとは別に、「Scripts」のところで 「Pre-request」「Post-response」の設定があった。<br>この Pre-request の設定をしておけば Collection 配下のリクエストとかで認証情報を使ってやれるような気がしたので試してみた。</p>

<figure class="figure">
  <img src="https://asset.mersy418.com/asset/20240513-182608.png" class="figure-img img-fluid rounded" loading="lazy" alt="">
  </figure>

<p>最初少し試してみたけど、 ChatGPT に聞いた方が早そうだったので聞いてみた。</p>

<figure class="figure">
  <img src="https://asset.mersy418.com/asset/20240513-183336.png" class="figure-img img-fluid rounded" loading="lazy" alt="">
  </figure>

<p>ChatGPT が教えてくれたコードがこんな感じ</p>

<pre>pm.sendRequest({
    url: pm.environment.get(&quot;base_url&quot;) + &#039;/v4/authentication&#039;,
    method: &#039;POST&#039;,
    header: {
        &#039;Content-Type&#039;: &#039;application/x-www-form-urlencoded&#039;
    },
    body: {
        mode: &#039;urlencoded&#039;,
        urlencoded: [
            {key: &quot;username&quot;, value: pm.environment.get(&quot;username&quot;), type: &quot;text&quot;},
            {key: &quot;password&quot;, value: pm.environment.get(&quot;password&quot;), type: &quot;text&quot;},
            {key: &quot;__mode&quot;, value: &quot;authenticate&quot;, type: &quot;text&quot;}
        ]
    }
}, function (err, res) {
    if (err) {
        console.log(err);
    } else {
        var authToken = res.json().accessToken;
        pm.environment.set(&quot;authToken&quot;, authToken);
        console.log(&#039;Authentication token saved: &#039;, authToken);
    }
});</pre>

<p>変数の設定・取得が <code>environment</code> を使う形になっていたのだけど、変数の設定は <code>Collection</code> の方でやっていたので書き換える</p>

<pre>url: pm.environment.get(&quot;base_url&quot;) + &#039;/v4/authentication&#039;,
↓↓↓
url: pm.collectionVariables.get(&quot;base_url&quot;) + &#039;/v6/authentication&#039;,</pre>

<p>ついでに v6 にしておく。</p><p>Postman の変数関係</p><blockquote><p>Store and reuse values using variables | Postman Learning Center<br><a href="https://learning.postman.com/docs/sending-requests/variables/variables/">https://learning.postman.com/docs/sending-requests/variables/variables/</a>&nbsp;</p></blockquote><p>あとは <code>ClientID</code> を渡しておく</p>

<pre>body: {
        mode: &#039;urlencoded&#039;,
        urlencoded: [
            {key: &quot;username&quot;, value: pm.environment.get(&quot;username&quot;), type: &quot;text&quot;},
            {key: &quot;password&quot;, value: pm.environment.get(&quot;password&quot;), type: &quot;text&quot;},
            {key: &quot;__mode&quot;, value: &quot;authenticate&quot;, type: &quot;text&quot;}
        ]
    }

↓↓↓

    body: {
        mode: &#039;urlencoded&#039;,
        urlencoded: [
            {key: &quot;username&quot;, value: pm.collectionVariables.get(&quot;username&quot;), type: &quot;text&quot;},
            {key: &quot;password&quot;, value: pm.collectionVariables.get(&quot;password&quot;), type: &quot;text&quot;},
            {key: &quot;clientId&quot;, value: pm.collectionVariables.get(&quot;clientId&quot;), type: &quot;text&quot;}
        ]
    }

===

pm.environment.set(&quot;authToken&quot;, authToken);
↓↓↓
pm.collectionVariables.set(&quot;authToken&quot;, authToken);</pre>

<p><code>__mode</code> は要らなかった。</p><p>これで例えば認証が必要なエンドポイントを叩く時に「Headers」に <code>accessToken</code> を渡しておく。</p>

<figure class="figure">
  <img src="https://asset.mersy418.com/asset/20240513-184238.png" class="figure-img img-fluid rounded" loading="lazy" alt="">
  </figure>

<pre>X-MT-Authorization : MTAuth accessToken={{authToken}}</pre>

<p>これでテンプレートの情報とかを取得出来た。</p><p>ChatGPT は「Authorization」タブのタイプ「Bearer Token」に保存すると教えてくれたのだけど、「Authorization」タブで保存するならタイプは「API Key」に保存するような気がする。</p>

<figure class="figure">
  <img src="https://asset.mersy418.com/asset/20240513-184728.png" class="figure-img img-fluid rounded" loading="lazy" alt="">
  </figure>

<p>とりあえず API Key に保存する形で問題無かった。</p><h2>Collections 単位で認証する</h2><p>この「Authorization」自体も Collection の方で済ませてしまえば、配下のものは認証も通過して使う事ができた。</p>

<figure class="figure">
  <img src="https://asset.mersy418.com/asset/20240513-185316.png" class="figure-img img-fluid rounded" loading="lazy" alt="">
  </figure>

<p>Request の方の「Authorization」の設定</p>

<figure class="figure">
  <img src="https://asset.mersy418.com/asset/20240513-185455.png" class="figure-img img-fluid rounded" loading="lazy" alt="">
  </figure>

<p>Request の方の「Headers」の設定は無効状態</p>

<figure class="figure">
  <img src="https://asset.mersy418.com/asset/20240513-185528.png" class="figure-img img-fluid rounded" loading="lazy" alt="">
  </figure>

<p>Collection の方で設定してるから毎回認証が走りそう。<br>その辺は Token が有効かどうかとかで判断するとか入れてもいいのかも知れない。</p><hr><p>普通にエディタとかでやる方がいい人はにっくさんや高橋さんの記事が参考になりそう</p><ul><li>Movable Type の Data API でユーザー認証を行う #JavaScript - Qiita<br><a href="https://qiita.com/TakeshiNickOsanai/items/5508b2df13be72bf4503">https://qiita.com/TakeshiNickOsanai/items/5508b2df13be72bf4503</a></li><li>Movable Type 7のData APIをJavaScriptのみで実装する #JavaScript - Qiita<br><a href="https://qiita.com/TakahashiMasaya/items/c30cbcf264f3186e0d28">https://qiita.com/TakahashiMasaya/items/c30cbcf264f3186e0d28</a>&nbsp;</li></ul>

            ]]></content>
        </entry>
                <entry>
            <id>https://note.mersy418.com/article/craft5-editing-entry</id>
            <link type="text/html" rel="alternate" href="https://note.mersy418.com/article/craft5-editing-entry?utm_source=feed" />
            <title>Craft CMS 5 の編集画面は幅広にできる #craftcms</title>
            <published>2024-05-13T19:00:00+08:00</published>
            <updated>2024-05-13T19:27:52+08:00</updated>
            <author>
                <name>mersy</name>
                <uri>https://note.mersy418.com/</uri>
            </author>
            <content type="html"><![CDATA[
                
<p>Craft 5 は大きい機能追加もあったけど、細かい所も色々と使いやすくなっている。</p><ul><li>Abstrakt | New Features in Craft CMS 5<br><a href="https://weareabstrakt.com/insights/new-features-in-craft-cms-5">https://weareabstrakt.com/insights/new-features-in-craft-cms-5</a>&nbsp;</li><li>Should you be using Craft 5?<br><a href="https://putyourlightson.com/articles/should-you-be-using-craft-5">https://putyourlightson.com/articles/should-you-be-using-craft-5</a>&nbsp;</li></ul><p>そういうのもあって「Craft 5 いいぞ」って思う。</p><p>些細なところだけど、編集画面でこの右上のアイコンをクリックすると</p>

<figure class="figure">
  <img src="https://asset.mersy418.com/asset/20240513-191505.png" class="figure-img img-fluid rounded" loading="lazy" alt="">
  </figure>

<p>編集画面が広くなる</p>

<figure class="figure">
  <img src="https://asset.mersy418.com/asset/20240513-191520.png" class="figure-img img-fluid rounded" loading="lazy" alt="">
  </figure>

<p>たかだか右カラムの話だけど、左カラムのサイドバーも閉じることが出来るので編集画面は広く使える</p>

<figure class="figure">
  <img src="https://asset.mersy418.com/asset/20240513-191821.png" class="figure-img img-fluid rounded" loading="lazy" alt="">
  </figure>

<p>Craft CMS は Author Experience とかいってたような気がするし、 Accessibility とか頑張ってるから編集画面は日々改善されていっているように思う。</p><ul><li>Craft 5 Released—with New Team Edition! | Craft CMS<br><a href="https://craftcms.com/blog/craft-5">https://craftcms.com/blog/craft-5</a>&nbsp;</li><li>Craft CMS Accessibility Conformance Report<br><a href="https://craftcms.com/accessibility/report">https://craftcms.com/accessibility/report</a>&nbsp;</li></ul>

            ]]></content>
        </entry>
                <entry>
            <id>https://note.mersy418.com/article/craftcms-imagerx-automatic-generation</id>
            <link type="text/html" rel="alternate" href="https://note.mersy418.com/article/craftcms-imagerx-automatic-generation?utm_source=feed" />
            <title>Craft CMS の Imager X プラグインを使って画像登録時に処理をする #craftcms</title>
            <published>2024-05-01T00:00:00+08:00</published>
            <updated>2024-05-13T19:15:25+08:00</updated>
            <author>
                <name>mersy</name>
                <uri>https://note.mersy418.com/</uri>
            </author>
            <content type="html"><![CDATA[
                
<p>CMSにアップロードする際に画像のサイズを変えたり、種類を変えたいという要望は多い。<br>先日の Transform を利用する方法は CMS の機能としては手動で利用する感じになる。</p>



  <div class="max-w-3xl px-8 py-4 bg-white rounded-lg shadow-md dark:bg-gray-800">
    <div class="flex items-center justify-between">
      <span class="text-sm font-light text-gray-600 dark:text-gray-400">2024/4/25</span>
          </div>

    <div class="mt-2">
      <a href="https://note.mersy418.com/article/craft-cms-transform-format" class="text-xl font-bold text-gray-700 dark:text-white hover:text-gray-600 dark:hover:text-gray-200 hover:underline">Craft CMS で画像のリサイズをせずに画像フォーマットを変換する #craftcms</a>
          </div>
  </div>

<p>（なんかこれを自動でやる方法があったような気がしないでもないのだが、、、思い出せない）<br></p>
<p>以前、 Watermarkを入れる処理や、 WebP にするので Imager X プラグインを使って試した</p>



  <div class="max-w-3xl px-8 py-4 bg-white rounded-lg shadow-md dark:bg-gray-800">
    <div class="flex items-center justify-between">
      <span class="text-sm font-light text-gray-600 dark:text-gray-400">2019/8/21</span>
          </div>

    <div class="mt-2">
      <a href="https://note.mersy418.com/article/craftcms-imager-plugin-watermark" class="text-xl font-bold text-gray-700 dark:text-white hover:text-gray-600 dark:hover:text-gray-200 hover:underline">Craft CMS で Imager プラグインをつかって画像に透かし（watermark）を入れてみる #craftcms</a>
          </div>
  </div>

  <div class="max-w-3xl px-8 py-4 bg-white rounded-lg shadow-md dark:bg-gray-800">
    <div class="flex items-center justify-between">
      <span class="text-sm font-light text-gray-600 dark:text-gray-400">2019/9/6</span>
          </div>

    <div class="mt-2">
      <a href="https://note.mersy418.com/article/craftcms-imager-pretransform" class="text-xl font-bold text-gray-700 dark:text-white hover:text-gray-600 dark:hover:text-gray-200 hover:underline">Craft CMS の Imager Pretransform プラグインを試してみた #craftcms</a>
          </div>
  </div>

  <div class="max-w-3xl px-8 py-4 bg-white rounded-lg shadow-md dark:bg-gray-800">
    <div class="flex items-center justify-between">
      <span class="text-sm font-light text-gray-600 dark:text-gray-400">2022/7/26</span>
          </div>

    <div class="mt-2">
      <a href="https://note.mersy418.com/article/craftcms-imagerx-webp" class="text-xl font-bold text-gray-700 dark:text-white hover:text-gray-600 dark:hover:text-gray-200 hover:underline">Craft CMS の Imager X プラグインで画像を WebP に変換する #craftcms</a>
          </div>
  </div>

  <div class="max-w-3xl px-8 py-4 bg-white rounded-lg shadow-md dark:bg-gray-800">
    <div class="flex items-center justify-between">
      <span class="text-sm font-light text-gray-600 dark:text-gray-400">2022/7/29</span>
          </div>

    <div class="mt-2">
      <a href="https://note.mersy418.com/article/craftcms-imagerx-avif" class="text-xl font-bold text-gray-700 dark:text-white hover:text-gray-600 dark:hover:text-gray-200 hover:underline">Craft CMS の Imager X プラグインで画像を AVIF に変換する #craftcms</a>
          </div>
  </div>

<p>その時にあったかどうかは定かではないが、いまは <a href="https://imager-x.spacecat.ninja/">Imager X プラグイン</a>の Pro版を利用すれば画像をアップロードした際に処理をすることが出来る。</p><p>基本的には&nbsp;Automatic generation of transforms に書いてある通りになる。</p><blockquote><p>Automatic generation of transforms | Imager X 5.0<br><a href="https://imager-x.spacecat.ninja/usage/generate.html">https://imager-x.spacecat.ninj...</a></p></blockquote><p><code>imager-x-transforms.php</code> のファイルを config 配下に用意して Transform の定義をする</p>

<pre>&lt;?php

return [
    &#039;test4&#039; =&gt; [
        &#039;displayName&#039; =&gt; &#039;test4&#039;,
        &#039;transforms&#039; =&gt; [
            [&#039;width&#039; =&gt; 2000,
             &#039;watermark&#039; =&gt; [
                &#039;image&#039; =&gt; &quot;https://note.mersy418.com/bitpart-brown-big.png&quot;,
                &#039;width&#039; =&gt; 200,
                &#039;height&#039; =&gt; 80,
                &#039;position&#039; =&gt; [&#039;left&#039; =&gt; 100, &#039;top&#039; =&gt; 250],
                &#039;opacity&#039; =&gt; 0.5,
                &#039;blendMode&#039; =&gt; &quot;multiply&quot;
            	]
            ],
        ],
        &#039;defaults&#039; =&gt; [
            &#039;format&#039; =&gt; &#039;webp&#039;
        ]
    ]
];</pre>

<p><code>imager-x-generate.php</code> のファイルを config 配下に用意して、どのボリュームに対してどの Transform を適用するか？を記載する。</p>

<pre>&lt;?php

return [
    &#039;volumes&#039; =&gt; [
        &#039;test&#039; =&gt; [&#039;test4&#039;],
    ]
];</pre>

<p>これだけで画像をアップロードした際に処理が施された画像が生成される。<br>アップロードした元画像はそのままで、別の場所に画像が生成される形になる。</p><p>アセット自体を圧縮したものにするとかは出来るのかどうか、、、はもう少し調べてみたい。<br>何かのことを考えると元画像は残しておきたい所だし。</p><hr><p>自動で Transform が出来る云々は CKEditor のフィールドでデフォルトで適用する Transform を選択出来るのをイメージしてるのかも知れない。</p>

<figure class="figure">
  <img src="https://asset.mersy418.com/asset/20240501-050526.png" class="figure-img img-fluid rounded" loading="lazy" alt="">
  </figure>

<p>ただまぁ、これは CKEditor フィールド経由でアップしたときは適用できるけど、Asset のフィールドの場合は適用されないわけで。<br>その辺は運用にもよるところはありそう。</p>

            ]]></content>
        </entry>
                <entry>
            <id>https://note.mersy418.com/article/update-craft5</id>
            <link type="text/html" rel="alternate" href="https://note.mersy418.com/article/update-craft5?utm_source=feed" />
            <title>ブログを Craft 5 にアップデートした #craftcms</title>
            <published>2024-04-29T12:00:00+08:00</published>
            <updated>2024-04-29T12:17:14+08:00</updated>
            <author>
                <name>mersy</name>
                <uri>https://note.mersy418.com/</uri>
            </author>
            <content type="html"><![CDATA[
                
<p>Craft 5 のアップデート検証を何回かやってみてとりあえず大丈夫そうなのでアップデート検証したもので切り替えた。</p><p>ほぼほぼ用意されている手順通りにやれば問題無い。</p><blockquote><p>Upgrading from Craft 4 | Craft CMS Documentation | 5.x<br><a href="https://craftcms.com/docs/5.x/upgrade.html">https://craftcms.com/docs/5.x/upgrade.html</a></p></blockquote><p>migration してくれて手順間違えなければ大体問題なさそう。<br>スペック的な問題なのか migration 中にDB接続がタイムアウトするのかなんかで止まることが何回かあった。</p><p>この辺はもう少し調べてもよかったかもしれない。</p><p>記事書いたりしながら様子見。</p><h2>手順メモ</h2><p>ざっと手順メモ</p><ul><li>アップデート用のサブドメイン作成、DNS設定</li><li>アップデート用のDB作成・ユーザ設定</li><li>サイトを最新版の Craft 4 にアップデート</li><li>サイトのバックアップ取得</li><li>アップデート用Craft 4 をインストール</li><li>DBの接続先をアップデート用に変更</li><li>アップデート用のドキュメントルートからの参照をアップデート用の Craft に設定</li><li>サイトの .env / composer.json の内容をアップデート用 Craft の方に移植</li><li>composer install</li><li>バックアップをとったDBからリストア</li><li>サイトの templates 類をアップデート用 Craft にも置く</li><li>使ってないプラグインとかを削除</li><li>PHP8.2 に変更</li><li>composer.json の Craft CMS のバージョンを5に変更</li><li>composer update<ul><li>image-resizer, super-table がインストール出来なかったので一旦外した</li></ul></li><li>./craft migrate/all<ul><li>何回かエラーで止まったりしたのでDB空の復元と繰り返した</li></ul></li><li>テンプレートのエラー修正</li><li>カテゴリをエントリに変更</li><li>タグをエントリに変更</li><li>Redactor を CKEditor に変更</li><li>動作確認</li></ul><p>とりあえずこんな感じでアップデート用の環境でざっと動作確認して、問題なさそうなのでドメイン周りとかの設定変更して終了。</p><hr><p>Redactor で使っていたものは大体そのまま使えそう or いらない感じだった。</p><p>Handle は CKEditor だと Mentions っぽいのだけど、ここは色々やる必要がありそうだったので後回し。</p><blockquote><p>Handle- Redactor<br><a href="https://imperavi.com/redactor/legacy/redactor-classic/plugins/handle/">https://imperavi.com/redactor/legacy/redactor-classic/plugins/handle/</a></p><p>Mentions| CKEditor 5 Documentation<br><a href="https://ckeditor.com/docs/ckeditor5/latest/features/mentions.html">https://ckeditor.com/docs/ckeditor5/latest/features/mentions.html</a>&nbsp;</p></blockquote><p>新しいおもちゃという感じ。</p><p>カテゴリ、タグは将来エントリに変わるので、このタイミングでエントリに変えておいた。</p><pre><code class="language-plaintext">./craft entrify/categories mmmCategory

./craft entrify/tags tag</code></pre><p>こんなかんじのコマンドでカテゴリセットの情報からセクションと入力タイプを作ってくれて、使うセクションの設定まで完了。<br>データも置き換えてくれて、フィールドも変えてくれる。<br>最後に元のカテゴリセットを削除してくれる。<br>データが少ないからかもだけど楽ちん。</p><p>CKEditor に変更するのもちゃんとコマンドがあってありがたし。。。</p><pre><code class="language-plaintext">./craft ckeditor/convert</code></pre><p>お試しで色々入れたものとかがゴミとして残ってしまっているので定期的にキレイにしておかないとだな。。。</p>

            ]]></content>
        </entry>
                <entry>
            <id>https://note.mersy418.com/article/craft-cms-transform-format</id>
            <link type="text/html" rel="alternate" href="https://note.mersy418.com/article/craft-cms-transform-format?utm_source=feed" />
            <title>Craft CMS で画像のリサイズをせずに画像フォーマットを変換する #craftcms</title>
            <published>2024-04-25T07:00:00+08:00</published>
            <updated>2024-04-29T11:22:00+08:00</updated>
            <author>
                <name>mersy</name>
                <uri>https://note.mersy418.com/</uri>
            </author>
            <content type="html"><![CDATA[
                
<p>Craft CMS にはアセット（画像）を使う時に変換処理（transform）を入れることができる。</p>

<figure class="figure">
  <img src="https://asset.mersy418.com/asset/20240424-111629.png" class="figure-img img-fluid rounded" loading="lazy" alt="">
  </figure>

<p>リサイズしたり、切り抜いたり色々やれる。<br>WebP とかにもしてくれるので結構使い勝手はいい。</p>
<p>ただ、サイズ指定があると意図せずリサイズされてしまって嫌だなぁと思っていたが。<br>幅をそれなりの大きさに設定しておいて、「アップスケールを許可」のチェックを外すことでリサイズはされずに、例えばファイルの種類を変えることだけが適用出来る。</p>
<p>もちろん元画像のサイズが設定した「それなりの大きさ」より大きいとリサイズされてしまうのでサイズの指定は運用と相談にはなる。</p>
<p>画像のフォーマットだけ変換することは出来ないと思ってたところがあったので盲点だった。<br></p>

            ]]></content>
        </entry>
                <entry>
            <id>https://note.mersy418.com/article/lolipop-highspeed-craft5</id>
            <link type="text/html" rel="alternate" href="https://note.mersy418.com/article/lolipop-highspeed-craft5?utm_source=feed" />
            <title>ロリポップのハイスピードプランで Craft 5 をインストールする #craftcms</title>
            <published>2024-04-24T09:00:00+08:00</published>
            <updated>2024-04-24T10:22:06+08:00</updated>
            <author>
                <name>mersy</name>
                <uri>https://note.mersy418.com/</uri>
            </author>
            <content type="html"><![CDATA[
                
<p>Craft CMS の推奨DBが変わった件で、 </p>



  <div class="max-w-3xl px-8 py-4 bg-white rounded-lg shadow-md dark:bg-gray-800">
    <div class="flex items-center justify-between">
      <span class="text-sm font-light text-gray-600 dark:text-gray-400">2024/4/11</span>
          </div>

    <div class="mt-2">
      <a href="https://note.mersy418.com/article/craft-cms-database-mysql" class="text-xl font-bold text-gray-700 dark:text-white hover:text-gray-600 dark:hover:text-gray-200 hover:underline">Craft CMS 用のデータベース</a>
          </div>
  </div>

<p>お手頃なレンタルサーバで使える所はどこだろうか、ということでロリポップのハイスピードプランを試してみた <br></p><blockquote>超高速・高い安定性のハイスピードプラン - ロリポップ！レンタルサーバー<br><a href="https://lolipop.jp/high-speed/">https://lolipop.jp/high-speed/</a></blockquote>
<p>契約申し込むと初期のドメインが払い出される。<br>この初期ドメインにはサブドメイン追加して使う事はできない様子。<br>なので空いてた独自ドメインを割り振って、そのサブドメインで試す。</p>
<p>PHPはデフォルトで 8.2 になってた。<br>PHPは <code>/usr/local/php/8.2/bin/php</code> ここにいるので、</p><blockquote>lolipopサーバーをプログラマが使いやすくするネタ #PHP - Qiita<br><a href="https://qiita.com/kubo_yu/items/54f62f7acb94e273bd96">https://qiita.com/kubo_yu/item...</a></blockquote>
<p>こちらの記事のように設定しておく。</p>

<pre>vi ~/.bash_profile</pre>

<p>bash_profile を編集する<br></p>

<pre>if [ -f ~/.bashrc ]; then
   source ~/.bashrc
fi</pre>

<p>.bashrcにパスを設定。</p>

<pre>echo &#039;export PATH=/usr/local/php/8.2/bin:$PATH&#039; &gt;&gt; ~/.bashrc</pre>

<p>これで <code>php -v</code> でバージョンが確認出来た。<br>composer もそのまま動いた。</p>
<p>DBとかを準備しておいて、 Craft をインストールしていく。</p>
<p>問題無くインストールも終わり MySQL を確認してみる。<br></p>

<figure class="figure">
  <img src="https://asset.mersy418.com/asset/20240423-093451.png" class="figure-img img-fluid rounded" loading="lazy" alt="">
  </figure>

<p><code>MySQL 8.0.35</code></p>
<p>惜しい。</p><blockquote>MySQL 8.0.36+ using InnoDB, or PostgreSQL 16+<br><a href="https://craftcms.com/docs/5.x/requirements.html#recommended-system-specs">https://craftcms.com/docs/5.x/...</a></blockquote>
<p>まぁとりあえずは動いているし、、、</p>
<p>細かい設定とかいじったりするところがどこまでいけるのかとかは追々見ていくとして。。。</p>

            ]]></content>
        </entry>
                <entry>
            <id>https://note.mersy418.com/article/craft5-upgrade-matrixfield</id>
            <link type="text/html" rel="alternate" href="https://note.mersy418.com/article/craft5-upgrade-matrixfield?utm_source=feed" />
            <title>Craft 5 へのアップグレード：Matrixフィールドの自動変換</title>
            <published>2024-04-15T07:00:00+08:00</published>
            <updated>2024-04-15T07:41:43+08:00</updated>
            <author>
                <name>mersy</name>
                <uri>https://note.mersy418.com/</uri>
            </author>
            <content type="html"><![CDATA[
                
<p>Craft 5 へアップグレードするのを試しておく。<br>とりあえずこのブログを Craft 5 にあげるためにあれこれ試す。<br>検証が終わったら実際にアップグレードしたい。</p>
<p>そもそもとして環境を複製する時点で <a href="https://twitter.com/tinybeans">@tinybeans</a> <a href="https://twitter.com/bun">@BUN</a> に色々とフォローしてもらっているm(__)m<br>基本的な手順は <a href="https://craftcms.com/docs/5.x/upgrade.html">Upgrading from Craft 4</a> のドキュメントの通り。</p>
<blockquote>Upgrading from Craft 4 | Craft CMS Documentation | 5.x<br><a href="https://craftcms.com/docs/5.x/upgrade.html">https://craftcms.com/docs/5.x/...</a></blockquote>
<p>Craft 5 にアップグレードすると Matrix フィールドはフィールドと入力タイプに自動で分割される。</p>
<p>元々の Matrix フィールドがこんな感じの構成。</p>

<figure class="figure">
  <img src="https://asset.mersy418.com/asset/20240412-183713.png" class="figure-img img-fluid rounded" loading="lazy" alt="">
  </figure>

<p>Craft 5 にアップグレードすると、Matrix のブロック内に定義してあったフィールドが Craft 5 ではそれぞれフィールドとして登録される</p>

<figure class="figure">
  <img src="https://asset.mersy418.com/asset/20240412-183031.png" class="figure-img img-fluid rounded" loading="lazy" alt="">
  </figure>

<p>元々 Matrix で設定されていたブロックは入力タイプ（エントリタイプ）として設定される</p>

<figure class="figure">
  <img src="https://asset.mersy418.com/asset/20240412-183750.png" class="figure-img img-fluid rounded" loading="lazy" alt="">
  </figure>

<p>その上で Matrix フィールドにはそれらのエントリタイプがセットされた状態になる。</p>

<figure class="figure">
  <img src="https://asset.mersy418.com/asset/20240412-183123.png" class="figure-img img-fluid rounded" loading="lazy" alt="">
  </figure>

<p>ここまで自動で変換してくれるのはありがたい。。。</p>
<p>引き続き色々と試していく。</p>

            ]]></content>
        </entry>
                <entry>
            <id>https://note.mersy418.com/article/craft-cms-database-mysql</id>
            <link type="text/html" rel="alternate" href="https://note.mersy418.com/article/craft-cms-database-mysql?utm_source=feed" />
            <title>Craft CMS 用のデータベース</title>
            <published>2024-04-11T11:00:00+08:00</published>
            <updated>2024-04-11T11:50:04+08:00</updated>
            <author>
                <name>mersy</name>
                <uri>https://note.mersy418.com/</uri>
            </author>
            <content type="html"><![CDATA[
                
<p>Craft Cloud を試していたときに色々とドキュメントを見る感じになった。</p>



  <div class="max-w-3xl px-8 py-4 bg-white rounded-lg shadow-md dark:bg-gray-800">
    <div class="flex items-center justify-between">
      <span class="text-sm font-light text-gray-600 dark:text-gray-400">2024/3/20</span>
          </div>

    <div class="mt-2">
      <a href="https://note.mersy418.com/article/try-craft-cloud" class="text-xl font-bold text-gray-700 dark:text-white hover:text-gray-600 dark:hover:text-gray-200 hover:underline">Craft Cloud を試してみる #craftcms</a>
          </div>
  </div>

<p>そのなかで、</p>
<blockquote>Craft Database Options and Best Practices | Craft CMS<br><a href="https://craftcms.com/knowledge-base/craft-database-options-and-best-practices#mariaDB">https://craftcms.com/knowledge...</a></blockquote>
<p>があって、 MariaDB よりは MySQLの方がいい、みたいな感じの様子。<br>いつからだろう？？</p>
<p><a href="https://twitter.com/bun">@BUN</a> に教えてもらったのだとこの辺も関係してそう。</p>
<blockquote>[5.x][MariaDB] add Field::getValueSql Event / support virtual columns / how to increase query performance · craftcms/cms · Discussion #13997<br><a href="https://github.com/craftcms/cms/discussions/13997">https://github.com/craftcms/cm...</a></blockquote>
<p>あまり気にしてなかったけど、レンタルサーバだと MariaDB のサーバーとかもあるので、今後少し考えておいた方がいいのかもなぁ。。。<br>あとは MySQL のバージョンもか。</p>
<p>ドキュメントの要件でも、レコメンドからは MariaDB はなくなってこんな感じで書かれてる。</p>
<blockquote>Due to its diverging parity with MySQL, we no longer recommend MariaDB for sites with many users or a large volume of content.<br><a href="https://craftcms.com/docs/5.x/requirements.html#recommended-system-specs">https://craftcms.com/docs/5.x/...</a></blockquote>
<p>それなりの規模になってくればレンタルサーバじゃない構成になっていくとは思うが。。</p>
<p>いくつか見ててロリポップが今年から MySQL8.0 提供開始してた。</p>
<blockquote>MySQL8.0 提供のお知らせ - ロリポップ！レンタルサーバー<br><a href="https://lolipop.jp/info/news/7744/">https://lolipop.jp/info/news/7...</a></blockquote>
<p>なるほどなぁ。<br>ちょっといくつかレンタルサーバでの動作確認とかしてみよう。</p>

            ]]></content>
        </entry>
                <entry>
            <id>https://note.mersy418.com/article/craft-4-security-support</id>
            <link type="text/html" rel="alternate" href="https://note.mersy418.com/article/craft-4-security-support?utm_source=feed" />
            <title>Craft 4 の Security Support が 30 Mar 2026 に1年延長されてた #craftcms</title>
            <published>2024-04-04T08:00:00+08:00</published>
            <updated>2024-04-04T08:07:54+08:00</updated>
            <author>
                <name>mersy</name>
                <uri>https://note.mersy418.com/</uri>
            </author>
            <content type="html"><![CDATA[
                
<p>Craft CMS 5 がリリースされたので、いずれは Craft 4 はセキュリティサポートが切れるまでに準備しないとなぁ、、、と考えていた。</p>
<p>たまたま、&nbsp;<a href="https://craftcms.com/knowledge-base/supported-versions">Supported Versions</a> のページをみたら Craft 4 のセキュリティサポートが&nbsp;30 Mar 2026 までに1年間延長されてた。</p>

<figure class="figure">
  <img src="https://asset.mersy418.com/asset/20240404-075623.png" class="figure-img img-fluid rounded" loading="lazy" alt="">
  </figure>

<blockquote>Supported Versions | Craft CMS<br><a href="https://craftcms.com/knowledge-base/supported-versions">https://craftcms.com/knowledge...</a></blockquote>
<p>フルサポートも来年の&nbsp;&nbsp;30 Mar 2025 まで。</p>
<p>年末年始頃に見てたときはこんな感じだったから、</p>

<figure class="figure">
  <img src="https://asset.mersy418.com/asset/20240404-075846.png" class="figure-img img-fluid rounded" loading="lazy" alt="">
  </figure>

<p>2024年度中には Craft 5 への移行を諸々進めないとだなぁ、、、とは思っていた。<br>1年長くなったことで Craft 4 のものは猶予が出来たと言えばそうだけど。</p><blockquote>Each major version of Craft CMS and Craft Commerce comes with two years of active support and maintenance, following its initial release. After that, we will continue to fix critical security issues (where possible) for one additional year, before the version reaches end of life and is no longer supported.</blockquote>
<p>ってことだから、 Craft 4 もルールに追加で+1年した感じっぽい。<br>Craft 3 はまもなく&nbsp;Security Support が終了なので色々と更新していく必要がありそう。</p>

<p>この変更ってどこかで告知されてたのかなぁ？？？完全に見落としている。<br>予定してたものがちょっと色々変わりそう。<br></p>

            ]]></content>
        </entry>
                <entry>
            <id>https://note.mersy418.com/article/craft-5-released</id>
            <link type="text/html" rel="alternate" href="https://note.mersy418.com/article/craft-5-released?utm_source=feed" />
            <title>Craft 5 リリース！！</title>
            <published>2024-03-27T07:30:00+08:00</published>
            <updated>2024-03-27T07:46:16+08:00</updated>
            <author>
                <name>mersy</name>
                <uri>https://note.mersy418.com/</uri>
            </author>
            <content type="html"><![CDATA[
                
<p>Craft CMS の新バージョン、5 がリリースされた。</p><blockquote>Craft 5 Released—with New Team Edition! | Craft CMS<br><a href="https://craftcms.com/blog/craft-5">https://craftcms.com/blog/craf...</a></blockquote>
<p>いろいろと機能も増えて、一番大きいのは Matrix の入れ子だとは思うが、エントリに複数ユーザをセット出来たりと色々増えた。</p>
<p>CKEditor でもリッチエディタ内にエントリを入れられるようになってコンテンツ作成はしやすくなりそう。<br>この辺はどう使っていくかをもう少し検討しないと。<br>Redactor からの乗り換えも考えねば。</p>
<p>新しい Features のページに簡単に機能周りの話がまとめられている。<br></p><blockquote>Features Home | Craft CMS<br><a href="https://craftcms.com/features">https://craftcms.com/features</a></blockquote>
<p>ブログも早いところ Craft 5 にあげないとだ。<br>最近アップデートサボっていたからまずは4系の最新にまで。。。</p>
<p>CMS の料金的に Team Edition という5ユーザまでのプランが出来た。<br></p><blockquote>Pricing | Craft CMS<br><a href="https://craftcms.com/pricing">https://craftcms.com/pricing</a></blockquote>
<p>Pro も $399 で2年目からは $99 になるかんじで少し値上がりした。<br>十分コスパはいいと思うが。</p>

            ]]></content>
        </entry>
                <entry>
            <id>https://note.mersy418.com/article/try-craft-cloud</id>
            <link type="text/html" rel="alternate" href="https://note.mersy418.com/article/try-craft-cloud?utm_source=feed" />
            <title>Craft Cloud を試してみる #craftcms</title>
            <published>2024-03-20T11:00:00+08:00</published>
            <updated>2024-03-21T07:10:27+08:00</updated>
            <author>
                <name>mersy</name>
                <uri>https://note.mersy418.com/</uri>
            </author>
            <content type="html"><![CDATA[
                
<p>Craft CMS のホスティングサービス、 Craft Cloud を触ってみた。</p>
<blockquote>Craft Cloud — Craft CMS hosting you can trust.<br><a href="https://craftcms.com/cloud">https://craftcms.com/cloud</a></blockquote>
<p>最近アジア圏の Partner に開放されたみたいなので試してみる。</p>
<h2>ローカル環境の構築</h2>
<p>まずは ddev でローカルに環境作る所から（普段あまり使っていない）。<br>ddev での内容は <a href="https://twitter.com/tinybeans">@tinybeans</a> のエントリを見ると早い。</p>
<blockquote>DDEV を使って Craft CMS のローカル開発環境を構築する | Craft CMS | かたつむりくんのWWW<br><a href="https://tinybeans.net/blog/2022/08/craft-cms-ddev">https://tinybeans.net/blog/202...</a></blockquote>
<p>公式ドキュメント的にはこの辺。</p>
<blockquote>Installation | Craft CMS Documentation | 4.x<br><a href="https://craftcms.com/docs/4.x/installation.html">https://craftcms.com/docs/4.x/...</a></blockquote>
<p>とりあえずローカル環境の構築を進めていく。</p>
<p>テスト用のディレクトリ作って、以下のコマンドを順に実行していく。<br></p>

<pre>ddev config --project-type=craftcms --docroot=web --create-docroot
ddev composer create -y --no-scripts &quot;craftcms/craft:^4&quot;
ddev composer config platform.php 8.1
ddev craft install
ddev launch</pre>

<p>【追記 20240321-065816】<br><code>ddev composer config platform.php 8.1</code> を追加して実行しているが、後述する「Cloud Extension をインストール」が PHP 8.1 以降の対応のため。<br>【追記ここまで】</p>
<p>ひとまずこれでローカルで Craft が立ち上がったのをフロント・管理画面共に確認できる。<br>一応管理画面で Craft Pro のトライアルも有効にしておく。</p>
<h2>Cloud 用の対応<br></h2>
<p>ここからの手順は下記を参照して進める。</p>
<blockquote>Getting Started with Craft Cloud | Craft CMS<br><a href="https://craftcms.com/knowledge-base/cloud-getting-started">https://craftcms.com/knowledge...</a></blockquote>
<h2>Cloud Extension のインストール</h2>
<p>以下のコマンドで Cloud Extension をインストールする。</p>

<pre>ddev craft setup/cloud</pre>

<blockquote>The Cloud Extension | Craft CMS<br><a href="https://craftcms.com/knowledge-base/cloud-extension">https://craftcms.com/knowledge...</a></blockquote>
<p>説明的にはこれで <code>craftcms/cloud</code> がインストールされて、<code>craft-cloud.yaml</code> も生成される。</p>
<p><del>が、&nbsp;<code>craft-cloud.yaml</code> は生成されなかったので、これは手動でルートに作成した。</del></p>
<p>【追記 20240321-065958】<br>Support に教えてもらって<code>ddev composer config platform.php 8.1</code> を実行しておくことで問題無かった。</p>
<p>そのため、以下のPHP8.2の設定関係は不要になった。<br>【追記ここまで】</p>
<p>最低限必要な記述は以下とのことなので、この内容を記載（PHPを8.2にした）</p>

<pre># Versions must include major + minor, but no patch.
php-version: &quot;8.2&quot;</pre>

<blockquote>The Craft Cloud Config File | Craft CMS<br><a href="https://craftcms.com/knowledge-base/cloud-config">https://craftcms.com/knowledge...</a></blockquote>
<p>PHPを 8.2 にしたので <code>composer.json</code> を修正する。</p>

<pre>&quot;platform&quot;: {
      &quot;php&quot;: &quot;8.2&quot;
    }</pre>

<p><code>.ddev/config.yaml</code>も変更する</p>

<pre>php_version: &quot;8.2&quot;</pre>

<p>【追記20240321-070835】<br>↑ここまでの PHP8.2 関係の設定は不要だった&nbsp;&nbsp;&nbsp; <br></p>
<p>以下の <code>composer.json</code> の <code>craftcms/cloud</code> のバージョン指定も不要になった。<br>【追記ここまで】<br></p>
<p>あと、<code>composer.json</code> に追加されている&nbsp;<code>craftcms/cloud</code> のバージョン指定が必要らしいので、指定する。</p>

<pre>{
  &quot;require&quot;: {
    &quot;craftcms/cloud&quot;: &quot;*&quot;,
    &quot;craftcms/cms&quot;: &quot;^4.4.0&quot;,
    &quot;vlucas/phpdotenv&quot;: &quot;^5.4.0&quot;
  },

↓↓↓

{
  &quot;require&quot;: {
    &quot;craftcms/cloud&quot;: &quot;^1.13.1&quot;, &lt;&lt; バージョン設定
    &quot;craftcms/cms&quot;: &quot;^4.4.0&quot;,
    &quot;vlucas/phpdotenv&quot;: &quot;^5.4.0&quot;
  },</pre>

<p>デフォルトは <code>*</code> になっているのだけど、これだと Cloud の Console 側で <code>1.13.0</code> 以上が必要とエラーになるので、 <code>^1.13.1</code> を指定した。<br></p>

<pre>ddev composer update

ddev start</pre>

<p><code>composer update</code> して、再度立ち上げて、 8.2 で動いているのを確認する。</p>
<p>ここで <code>git init</code> して丸っと commit してリポジトリに push しておいた。</p>
<h2>新規プロジェクトの作成・設定<br></h2>
<p>引き続き Craft Console 側で Cloud のプロジェクトを作っていく。<br></p>

<figure class="figure">
  <img src="https://asset.mersy418.com/asset/20240320-104333.png" class="figure-img img-fluid rounded" loading="lazy" alt="">
  </figure>

<p>リポジトリを選択して、プロジェクトを作成したら、リージョンとかを選択する。<br></p>

<figure class="figure">
  <img src="https://asset.mersy418.com/asset/20240320-104349.png" class="figure-img img-fluid rounded" loading="lazy" alt="">
  </figure>

<p>引き続き、環境（Environment）を作成する。</p>

<figure class="figure">
  <img src="https://asset.mersy418.com/asset/20240320-104415.png" class="figure-img img-fluid rounded" loading="lazy" alt="">
  </figure>

<p>ブランチとか変えて使う前提だけど、一旦は main ブランチのままで。</p>
<p>この状態で deploy ボタンをクリックするか、何か GitHub に push するとビルド・デプロイがスタートする。</p>
<h2>DBをインポート</h2>
<p>ローカルのDBをエクスポートして Cloud にインポートする。<br></p>

<pre>ddev ssh</pre>

<p>ddev ssh したらDBのバックアップを作成する。</p>

<pre>./craft db/backup</pre>

<p>バックアップファイルが生成され、生成されたパスが表示される。</p>
<p>Cloud Console 側の Access を確認して、 DBへの接続情報を確認する。</p>

<figure class="figure">
  <img src="https://asset.mersy418.com/asset/20240320-111650.png" class="figure-img img-fluid rounded" loading="lazy" alt="">
  </figure>

<p>確認したら、 ssh してるところで以下を実行する。</p>

<pre>mysql \
    --host=hogehoge \
    --port=3306 \
    --user=hogehoge \
    --password=hogehoge \
    --database=hogehoge \
    &lt; /var/www/html/storage/backups/hogehoge.sql</pre>

<p>何もデータ追加してない状態でも少し時間かかるが、待ってればインポートは終了する。</p>
<p>console 側からプレビュー環境の表示を確認する。</p>

<figure class="figure">
  <img src="https://asset.mersy418.com/asset/20240320-105251.png" class="figure-img img-fluid rounded" loading="lazy" alt="">
  </figure>

<p>URLがどうなるのかわからなくて探したが、この地球アイコンから見ることが出来た。</p>

<figure class="figure">
  <img src="https://asset.mersy418.com/asset/20240320-105303.png" class="figure-img img-fluid rounded" loading="lazy" alt="">
  </figure>

<p>管理画面も同様のドメイン。<br></p>

<figure class="figure">
  <img src="https://asset.mersy418.com/asset/20240320-105324.png" class="figure-img img-fluid rounded" loading="lazy" alt="">
  </figure>

<p>カスタムドメインの設定とかすればそれで見ることが出来るはず。</p>
<p>GitHub にプッシュされてデプロイが始まると、デプロイスタート時と完了時にメールが来る。<br></p>

<figure class="figure">
  <img src="https://asset.mersy418.com/asset/20240320-105411.png" class="figure-img img-fluid rounded" loading="lazy" alt="">
  </figure>

<p>ひとまずこんな感じで Craft Cloud の環境を作ることが出来た。</p>
<hr>
<p>当初、DBをインポートしないで、素の状態で Craft Cloud の環境をつくれるのか？とおもってあれこれ試していた。</p>

<figure class="figure">
  <img src="https://asset.mersy418.com/asset/20240320-112155.png" class="figure-img img-fluid rounded" loading="lazy" alt="">
  </figure>

<p>CLIを実行するUIがあるので、ここで <code>craft/install</code> とかやったりしたけど、PHP8.1, 8.2 で試すとそれぞれ失敗。<br>ログに残るエラーが違ったりするので、サポートに聞いてみたら「普通はDBインポートする」と言う感じの回答だったので、とりあえずDBインポートすることで見れるようになったというのが今回の経緯。</p>
<p>慣れてしまえば楽なのかな。<br>Craft Cloud のお値段的に使うサイトを選びそうではあるけど、試せてよかった。<br>インフラ含めて丸っとお願いしたいときの選択肢としては良さそう。</p>
<p>ドキュメントを見ると色々とやれることがありそうなので、この辺は追って試したい。</p>
<blockquote>Guides: Craft Cloud | Craft CMS<br><a href="https://craftcms.com/knowledge-base/cloud">https://craftcms.com/knowledge...</a><br></blockquote>
<p>フリートライアルが7日間できるので、何回も検証してみることも出来そう。</p>

            ]]></content>
        </entry>
                <entry>
            <id>https://note.mersy418.com/article/book_b0cqwcyslt</id>
            <link type="text/html" rel="alternate" href="https://note.mersy418.com/article/book_b0cqwcyslt?utm_source=feed" />
            <title>【読了】ライフハックの道具箱2023</title>
            <published>2024-03-16T19:00:00+08:00</published>
            <updated>2024-03-20T12:10:51+08:00</updated>
            <author>
                <name>mersy</name>
                <uri>https://note.mersy418.com/</uri>
            </author>
            <content type="html"><![CDATA[
                
<p>ライフハックの道具箱2023を読んだ</p>
<blockquote>ライフハックの道具箱2023<a href="https://amzn.to/3VDrP4T"><br>https://amzn.to/3VDrP4T</a></blockquote>
<p>使ってるツール、初めて聞いたツール、色々あって勉強になった。</p>
<p>普段は Logseq 使ってるが、マインドマップではないものでビジュアル的に整理したいと思ってたりするところがあるので、 Heptabase は触ってみようかなぁ。    <br>トライアルが短めなのは気になる。</p>
<p>アウトライナーでは Bike で画像使えれば、、、と思いつつ。<br>Drummer は知らなかったので触ってみようかな。</p>
<p>anytype も少し気になるが、 Notion みたいにブロックで書く感じだと個人的にはあわないかな。<br>これも今度触ってみよう。<br></p>

            ]]></content>
        </entry>
                <entry>
            <id>https://note.mersy418.com/article/book_4873118646</id>
            <link type="text/html" rel="alternate" href="https://note.mersy418.com/article/book_4873118646?utm_source=feed" />
            <title>【読了】入門 監視</title>
            <published>2024-03-09T13:00:00+08:00</published>
            <updated>2024-03-16T13:50:24+08:00</updated>
            <author>
                <name>mersy</name>
                <uri>https://note.mersy418.com/</uri>
            </author>
            <content type="html"><![CDATA[
                
<blockquote>O'Reilly Japan - 入門 監視<br><a href="https://www.oreilly.co.jp/books/9784873118642/">https://www.oreilly.co.jp/book...</a></blockquote>
<p>「ユーザに近い所から監視を始める」という話をみたので読んでみた。<br>普段監視のこととかを考える機会は多くはないが、考え方とか学びが多かった。</p>
<p>アラート疲れをしないための自動復旧の話をみて「なるほどその側面があるのか」とは思った。<br>とりあえず自動復旧する仕組みを作っておいて、原因調査が忘れ去られそうでどうなんだろうと思ったりしていた。</p>
<p>サイトの表示側、CMS自体とかとか少し見直してみよう。</p>

            ]]></content>
        </entry>
                <entry>
            <id>https://note.mersy418.com/article/craft-4-8-0-released</id>
            <link type="text/html" rel="alternate" href="https://note.mersy418.com/article/craft-4-8-0-released?utm_source=feed" />
            <title>Craft 4.8.0 リリース！ GraphQLが Solo ライセンスでも利用可！ライセンスの有効判定</title>
            <published>2024-02-27T09:00:00+08:00</published>
            <updated>2024-02-27T09:29:37+08:00</updated>
            <author>
                <name>mersy</name>
                <uri>https://note.mersy418.com/</uri>
            </author>
            <content type="html"><![CDATA[
                
<p>Craft 4.8.0 がリリースされた。</p><blockquote>Release 4.8.0 · craftcms/cms<br><a href="https://github.com/craftcms/cms/releases/tag/4.8.0">https://github.com/craftcms/cm...</a></blockquote>
<p>結構色々と変わった。</p><ul><li>It’s now possible to update expired licenses from the Updates utility, on non-public domains.</li><li>The GraphQL API is now available for Craft Solo installs.</li></ul>
<p>ブログは GraphQL 使いたいから Pro にしてたけど、 Solo でもいいのかもなぁ。。。&nbsp;<br>まぁ Pro のままでもいいかな。</p><blockquote>When licensing issues occur on public domains, the control panel will now become temporarily inaccessible for logged-in users, alerting them to the problems and giving them an opportunity to resolve them. (The front end will not be impacted.)</blockquote>
<p>ライセンスの状況をちゃんと見てくれるようになり、公開サイトとかでライセンスが有効で無い場合は管理画面に一時的にアクセス出来なくなる、と。<br>その辺のアラートもでる、と。<br></p>

            ]]></content>
        </entry>
    </feed>
