Skip to content

Commit

Permalink
feat: update for seo
Browse files Browse the repository at this point in the history
Saiya committed Aug 17, 2024
1 parent 94a1d4c commit 0fab3f9
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions astro.config.ts
Original file line number Diff line number Diff line change
@@ -7,6 +7,7 @@ import rehypeExternalLinks from 'rehype-external-links';

// https://astro.build/config
export default defineConfig({
site: 'https://app.evecalm.com',
base: '/frontend-guideline/',
markdown: {
rehypePlugins: [
4 changes: 3 additions & 1 deletion public/post-a11y.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
document.body.querySelectorAll('.sl-container img').forEach((img) => {
const title = img.getAttribute('title') || img.getAttribute('alt');
const title = img.getAttribute('alt');
if (!title) return;
// remove for seo, as it's already in the figcaption
img.removeAttribute('alt');
const figure = document.createElement('figure');
img.parentNode.replaceChild(figure, img);
figure.appendChild(img);

0 comments on commit 0fab3f9

Please sign in to comment.