Closed mantaroh closed 1 year ago
This PR will introduce the debug mode which output the source file name into data-separ-component attribute.
data-separ-component
After landing this PR, Spear will generate the following HTML
<!DOCTYPE html> <html lang="en" data-spear-page="/index"> ... <body> <header><img src="./images/logo.png"> <div class="spear-description"> <pre><code class="html"> <section> <first-component></first-component> </section> </code></pre> </div> </section> </main> </body> </html>
This PR will make the Spear to generate the cms content information into attribute as well.
If original code has cms-item or cms-list attribute, spear will generate the following html with data-spear-content-type and data-spear-content attribute.
cms-item
cms-list
data-spear-content-type
data-spear-content
<body> <header><img src="./images/logo.png"> <div class="spear-description"> <p><span>Welcome spear-cli</span> powered by Spearly CMS🚀</p> </div> <div data-spear-content-type="test" data-spear-content="raaa"> <h1>test</h1> </div> </header> </body>
An above example, <div data-spear-content-type="test" data-spear-content="raaa"> figure that:
<div data-spear-content-type="test" data-spear-content="raaa">
What is this?
file source information
This PR will introduce the debug mode which output the source file name into
data-separ-component
attribute.After landing this PR, Spear will generate the following HTML
content information
This PR will make the Spear to generate the cms content information into attribute as well.
If original code has
cms-item
orcms-list
attribute, spear will generate the following html withdata-spear-content-type
anddata-spear-content
attribute.An above example,
<div data-spear-content-type="test" data-spear-content="raaa">
figure that:cms-item
attribute