Adds an extra optional property to plugin render results to allow plugins to add `<link>` tags to the page.
16 lines
303 B
TypeScript
16 lines
303 B
TypeScript
import { Plugin } from "$fresh/server.ts";
|
|
|
|
export default {
|
|
name: "link-inject",
|
|
render(ctx) {
|
|
ctx.render();
|
|
return {
|
|
links: [{ rel: "stylesheet", href: "styles.css" }, {
|
|
rel: "stylesheet",
|
|
href: "print.css",
|
|
media: "print",
|
|
}],
|
|
};
|
|
},
|
|
} as Plugin;
|