Skip to content
This repository has been archived by the owner on Mar 31, 2020. It is now read-only.

Initial setup of docs-components site & package 🎉 #1

Merged
merged 39 commits into from
Feb 20, 2019
Merged

Conversation

emplums
Copy link
Contributor

@emplums emplums commented Feb 14, 2019

This PR sets up a base for a new docs-components library & documentation site! 🙌

Package:

  • exports React components that can be imported in other documentation sites and reused
  • eventually we'll also move over the Next.js utilities from https://github.com/primer/next and delete that repository

Documentation Site:

  • A documentation website for the components in this package 📖 Check it out here!

    Might seem a little overly-meta to build a documentation site for components for documentation sites, but we need a place to explain usage of these components. 🤷‍♀️

BUT ALSO:

I'm thinking through the idea of this repository itself being a place we can point people to clone & reuse for their own documentation sites. I've outlined what would need to be done in the README to get a docs site running from cloning this one. It's not perfect but maybe with some reusable variables in package.json or a ✨ cli tool ✨ we can make it a bit easier?

Notes

I copy pasta'd a lot of the repository/publishing/deploying/next config from primer/css, and there is probably some stuff in here that isn't necessary. @shawnbot I could use your help sifting through the files added and making sure we need all of it, since I want this to be a good repo to clone to make new sites.

I'd love your input @shawnbot on whether or not any of the things in /lib/ or /script/ would make sense to export in the package as well. And if so, I'd need help writing documentation for those as I haven't touched them or worked with them yet!

@shawnbot
Copy link
Contributor

I'll have some more time to look at this tomorrow, but in the meantime, a couple of things:

  1. I don't think we need any of the Metalsmith syncing code for this — sync.js and all of its dependencies — unless we plan on building more sites that need to transform Markdown from a folder outside of pages into MDX.

  2. It would be great if we could publish our Next.js configuration as a "plugin" — i.e. a function that takes options and returns a function that modifies Next's configuration. Then we (and other folks) could get all of the MDX and other goodness without necessarily having to bring along all of the React components.

  3. We should double-check that the weird mangling issues with MDX are still an issue; if not, let's kill that bit of magic in our config.

@emplums emplums changed the title [WIP] Initial setup of docs-components site & package 🎉 Initial setup of docs-components site & package 🎉 Feb 15, 2019
@emplums emplums requested a review from shawnbot February 19, 2019 19:24
@emplums emplums merged commit 6da0664 into master Feb 20, 2019
@emplums emplums deleted the setup branch February 20, 2019 17:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants