Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Epic] Support for user site configurations e.g. setting title for project, or stuff that is in config.js in flowershow #1151

Open
9 of 11 tasks
rufuspollock opened this issue May 25, 2024 · 0 comments

Comments

@rufuspollock
Copy link
Member

rufuspollock commented May 25, 2024

A first pass on this has been implemented.

Shaping

Preview Give feedback

Implementation

Preview Give feedback
  1. good first issue ✨ enhancement
    willy1989cv
  2. good first issue ✨ enhancement
    willy1989cv
  3. ✨ enhancement
    olayway
  4. UX/UI ✨ enhancement
  5. ✨ enhancement
    olayway
  6. good first issue ✨ enhancement
    willy1989cv
  7. ✨ enhancement
    olayway
  8. 📝 docs
    willy1989cv

Shaping

Flowershow config fields

✅ - supported in DataHub Cloud
❌ - not supported in DataHub Cloud
⬆️ - should be supported
🗑️ - not needed or not relevant

title

Default SEO site title and default navbar title.

description

Default site description.

logo

Path to logo.

author & domain ❌⬆️

In Flowershow used in the footer like this (along with logo):

image

Would be nice to add but display in a slightly different form maybe.

Note: ignore domain. Not sure why we thought this was needed in the first place...

navbarTitle ❌❓

Detailed navbar title config.

interface {
    logo: string;
    text: string;
    version: string;
}

Note: leave out for now. Not sure why we thought this was so important to have it on top of title and logo config fields.

navLinks

type NavLinks = Array<{
	href: string;
	name: string;
}>

showEditLink ❌⬆️

"Edit this page" with a link to GitHub file at the bottom of a page.

editLinkRoot ❌🗑️

Wouldn't be needed in DataHub Cloud, as the app knows which repo was the site built from.

showToc ❌⬆️

Currently shown by default.

showSidebar

showComments & comments ❌⬆️

Would be nice to add but requires separate shaping.

interface {
	provider: "giscus" | "utterances" | "disqus";
	pages: Array<string>;
	config: any // provider-specific config object
}

content ❌🗑️

In Flowershow it's a configurable markdown content directory.
In DataHub Cloud we have content directory configurable through the config field in the dashboard / site creation modal = directly on the Site object.

avatarPlaceholder ❌🗑️

In Flowershow it's a custom avatar placeholder image.
I don't think this is needed and I'm not sure why we added it in Flowershow in the first place. I'd drop support for it in Flowershow as well.

blogDir ❌⬆️

In Flowershow there is only one special /blog page that displays all the markdown files from the blogDir configured in the config.json.

The problem with this approach is that /blog page is always going to use the special "catalog"/"blog" layout:

image

There is no way to:

  • opt out of having /blog path use this template
  • having more pages like this, e.g. /tutorials, /events, /recipes

I'd suggest making this more flexible and allowing people use this blog/catalog layout on any page they want.

Solution:

  • build the catalog (or blog or other name) layout
  • allow people to use it by setting layout: catalog frontmatter field on virtually any page they want
  • allow people to pick the directory that should be used to populate the layout, e.g. catalogDir: "/tutorials" frontmatter field (by default it could be the parent directory of the file)

This way users wouldn't be bound to /blog path only. And you can have different catalog pages like that, e.g. /blog, /tutorials, /docs, /events ... in a single site.

peopleDir ❌⬆️

In Flowershow it's a special directory with authors' pages, that include some information about them, like name, avatar. Used in the blog layout.

theme ❌⬆️

Basic light/dark theme toggle. Let's add back, but not a top priority. First let's focus on making the layout look really nice.

Note: ignore "toggleIcon" in DataHub Cloud for now

interface {
	default: "light" | "dark";
	toggleIcon: string;
}

analytics ❌⬆️

Google Analytics key. Easy to add.

social ❌⬆️

Let's add this back and make sure we support more than "github" | "discord"

type Social = Array<{
	href: string;
	label: "github" | "discord";
}>

nextSeo ❌🗑️

We no longer use next-seo, and we set page metadata based on title & description from the config.json, frontmatter and datapackage.

This is useful for self-hosted option but I wouldn't allow people changing entire SEO config in the Cloud version. Maybe on a premium version someday.

  nextSeo: {
    titleTemplate: "%s | Flowershow",
    description:
      "Turn your markdown notes into an elegant website and tailor it to your needs. Flowershow is easy to use, fully-featured, Obsidian compatible and open-source.",
    canonical: "https://flowershow.app",
    openGraph: {
      title: "Flowershow",
      images: [
        {
          url: "https://flowershow.app/assets/images/frontpage-screenshot.jpg",
          alt: "Flowershow",
          width: 1200,
          height: 627,
          type: "image/jpg",
        },
      ],
    },
    twitter: {
      handle: "@flowershow",
      site: "https://flowershow.app",
      cardType: "summary_large_image",
    },
  },

search ❌🚧

Shaping in progress https://github.com/datopian/product/pull/248

  search: {
    provider: "algolia",
    config: {
      appId: process.env.NEXT_PUBLIC_DOCSEARCH_APP_ID,
      apiKey: process.env.NEXT_PUBLIC_DOCSEARCH_API_KEY,
      indexName: process.env.NEXT_PUBLIC_DOCSEARCH_INDEX_NAME,
    },
  },

Used to be supported in Flowershow

contentExclude & contentInclude ❌⬆️

I think we lost support after switching from contentlayer -> mddb, but definitely useful, especially for PKM audience.

Moreover, in Flowershow single files can be excluded by setting isDraft: true in frontmatter.

showLinkPreviews

I think we lost support after switching from contentlayer -> mddb. Not a top priority imo. Someday, maybe.

@github-project-automation github-project-automation bot moved this to 🆕 New in DataHub May 25, 2024
@rufuspollock rufuspollock moved this from 🆕 New to 📋 Backlog in DataHub May 27, 2024
@rufuspollock rufuspollock changed the title ❓✨ add support for user site configurations e.g. setting title for project, or stuff that is in config.js in flowershow Support for user site configurations e.g. setting title for project, or stuff that is in config.js in flowershow Jul 9, 2024
@olayway olayway moved this from 📋 Backlog to 🏗 In progress in DataHub Jul 11, 2024
@olayway olayway closed this as completed Jul 22, 2024
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in DataHub Jul 22, 2024
@olayway olayway reopened this Jul 22, 2024
@olayway olayway changed the title Support for user site configurations e.g. setting title for project, or stuff that is in config.js in flowershow [Epic] Support for user site configurations e.g. setting title for project, or stuff that is in config.js in flowershow Jul 22, 2024
@olayway olayway moved this from ✅ Done to 🏗 In progress in DataHub Jul 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🏗 In progress
Development

No branches or pull requests

2 participants