Skip to content

Add wiki back#268

Closed
Tobi406 wants to merge 6 commits into
LuckPerms:nuxt-rebuildfrom
Tobi406:add-wiki
Closed

Add wiki back#268
Tobi406 wants to merge 6 commits into
LuckPerms:nuxt-rebuildfrom
Tobi406:add-wiki

Conversation

@Tobi406
Copy link
Copy Markdown
Contributor

@Tobi406 Tobi406 commented Jun 5, 2020

Add the wiki back. Links on the sidebar don't "load" the page, so don't merge this in yet.

@Tobi406
Copy link
Copy Markdown
Contributor Author

Tobi406 commented Jun 5, 2020

Tracked down the issue, the router on this line doesn't has a push method.

@Turbotailz
Copy link
Copy Markdown
Member

Turbotailz commented Jun 5, 2020

I tried finding what you would use instead but it seems that it should be this.$router.push() so...
¯\(ツ)

@Tobi406
Copy link
Copy Markdown
Contributor Author

Tobi406 commented Jun 5, 2020

We also get this nice console error and the article doesn't load at all:
image
Maybe we should just use window.open in all cases?

@Turbotailz
Copy link
Copy Markdown
Member

Nuxt is using Vue Router so there must be an internal method we can use. Using the browser methods will force a page reload which is not what we want (I realise now that I was doing this previously and is not the best method).

@Tobi406
Copy link
Copy Markdown
Contributor Author

Tobi406 commented Jun 6, 2020

Ok, I think I got it tracked down, this is only called client-side, but not server-side.

@Tobi406
Copy link
Copy Markdown
Contributor Author

Tobi406 commented Jun 6, 2020

We might be able to use a middleware, but I don't think we can run the method from one

@Tobi406 Tobi406 marked this pull request as draft June 10, 2020 14:35
@Tobi406
Copy link
Copy Markdown
Contributor Author

Tobi406 commented Jun 10, 2020

I can't even get the project to run anymore. No idea if it has something to do with my node installation (that is from the nuxt-rebuild branch):
image

@Tobi406
Copy link
Copy Markdown
Contributor Author

Tobi406 commented Jun 14, 2020

I think I got it. It are the foo?.bar things in store/index.js, no idea what these actually do tough

@Turbotailz
Copy link
Copy Markdown
Member

Oh, that's called "optional chaining", it's only supported in Node version 14 so you will need to update your Node by the sounds of it.

@Tobi406
Copy link
Copy Markdown
Contributor Author

Tobi406 commented Jun 15, 2020

Applying @babel/plugin-proposal-optional-chaining seems to fix the the issue.

@Tobi406
Copy link
Copy Markdown
Contributor Author

Tobi406 commented Jun 25, 2020

Ok, so I think I got a (half) working thing (finally! 🎉).

I query the raw contents of the files from GitHub periodically in a server middleware.
Then I fetch these saved contents using a fetch action from nuxt and then display them by doing a render inline.

@Tobi406
Copy link
Copy Markdown
Contributor Author

Tobi406 commented Jun 25, 2020

Superseded by #283

@Tobi406 Tobi406 closed this Jun 25, 2020
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.

2 participants