diff --git a/astro.config.mjs b/astro.config.mjs index 48cf500e..e2d11989 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -5,11 +5,12 @@ import tailwind from '@astrojs/tailwind'; import react from '@astrojs/react'; import sitemap from '@astrojs/sitemap'; +import markdownIntegration from '@astropub/md'; // https://astro.build/config export default defineConfig({ integrations: [tailwind(), react(), sitemap({ filter: (page) => !page.includes('mods/'), - })], + }), markdownIntegration()], site: 'https://zen-browser.app', }); \ No newline at end of file diff --git a/package.json b/package.json index aea86373..d478e03e 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,8 @@ "@astrojs/react": "^4.1.2", "@astrojs/rss": "^4.0.10", "@astrojs/sitemap": "^3.2.1", + "@astrojs/tailwind": "^5.1.2", + "@astropub/md": "^1.0.0", "@astrojs/tailwind": "^5.1.4", "@fontsource/bricolage-grotesque": "^5.1.0", "@fortawesome/fontawesome-svg-core": "^6.7.1", @@ -41,6 +43,7 @@ "typescript": "^5.6.3" }, "devDependencies": { + "@tailwindcss/typography": "^0.5.15", "wrangler": "^3.94.0" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 57af4756..bdff552d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -26,6 +26,9 @@ importers: '@astrojs/tailwind': specifier: ^5.1.2 version: 5.1.3(astro@5.0.5(@types/node@22.10.2)(jiti@1.21.6)(rollup@4.28.1)(typescript@5.7.2)(yaml@2.6.1))(tailwindcss@3.4.16) + '@astropub/md': + specifier: ^1.0.0 + version: 1.0.0(@astrojs/markdown-remark@6.0.1) '@fontsource/bricolage-grotesque': specifier: ^5.1.0 version: 5.1.0 @@ -93,6 +96,9 @@ importers: specifier: ^5.6.3 version: 5.7.2 devDependencies: + '@tailwindcss/typography': + specifier: ^0.5.15 + version: 0.5.15(tailwindcss@3.4.16) wrangler: specifier: ^3.94.0 version: 3.95.0(@cloudflare/workers-types@4.20241205.0) @@ -194,6 +200,11 @@ packages: '@astrojs/yaml2ts@0.2.2': resolution: {integrity: sha512-GOfvSr5Nqy2z5XiwqTouBBpy5FyI6DEe+/g/Mk5am9SjILN1S5fOEvYK0GuWHg98yS/dobP4m8qyqw/URW35fQ==} + '@astropub/md@1.0.0': + resolution: {integrity: sha512-++urcyulQogbLAF0VC2rEp6qLUfnRX9iaDREAkN1su9fF8V84DVaMHbQXn7qqQ27wYT5AVVeoK+4+vggYYVbQg==} + peerDependencies: + '@astrojs/markdown-remark': ^5 + '@babel/code-frame@7.26.2': resolution: {integrity: sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==} engines: {node: '>=6.9.0'} @@ -1078,6 +1089,11 @@ packages: '@shikijs/vscode-textmate@9.3.1': resolution: {integrity: sha512-79QfK1393x9Ho60QFyLti+QfdJzRQCVLFb97kOIV7Eo9vQU/roINgk7m24uv0a7AUvN//RDH36FLjjK48v0s9g==} + '@tailwindcss/typography@0.5.15': + resolution: {integrity: sha512-AqhlCXl+8grUz8uqExv5OTtgpjuVIwFTSXTrh8y9/pw6q2ek7fJ+Y8ZEVw7EB2DCcuCOtEjf9w3+J3rzts01uA==} + peerDependencies: + tailwindcss: '>=3.0.0 || insiders || >=4.0.0-alpha.20' + '@types/babel__core@7.20.5': resolution: {integrity: sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==} @@ -1834,6 +1850,15 @@ packages: resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} engines: {node: '>=8'} + lodash.castarray@4.4.0: + resolution: {integrity: sha512-aVx8ztPv7/2ULbArGJ2Y42bG1mEQ5mGjpdvrbJcJFU3TbYybe+QlLS4pst9zV52ymy2in1KpFPiZnAOATxD4+Q==} + + lodash.isplainobject@4.0.6: + resolution: {integrity: sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==} + + lodash.merge@4.6.2: + resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} + lodash@4.17.21: resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} @@ -2220,6 +2245,10 @@ packages: peerDependencies: postcss: ^8.2.14 + postcss-selector-parser@6.0.10: + resolution: {integrity: sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w==} + engines: {node: '>=4'} + postcss-selector-parser@6.1.2: resolution: {integrity: sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==} engines: {node: '>=4'} @@ -3239,6 +3268,10 @@ snapshots: dependencies: yaml: 2.6.1 + '@astropub/md@1.0.0(@astrojs/markdown-remark@6.0.1)': + dependencies: + '@astrojs/markdown-remark': 6.0.1 + '@babel/code-frame@7.26.2': dependencies: '@babel/helper-validator-identifier': 7.25.9 @@ -3885,6 +3918,14 @@ snapshots: '@shikijs/vscode-textmate@9.3.1': {} + '@tailwindcss/typography@0.5.15(tailwindcss@3.4.16)': + dependencies: + lodash.castarray: 4.4.0 + lodash.isplainobject: 4.0.6 + lodash.merge: 4.6.2 + postcss-selector-parser: 6.0.10 + tailwindcss: 3.4.16 + '@types/babel__core@7.20.5': dependencies: '@babel/parser': 7.26.3 @@ -4864,6 +4905,12 @@ snapshots: dependencies: p-locate: 4.1.0 + lodash.castarray@4.4.0: {} + + lodash.isplainobject@4.0.6: {} + + lodash.merge@4.6.2: {} + lodash@4.17.21: {} log-symbols@6.0.0: @@ -5409,6 +5456,11 @@ snapshots: postcss: 8.4.49 postcss-selector-parser: 6.1.2 + postcss-selector-parser@6.0.10: + dependencies: + cssesc: 3.0.0 + util-deprecate: 1.0.2 + postcss-selector-parser@6.1.2: dependencies: cssesc: 3.0.0 diff --git a/src/components/ReadmeComponent.astro b/src/components/ReadmeComponent.astro new file mode 100644 index 00000000..763fc9ef --- /dev/null +++ b/src/components/ReadmeComponent.astro @@ -0,0 +1,36 @@ +--- +import { markdown } from '@astropub/md' +import { ExternalLink } from 'lucide-astro' + +interface Props { + url: string + id: string +} + +const { url, id } = Astro.props + +const readme = await fetch(url).then((res) => res.text()) +const readmeLink = `https://github.com/zen-browser/theme-store/tree/main/themes/${id}` +const html = await markdown(readme) +--- + +
+

