g-plane / markup_fmt

Configurable HTML, Vue, Svelte, Astro, Angular, Jinja, Twig, Nunjucks and Vento formatter with dprint integration.
https://dprint.dev/plugins/markup_fmt/
MIT License
91 stars 4 forks source link

`markup_fmt` dprint plugin deletes astro-seo code #49

Closed Eveeifyeve closed 3 weeks ago

Eveeifyeve commented 3 weeks ago

It basically deletes all of this code, I have provided an example file to reproduce.

exampleSeo.astro:

---
import { SEO } from "astro-seo";
const { title, customDescription, bannerPath } = Astro.props;
export interface Props {
    title: string;
    customDescription?: string;
    bannerPath?: string;
}
// SEO SETTINGS
const descr = customDescription ?? "A Nice Opensourced Client.";
const url = "https://teaclient.net";
const banner = bannerPath ?? "/Banner.webp";
const favicon = "/Favicon.webp";
const theme_color = "#bc21ff";
const language = "en-us";
---

<!doctype html>
<html lang="en">
    <head>
        <SEO
            title={title}
            description={descr}
            twitter={{
                title: title,
                creator: "@TeaClientMC",
                image: banner,
                card: "summary_large_image",
                description: descr,
            }}
            openGraph={{
                basic: {
                    title: title,
                    type: "website",
                    image: banner,
                    url: url,
                },
                optional: {
                    locale: language,
                    description: descr,
                    siteName: title,
                },
                image: {
                    url: banner,
                    secureUrl: url + banner,
                    type: "webp",
                    height: 30,
                    width: 60,
                    alt: "TeaClient Banner",
                },
            }}
            extend={{
                link: [
                    { rel: "icon", href: favicon },
                    {
                        rel: "apple-touch-icon",
                        type: "image/x-icon",
                        href: favicon,
                    },
                    { rel: "sitemap", href: "/sitemap-index.xml" },
                ],
                meta: [
                    { name: "theme-color", content: theme_color },
                    { name: "darkreader-lock" },
                    {
                        httpEquiv: "ContentSecurityPolicy",
                        content:
                            "Content-Security-Policy: default-src 'none'; script-src 'self'; connect-src 'self'; img-src 'self'; style-src 'self' https://cdn.cloudflare.com;",
                    },
                    {
                        name: "viewport",
                        content:
                            "width=device-width, initial-scale=1.0, shrink-to-fit=yes, viewport-fit=cover",
                    },
                ],
            }}
        />
        <meta charset="UTF-8" />
    </head>
</html>
Eveeifyeve commented 3 weeks ago

I had to remove it for https://github.com/teaclientmc/website on wiki branch.

g-plane commented 3 weeks ago

This has been fixed but not released.