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

Setup CMS #53

Open
ColinMcNeil opened this issue May 15, 2018 · 8 comments
Open

Setup CMS #53

ColinMcNeil opened this issue May 15, 2018 · 8 comments

Comments

@ColinMcNeil
Copy link
Collaborator

Content management has to be setup via directus

@gluxon
Copy link
Member

gluxon commented May 15, 2018

Here's the production endpoint: https://admin.squaredlabs.uconn.edu

@ColinMcNeil
Copy link
Collaborator Author

DM me the credentials

@gluxon
Copy link
Member

gluxon commented May 15, 2018

@Nexuist Can you setup accounts for Colin and I?

@gluxon
Copy link
Member

gluxon commented May 17, 2018

the site will only reflect CMS changes after it gets re-compiled, aka, if any new commits get pushed to the repo. Is this okay? I was thinking about it and it sounds like a bit of a pain every time you make a change in directus, you have to clone the repo, make a change, push it, and merge the branch in order to simply update the content. --Colin

Yeah, that's not good. ---Dan

@ColinMcNeil @Nexuist There's two ways to solve @dschwartz's use case.

  • If we want the site to automatically update with changes, we can go back to SPA mode.
  • Alternatively, you could use Directus API hooks. Make sure to have a debounce though. (5 minutes probably reasonable.) So we don't have drone builds firing every time someone makes a change on the CMS.

@ColinMcNeil
Copy link
Collaborator Author

#78

getAsyncData is fired before page rendered and will work fine with SSR. If you're worried about too many api calls we can do what Jerry said for my senior design project and make it a %chance to update on page load.

@gluxon
Copy link
Member

gluxon commented May 17, 2018

getAsyncData is fired before page rendered and will work fine with SSR.

I'm not saying there's issues with using getAsyncData and server side rendering. I'm proposing two solutions to the use-case Dan wanted. getAsyncData solves a different problem with building the site based off of information in our Directus instance. There's a separate problem with getting builds to happen when information in our Directus instance is updated.

ColinMcNeil added a commit that referenced this issue May 18, 2018
@ColinMcNeil
Copy link
Collaborator Author

ColinMcNeil commented May 18, 2018

I'm suggesting we pull from the directus API in getAsyncData.
https://github.com/SquaredLabs/squaredlabs.uconn.edu/blob/develop/directus.js
I was planning on making it a module like: export default startLoad() and then
calling that function in getAsyncData so that it generated the JSON files each time.

I just am not sure how often it will call getAsyncData. Every page load? If that's the case then give it a 10% chance to pull the data perhaps.

ColinMcNeil added a commit that referenced this issue May 18, 2018
ColinMcNeil added a commit that referenced this issue May 18, 2018
# 78 move CMS to getAsyncData
#53
ColinMcNeil added a commit that referenced this issue May 18, 2018
# 78 move CMS to getAsyncData
#53
@ColinMcNeil
Copy link
Collaborator Author

getAsyncData is all set. Waiting on #82 , but after that we can resolve this.

gluxon pushed a commit that referenced this issue Jul 6, 2018
gluxon pushed a commit that referenced this issue Jul 6, 2018
gluxon pushed a commit that referenced this issue Jul 6, 2018
# 78 move CMS to getAsyncData
#53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants