getSiteConfig.ts 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. import { isServer } from "./config";
  2. export interface SiteConfig {
  3. host: string;
  4. title: string;
  5. siteName: string;
  6. keywords: string;
  7. touchIcon: string;
  8. description: string;
  9. jsonLd: Docs[];
  10. }
  11. export default function getSiteConfig(siteHost?: string) {
  12. const host =
  13. siteHost || (!isServer && window.location.host) || "noveldit.com";
  14. const siteName = "NovelDit";
  15. const title = `${siteName} - Read Novel Online for Free!`;
  16. const description = `${siteName} - Online Reading stories, fiction books, light novel for Free!`;
  17. const url = `https://${host}`;
  18. return {
  19. host,
  20. siteName,
  21. title,
  22. description,
  23. keywords:
  24. "Novel updates, Free books online, Light Novel, Read light novel, Light novel translations, Free Novels Online",
  25. touchIcon: `https://${host}/apple-touch-icon.png`,
  26. jsonLd: [
  27. {
  28. "@type": "WebSite",
  29. "@id": url,
  30. url: url,
  31. name: siteName.toUpperCase(),
  32. description,
  33. inLanguage: "en",
  34. publisher: {
  35. "@id": url,
  36. },
  37. // potentialAction: {
  38. // "@type": "SearchAction",
  39. // target: {
  40. // "@type": "EntryPoint",
  41. // urlTemplate: `https://www.webnovel.com/search?keywords={search_term_string}`,
  42. // },
  43. // "query-input": `required name=search_term_string`,
  44. // },
  45. },
  46. {
  47. "@type": "Organization",
  48. "@id": url,
  49. name: title,
  50. url,
  51. logo: `https://${host}/favicon-32x32.png`,
  52. // sameAs: [
  53. // "https://www.facebook.com/webnovel",
  54. // "https://www.youtube.com/channel/UC8WTtfs6ihFMJn-JgmYxVlQ",
  55. // "https://www.instagram.com/webnovelofficial/",
  56. // "https://twitter.com/webnovel",
  57. // "https://vm.tiktok.com/p6b6Vh/",
  58. // ],
  59. },
  60. ],
  61. };
  62. }