Skip to content

Commit

Permalink
feat(rss): add rss
Browse files Browse the repository at this point in the history
  • Loading branch information
yplog committed Nov 1, 2024
1 parent 0026fa1 commit ac10dd9
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 1 deletion.
1 change: 1 addition & 0 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ import tailwind from '@astrojs/tailwind';

// https://astro.build/config
export default defineConfig({
site: "https://yalinpala.dev",
integrations: [tailwind()]
});
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
},
"dependencies": {
"@astrojs/check": "^0.9.4",
"@astrojs/rss": "^4.0.9",
"@astrojs/tailwind": "^5.1.2",
"@fontsource/roboto": "^5.1.0",
"astro": "^4.16.7",
Expand Down
3 changes: 2 additions & 1 deletion src/components/Footer.astro
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ const year = new Date().getFullYear()
<p>
<a
class="nav-link text-gray-300 text-lg px-4 py-2 hover:text-gray-200 hover:underline transition duration-300 ease-in-out"
href="/rss.xml">
href="/rss.xml"
target="_blank">
rss
</a>
</p>
Expand Down
11 changes: 11 additions & 0 deletions src/pages/rss.xml.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import rss from '@astrojs/rss';

export function GET(context) {
return rss({
title: 'yp’s Blog',
description: 'Software development and open-source content by yp.',
site: context.site,
items: [],
customData: `<language>en-us</language>`,
});
}
20 changes: 20 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,14 @@
dependencies:
prismjs "^1.29.0"

"@astrojs/rss@^4.0.9":
version "4.0.9"
resolved "https://registry.yarnpkg.com/@astrojs/rss/-/rss-4.0.9.tgz#aa906449914d49818ed91f1ce6aa643bbc6ee561"
integrity sha512-W1qeLc/WP1vMS5xXa+BnaLU0paeSeGjN8RJVAoBaOIkQuKXjIUA9hvPno89heo73in5i67g40gy70oeeHMqp6A==
dependencies:
fast-xml-parser "^4.5.0"
kleur "^4.1.5"

"@astrojs/tailwind@^5.1.2":
version "5.1.2"
resolved "https://registry.yarnpkg.com/@astrojs/tailwind/-/tailwind-5.1.2.tgz#53efa39de7a8faa047e90d0229af4041d2554563"
Expand Down Expand Up @@ -1536,6 +1544,13 @@ fast-uri@^3.0.1:
resolved "https://registry.yarnpkg.com/fast-uri/-/fast-uri-3.0.3.tgz#892a1c91802d5d7860de728f18608a0573142241"
integrity sha512-aLrHthzCjH5He4Z2H9YZ+v6Ujb9ocRuW6ZzkJQOrTxleEijANq4v1TsaPaVG1PZcuurEzrLcWRyYBYXD5cEiaw==

fast-xml-parser@^4.5.0:
version "4.5.0"
resolved "https://registry.yarnpkg.com/fast-xml-parser/-/fast-xml-parser-4.5.0.tgz#2882b7d01a6825dfdf909638f2de0256351def37"
integrity sha512-/PlTQCI96+fZMAOLMZK4CWG1ItCbfZ/0jx7UIJFChPNrx7tcEgerUgWbeieCM9MfHInUDyK8DWYZ+YrywDJuTg==
dependencies:
strnum "^1.0.5"

fastq@^1.6.0:
version "1.17.1"
resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.17.1.tgz#2a523f07a4e7b1e81a42b91b8bf2254107753b47"
Expand Down Expand Up @@ -3228,6 +3243,11 @@ strip-bom@^3.0.0:
resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3"
integrity sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==

strnum@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/strnum/-/strnum-1.0.5.tgz#5c4e829fe15ad4ff0d20c3db5ac97b73c9b072db"
integrity sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==

sucrase@^3.32.0:
version "3.35.0"
resolved "https://registry.yarnpkg.com/sucrase/-/sucrase-3.35.0.tgz#57f17a3d7e19b36d8995f06679d121be914ae263"
Expand Down

0 comments on commit ac10dd9

Please sign in to comment.