unimal-jp / spear

The spear OSS repository
https://late-cloud-6411.spearly.app
MIT License
10 stars 1 forks source link

[spear-cli] Add CMS field information into wrapped element when debugmode is enabled #172

Closed mantaroh closed 1 year ago

mantaroh commented 1 year ago

Changes:

This change is related with #171 .
Spear (spear-cli) support the debug mode which injecting the CMS's field identifier into wrapped element.

If we have the following original source code, Spear will insert element into outer of embed syntax.

<div>
 <p>Title is {%= news_title %}</p>
</div>

generated result:

<div>
  <p>Title is <span data-spear-content-field="title>>news title no.1</span></p>
</div>