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

Add Docusaurus official template #5136

Merged
merged 1 commit into from
Jan 18, 2021
Merged

Add Docusaurus official template #5136

merged 1 commit into from
Jan 18, 2021

Conversation

SaraVieira
Copy link
Contributor

@SaraVieira SaraVieira commented Nov 16, 2020

[NEEDS TO BE ADDED TO THE BACKEND BEFORE MERGE]

This adds all the stuff required in our code to get the new Docusaurus template up and going

closes #5135

Also merge codesandbox/codesandbox-importers#104

@lbogdan
Copy link
Contributor

lbogdan commented Nov 16, 2020

Build for latest commit 40d6012 is at https://pr5136.build.csb.dev/s/new.

@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 40d6012:

Sandbox Source
Notifications Test Configuration

@slorber
Copy link

slorber commented Dec 16, 2020

Hi @SaraVieira

Was wondering if I can do anything to complete our codesandbox integration?

@slorber
Copy link

slorber commented Jan 14, 2021

Hi @SaraVieira , let me know if I can do anything to get this PR merged.

I'd like to document this integration and use it for users to submit bug reports etc :)

Was wondering in the meantime: what's the best way to create an equivalent of https://codesandbox.io/s/new and create a new.docusaurus.io DNS record?

Should I just redirect my DNS record to a Docusaurus template that I imported?
Like https://codesandbox.io/s/zealous-water-27qhv
Is there a better way, that would ensure the template is updated according to our Github repository content?
Thanks

@garethx
Copy link
Contributor

garethx commented Jan 15, 2021

@slorber Sara will pick up your other questions, but just with regard to an always up to date template you could redirect to https://codesandbox.io/s/github/facebook/docusaurus/tree/master/examples/classic (or whichever repo you want - just alter the path), as that is synced with the repo so will remain up to date.

@slorber
Copy link

slorber commented Jan 15, 2021

Thanks @garethx , exactly what I was looking for :)

I would rather have asked that sooner 😅

@SaraVieira
Copy link
Contributor Author

Hey!

I am so sorry for this delay seriously :(

We have been working on some major stuff and it completely slipped our minds to get this finished. I also needed some help with backend stuff for this.

I have a meeting set up with ives to get this merged today! About the domain, we will create /s/docusaurus, that's exactly what I needed help with in the backend

And yeah about new.docusaurus.io that needs to be a DNS on your side pointing to /s/docusaurus.

Again, so sorry about the delay and really hoping to get this out today!!

@slorber
Copy link

slorber commented Jan 18, 2021

Thanks @SaraVieira

I was already able to setup the https://new.docusaurus.io domain, so nothing hurry on my side now, as we can start adding doc for that stable URL.

Just let me know when we have a shorter URL to redirect to.

@SaraVieira SaraVieira marked this pull request as ready for review January 18, 2021 14:07
@SaraVieira SaraVieira merged commit 954e402 into master Jan 18, 2021
@SaraVieira SaraVieira deleted the add-docusaurus branch January 18, 2021 14:07
@SaraVieira
Copy link
Contributor Author

It has been merged 🔥

https://codesandbox.io/s/docusaurus

@slorber
Copy link

slorber commented Jan 18, 2021

awesome, thank you :)

@slorber
Copy link

slorber commented Jan 18, 2021

Not very important but if you can replace the default nodejs icon with a custom one, that would be cool to show our mascot Slash 🤪 it helps identify Docusaurus more easily in the list

https://v2.docusaurus.io/img/docusaurus_keytar.svg

image

@SaraVieira
Copy link
Contributor Author

Yeah, we did that but for some reason our cache is really not having it and it keeps returning the template as node :(

We are gonna wait untill tomorrow to see if it gets updated otherwhise more digging will occur tomorrow

Our logo does not have him playing keyboard guitar tho, I can change it 😂

@slorber
Copy link

slorber commented Jan 18, 2021

Thanks :)

With or without keyboard that's fine ;)

@slorber
Copy link

slorber commented Jan 18, 2021

Just wanted to report that something changed and the template is now "example-classic":

image

It's the name in the package json of this template, should we change it somehow or you can handle this?

@slorber
Copy link

slorber commented Jan 19, 2021

Hi @SaraVieira @garethx

I'm encountering some weird behaviors on our Sandbox.

Using a new browser session (using my "John Doe" Chrome user or hidden session), I get this result:

image

The errors looks related to things I did yesterday to create a bug repro for Docusaurus using CodeSandbox.
(weird thing is I cannot see files I created yesterday through the UI, but using ls -l show them)

Somehow it's like I managed to break that URL template, and it's now stateful and keeps my manually created errors instead of reinitializing itself from the template code on Github.

It does not work better with this URL: https://codesandbox.io/s/github/facebook/docusaurus/tree/master/examples/classic

However if I use the "create sandbox" feature on the UI, I get a fresh working URL: https://codesandbox.io/s/thirsty-swanson-yjqk6

Is there a way to fix https://codesandbox.io/s/docusaurus and make sure it's 100% immutable and local edits of users are not somehow persisted and shared?

@slorber
Copy link

slorber commented Jan 19, 2021

I'm going to upgrade our repo examples to see if it can be fixed.

Also changing the template from "node" to "docusaurus", looks better to me but not sure what's the impact of this anyway 😅

image

@slorber
Copy link

slorber commented Jan 19, 2021

Oh, the problem seems fixed now, not sure what fixed it.

Just updated our repo template here, but it's not visible in the sandbox yet: https://github.com/facebook/docusaurus/tree/master/examples/classic
I guess it's just some delay/caching.

@SaraVieira
Copy link
Contributor Author

omg everything updated!!
CleanShot 2021-01-20 at 01 09 23@2x

I'm really sorry about the caching

About any changes, it should always be immutable unless the GitHub repo is changed, not even we have access to change the code since it's hosted on Github

@slorber
Copy link

slorber commented Jan 20, 2021

Thanks @SaraVieira , it seems to work fine now. Not sure what happened but I ended up in a weird unexpected state 😅 .

I'll just upgrade my package.json name so that it does not display "examples-classic", as it seems you read the package name. However I can't use uppercase or spaces in this package-name, that would be convenient if you offered a way to specify the name that should appear in your UI as a separate config attribute somehow. Not a big deal for me though, just a suggestion. "docusaurus" will be fine :)

@SaraVieira
Copy link
Contributor Author

Hey!

It's weird, because when we deployed it we did change it to be that but I guess it did not stick for some reason, I'll ask ives to change the DB again :/

Want any description?

@slorber
Copy link

slorber commented Jan 20, 2021

Not sure where this description appears exactly but I'd be happy to have:

  • name: Docusaurus
  • description: Docusaurus example project

I'm just adding a better name to package.json in case it reproduces, so at worst it will just fallback to "docusaurus", not a big deal :)

@SaraVieira
Copy link
Contributor Author

It's been updated :)

@slorber
Copy link

slorber commented Jan 20, 2021

Thanks, I can see that :)

image

As there's no uppercase in Docusaurus I just wonder if it's not my "docusaurus" fallback that is being used though :p

@CodeSandboxTeam
Copy link

CodeSandboxTeam commented Jan 20, 2021 via email

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

Successfully merging this pull request may close these issues.

Add Docusaurus to official templates
5 participants