+ Readme + + {' '} + {' '} + + +

+
+ +
+
diff --git a/src/pages/mods/[...slug].astro b/src/pages/mods/[...slug].astro index 78c4eef4..91076cbe 100644 --- a/src/pages/mods/[...slug].astro +++ b/src/pages/mods/[...slug].astro @@ -6,6 +6,10 @@ import Title from '../../components/Title.astro'; import Description from '../../components/Description.astro'; import Button from '../../components/Button.astro'; import BackButton from '../../components/BackButton.astro'; + +import { Info } from 'lucide-astro'; +import ReadmeComponent from '../../components/ReadmeComponent.astro'; + import { ArrowRight, Info } from 'lucide-astro'; export async function getStaticPaths() { @@ -16,8 +20,6 @@ export async function getStaticPaths() { })); } -// https://github.com/TeaClientMC/Website/blob/7faacc9f8b2c79c74f711d413b155c84faafc00d/src/pages/news/%5B...slug%5D.astro - const mod = Astro.props; const dates = { @@ -79,10 +81,8 @@ const dates = { - +
- \ No newline at end of file + diff --git a/tailwind.config.mjs b/tailwind.config.mjs index 6379b180..9a48a691 100644 --- a/tailwind.config.mjs +++ b/tailwind.config.mjs @@ -18,5 +18,7 @@ export default { }, }, }, - plugins: [], + plugins: [ + require('@tailwindcss/typography'), + ], }