denoland/deno_blog

Docs?

Closed this issue · 4 comments

Hello contributors.

Seeing as this repo is growing in size, I think it would be good to add a Documentation page that explain all the available BlogSettings or how to syntax highlight other files and whatever. Owing to the minimalist nature of this, a single DOCS.md page would be enough for me. RFC

rojvv commented

This is for you:

interface BlogSettings {
  author?: string; // your name
  avatar?: string; // path to your photo
  avatarClass?: string; // CSS classes to add to the avatar
  canonicalUrl?: string; // how should your blog's URL look like to search engines
  cover?: string; // path to your background cover
  coverTextColor?: string; // color of the text on your background covor
  dateStyle?: [DateStyle](https://doc.deno.land/https://raw.githubusercontent.com/denoland/deno_blog/main/types.d.ts/~/DateStyle); // self-explanatory
  description?: string; // your blog's description
  favicon?: string; // href to rel='icon'
  footer?: [VNode](https://doc.deno.land/https://raw.githubusercontent.com/denoland/deno_blog/main/deps.ts/~/VNode); // footer JSX element
  header?: [VNode](https://doc.deno.land/https://raw.githubusercontent.com/denoland/deno_blog/main/deps.ts/~/VNode); // header JSX element
  hostname?: string; // your blog's hostname, e.g. localhost
  lang?: string; // your blog's language code
  links?: { // social links
  title: string; // the link title
  url: string; // the link URL
  icon?: [VNode](https://doc.deno.land/https://raw.githubusercontent.com/denoland/deno_blog/main/deps.ts/~/VNode); // the link icon
  target?:
  | "_self"
  | "_blank"
  | "_parent"
  | "_top";
  }[];
  middlewares?: BlogMiddleware[]; // the middleware you can setup to modify your experience, content and etc. before the blog is loaded
  ogImage?: string; // path to open graph image
  port?: number; // port to listen on
  section?: VNode; // a JSX element, but idk what it is for
  showHeaderOnPostPage?: boolean; // self-explanatory 
  style?: string; // custom CSS styles
  theme?: "dark" | "light" | "auto"; // self-explanatory
  title?: string; // <title>
  unocss?: [UnoConfig](https://doc.deno.land/https://raw.githubusercontent.com/denoland/deno_blog/main/deps.ts/~/UnoConfig); // UnoCSS configuration
}

@roj1512 can you update the interface definition with these comments so it shows up on doc.deno.land?

Thanks, but I don't believe a newcomer might be able to discover all of that once by looking into the typescript types. maybe a link to deno docs