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

gallery of components; customizable home page #219

Open
jckr opened this issue Jul 23, 2019 · 0 comments
Open

gallery of components; customizable home page #219

jckr opened this issue Jul 23, 2019 · 0 comments

Comments

@jckr
Copy link
Contributor

jckr commented Jul 23, 2019

bespoke home pages for our various documentation projects are made out of similar building blocks.
In the future, we would build a list of standard components which could be used to build custom pages without having to recreate them from scratch. Concretely, the only surface that we really want to customize is the home page, though we could create different surfaces as well.

If we have a gallery of standard components in Ocular gatsby, it's easy for a React developer to compose a custom page by importing them (as if they were in the local tree) and building the page from there. We could go one step further and allow the home page to be entirely customizable without having to code. As long as the home page is made out of known, standard components, it can be described in a configuration file (ie yaml, json). ie:

[
  {
    "hero": {
      "component": "./src/my-hero.component.jsx",
      "title": "my ocular site",
      "tagline": "a cool ocular site"
    }
  },
  {
    "bulletPoints": {
      "bullets": [
        {
          "label": "my first point"
        },
        {
          "label": "my second point"
        }
      ]
    }
  },
  {
    "caroussel": {
      "images": [
        {
          "src": "./src/assets/screenshot1.png",
          "description": "one cool screenshot"
        },
        {
          "src": "./src/assets/screenshot2.png",
          "description": "another screenshot"
        }
      ]
    }
  }
]

We can then write the code to generate the page from that configuration information. That configuration file could be standalone or exist within ocular-config.js.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant