mirror of
https://github.com/lucide-icons/lucide.git
synced 2026-08-29 09:28:23 +02:00
feat(analytics): add utm source and medium (#4596)
This commit is contained in:
@@ -30,7 +30,7 @@ Read it here: [ICON_GUIDELINES](https://lucide.dev/contribute/icon-design-guide)
|
|||||||
|
|
||||||
#### Lucide Studio
|
#### Lucide Studio
|
||||||
|
|
||||||
For formatting and adjusting SVG icons, [@jguddas](https://github.com/jguddas) made a great tool called [Lucide Studio](https://studio.lucide.dev/). It is a web-based SVG editor that allows you to edit and adjust icons in the Lucide style. You can use it to create new icons or modify existing ones.
|
For formatting and adjusting SVG icons, [@jguddas](https://github.com/jguddas) made a great tool called [Lucide Studio](https://studio.lucide.dev/?utm_source=lucide.dev&utm_medium=contributing-guide). It is a web-based SVG editor that allows you to edit and adjust icons in the Lucide style. You can use it to create new icons or modify existing ones.
|
||||||
|
|
||||||
#### Editor guides
|
#### Editor guides
|
||||||
|
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ const base64InnerSvg = computed(() => {
|
|||||||
</g>
|
</g>
|
||||||
</svg>
|
</svg>
|
||||||
<a
|
<a
|
||||||
:href="`https://studio.lucide.dev/edit?value=${encodeURIComponent(base64InnerSvg)}&name=${name}`"
|
:href="`https://studio.lucide.dev/edit?value=${encodeURIComponent(base64InnerSvg)}&name=${name}&utm_source=lucide.dev&utm_medium=icon-detail-preview`"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer"
|
||||||
class="studio-button"
|
class="studio-button"
|
||||||
|
|||||||
@@ -158,7 +158,7 @@ For each icon these attributes are applied, corresponding to the above rules.
|
|||||||
### Minify paths
|
### Minify paths
|
||||||
|
|
||||||
The code of paths can sometimes get quite large. To reduce file size we like to minify the code.
|
The code of paths can sometimes get quite large. To reduce file size we like to minify the code.
|
||||||
We recommend to use [Lucide Studio](https://studio.lucide.dev/) to tidy paths to 3 points of precision.
|
We recommend to use [Lucide Studio](https://studio.lucide.dev/?utm_source=lucide.dev&utm_medium=design-guide) to tidy paths to 3 points of precision.
|
||||||
|
|
||||||
### Allowed elements
|
### Allowed elements
|
||||||
|
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ const getImageTagsByFiles = (
|
|||||||
const url = getBaseUrl(file);
|
const url = getBaseUrl(file);
|
||||||
const widthAttr = width ? `width="${width}"` : '';
|
const widthAttr = width ? `width="${width}"` : '';
|
||||||
|
|
||||||
return `${linkToLucideStudio ? `<a title="Open ${name} in lucide studio" target="_blank" href="https://studio.lucide.dev/edit?value=${encodeURI(minifiedSvg)}&name=${name}">` : ''}<img title="${name}" alt="${name}" ${widthAttr} src="${url}/${base64}.svg"/>${linkToLucideStudio ? '</a>' : ''}`;
|
return `${linkToLucideStudio ? `<a title="Open ${name} in lucide studio" target="_blank" href="https://studio.lucide.dev/edit?value=${encodeURI(minifiedSvg)}&name=${name}&utm_source=github.com&utm_medium=pr-comment">` : ''}<img title="${name}" alt="${name}" ${widthAttr} src="${url}/${base64}.svg"/>${linkToLucideStudio ? '</a>' : ''}`;
|
||||||
});
|
});
|
||||||
|
|
||||||
const svgFiles = await readSvgDirectory(ICONS_DIR);
|
const svgFiles = await readSvgDirectory(ICONS_DIR);
|
||||||
|
|||||||
Reference in New Issue
Block a user