Skip to content

Add wiki pages back (2nd try)#283

Closed
Tobi406 wants to merge 27 commits into
LuckPerms:nuxt-rebuildfrom
Tobi406:add-wiki-pages-back
Closed

Add wiki pages back (2nd try)#283
Tobi406 wants to merge 27 commits into
LuckPerms:nuxt-rebuildfrom
Tobi406:add-wiki-pages-back

Conversation

@Tobi406
Copy link
Copy Markdown
Contributor

@Tobi406 Tobi406 commented Jun 25, 2020

This time, most things do actually work. Content is fetched from /metadata/wiki/:page which fetches from GitHub

TODO:

  • Make the scroll listeners on _page.vue useable
  • Re-fetch every x hours

@Tobi406 Tobi406 mentioned this pull request Jun 25, 2020
@Tobi406
Copy link
Copy Markdown
Contributor Author

Tobi406 commented Jun 25, 2020

And I think I just shifted the problem...

@Tobi406 Tobi406 marked this pull request as draft June 25, 2020 17:36
@lucko
Copy link
Copy Markdown
Member

lucko commented Jun 27, 2020

:o would be cool if we could ditch having to use a submodule for this

@Tobi406
Copy link
Copy Markdown
Contributor Author

Tobi406 commented Jun 28, 2020

Should work now. Still have to do some To-Do things but that is it then

@Tobi406 Tobi406 marked this pull request as ready for review June 28, 2020 11:54
@Tobi406
Copy link
Copy Markdown
Contributor Author

Tobi406 commented Jun 28, 2020

And done now, finally 🎉

@Tobi406 Tobi406 marked this pull request as draft June 28, 2020 12:13
@Tobi406 Tobi406 marked this pull request as ready for review June 28, 2020 12:15
Comment thread pages/wiki/_page.vue Outdated
@Tobi406
Copy link
Copy Markdown
Contributor Author

Tobi406 commented Jun 28, 2020

I think I went a little bit crazy, I added

  • a server middleware, so we can fetch our data from that instead LuckPerms/metadata-api
  • Verbose viewer works
  • Tree viewer works

@Tobi406
Copy link
Copy Markdown
Contributor Author

Tobi406 commented Jun 28, 2020

I'm gonna wait with the editor until #285 is merged though

Comment thread components/ToolIntro.vue
</a>
<p v-if="type === 'editor'">To start a new editor session, use one of the following commands:</p>
<p v-if="type === 'verbose'">To generate a verbose report, do the following in game or from console:</p>
<p v-if="type === 'treeview'">To generate a permissiont ree, do the following in game or from the console:</p>
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo

Comment thread pages/wiki/_page.vue
},
},
}
</script> No newline at end of file
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add newline

@Tobi406
Copy link
Copy Markdown
Contributor Author

Tobi406 commented Jun 29, 2020

I think I just figured out serverMiddleware doesn't run on Netlify (because it isn't static), so I guess we still have a use for the other repo.

@lucko
Copy link
Copy Markdown
Member

lucko commented Jun 29, 2020

Could it be something that we add to the metadata API?

@Tobi406
Copy link
Copy Markdown
Contributor Author

Tobi406 commented Jun 29, 2020

It's basicly just an express server (like on the metadata-api) running in nuxt. Nothing serious, can just be added to the metadata-api.

@Tobi406
Copy link
Copy Markdown
Contributor Author

Tobi406 commented Jun 29, 2020

As I said already, Netlify only supports static pages.
We can generate everything static, with the exception of the editor etc.
I think we do have the following options right now, feel free to correct me:

  • No longer use Netlify and use npm run build && npm run start to run it ourselves
  • Just leave this Nuxt thing
  • not sure about this: Change the URLs back to using a query or hash.
    • Would break versions using the old URL, even tough we might maybe be able to make a redirect (not sure again)

Comment thread package.json
"scripts": {
"dev": "nuxt",
"build": "nuxt build",
"build": "nuxt build --target static && nuxt export",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this doing?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it does the same as nuxt generate. Was more for me to test. Also see my previous comment.

@Tobi406 Tobi406 marked this pull request as draft June 30, 2020 08:58
@Turbotailz
Copy link
Copy Markdown
Member

Sorry I've been silent on this, kinda been lurking as you've made updates.

Overall I think you've done a great job so far and thanks for taking the initiative 💪

I would love to continue using Netlify if possible, because then I can still deploy updates to production without needing to nag Luck about it, plus they handle all the annoying stuff like bandwidth, caching, etc. I haven't really had much chance to play around with Nuxt to really get a good idea on what is the best solution here, though.

Personally not a big fan of the HTTP requests for getting the wiki contents but submodules aren't really a great solution either. Can't really add much input at this stage. Would definitely prefer to continue using the metadata API, however. If the wiki does need to be queried via HTTP then we can add it to that instead.

Change the URLs back to using a query or hash

Definitely not keen on this haha.

@Tobi406 Tobi406 mentioned this pull request Dec 4, 2020
9 tasks
@Tobi406 Tobi406 closed this Dec 5, 2020
@Tobi406 Tobi406 reopened this Dec 5, 2020
@Tobi406 Tobi406 closed this Dec 5, 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.

3 participants