Chalarangelo / 30-seconds-of-react

Short React code snippets for all your development needs
https://www.30secondsofcode.org/react/p/1
Creative Commons Attribution 4.0 International
5.08k stars 484 forks source link

[CHORE] Website #3

Closed Chalarangelo closed 5 years ago

Chalarangelo commented 5 years ago

Ideally, we would publish under react.30secondsofcode.org and include this repo as a submodule in the 30code repo.

We need a script, static parts and a decent design for this.

SCHKN commented 5 years ago

As a side note, the markdown-to-jsx library has a cool feature of overriding the components found in a Markdown into a real live React component. Can be pretty useful if you went to render components natively on the website instead of going by Codepen for example.

skatcat31 commented 5 years ago

I mean we can have an extraction script, however there are a few examples of this that would be hard to do like modals and galleries

skatcat31 commented 5 years ago

Otherwise that library seems great, if not a bit slow...

skatcat31 commented 5 years ago

As a side note, now that import is in most browsers, should we bundle or do we just want to import and build individual files to be imported in the script so that we can cache unchanging versions and send less data over(and allow smaller network traffic, if not more requests)?

Chalarangelo commented 5 years ago

Let's start small initially. Just show the code itself as a more rich version of the README. After we build and ship that, we can start thinking about more interactive and useful features like the ones you mention.

If nobody is against this, let's keep discussing this, while we start implementing the basic features and layout.

skatcat31 commented 5 years ago

An example of imports versus bundling can be seen with my entry for William Sonoma: https://github.com/skatcat31/william-sonoma-challenge

fejes713 commented 5 years ago

@atomiks you tend to have some awesome design ideas, anything interesting this time? I tough of using react this time on this project (makes sense, plus we're going to get better at it by writing it).

@Chalarangelo apart from general stuff, this issue is the most important one 😉

Chalarangelo commented 5 years ago

@fejes713 I agree, but I'd rather we got some content up first and generate a README properly, which is long overdue by the way, than work on the website right away. As long as we are under 50 snippets, README works well enough for presentation, so we can start with that and then, based on the issues we face, come up with a plan for the website.

sagban commented 5 years ago

There are so many libraries available which directly convert markdown to HTML dynamically. All we have to create a small template for the same. This can be a single page application where all the snippets are available. On clicking particular, the user can see the detailed view.

On the addition part, there can be a function of copying code on clicking some button.

atomiks commented 5 years ago

MDX is generally what's used now to include React components inside Markdown files

jonniespratley commented 5 years ago

Maybe something Demoboard and MDX could make the website interactive as well as demonstrate the components. Take a look at https://mdxjs.com/ and https://frontarm.com/demoboard/ and let me know what your thoughts are.

Chalarangelo commented 5 years ago

This has been resolved for a couple of weeks now, closing...

lock[bot] commented 4 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for any follow-up tasks.