Skip to content

Instantly share code, notes, and snippets.

@diferoca1978
Forked from Klerith/rss-metadata.md
Last active November 8, 2024 16:04
Show Gist options
  • Select an option

  • Save diferoca1978/a5c5e3030738d4a6c2bc815417f1e0f9 to your computer and use it in GitHub Desktop.

Select an option

Save diferoca1978/a5c5e3030738d4a6c2bc815417f1e0f9 to your computer and use it in GitHub Desktop.

Revisions

  1. diferoca1978 revised this gist Nov 8, 2024. No changes.
  2. @Klerith Klerith revised this gist Jun 18, 2024. 1 changed file with 7 additions and 0 deletions.
    7 changes: 7 additions & 0 deletions rss-metadata.md
    Original file line number Diff line number Diff line change
    @@ -22,4 +22,11 @@ customData: `<media:content
    medium="image"
    url="${site + data.image.src}" />
    `,
    ```


    ```
    xmlns: {
    media: 'http://search.yahoo.com/mrss/',
    },
    ```
  3. @Klerith Klerith created this gist Jun 18, 2024.
    25 changes: 25 additions & 0 deletions rss-metadata.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,25 @@
    ## Paquetes a instalar y configuraciones

    Instalaciones

    ```bash
    npm i sanitize-html markdown-it
    npm i -D @types/markdown-it @types/sanitize-html

    bun i sanitize-html markdown-it
    bun i -d @types/markdown-it @types/sanitize-html
    ```

    ```typescript
    content: sanitizeHtml(parser.render(body), {
    allowedTags: sanitizeHtml.defaults.allowedTags.concat(['img']),
    }),

    customData: `<media:content
    type="image/${data.image.format === 'jpg' ? 'jpeg' : 'png'}"
    width="${data.image.width}"
    height="${data.image.height}"
    medium="image"
    url="${site + data.image.src}" />
    `,
    ```