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

SSR coverpage #273

Closed
rnback opened this issue Oct 10, 2017 · 3 comments
Closed

SSR coverpage #273

rnback opened this issue Oct 10, 2017 · 3 comments
Milestone

Comments

@rnback
Copy link

rnback commented Oct 10, 2017

I noticed the _coverpage.md is not rendered on the server side when using SSR mode.
I tried to implement the SSR by copying the logic the logic for the _navbar.md, but it didn't work.
Any ideas?

@QingWei-Li QingWei-Li added this to the 4.6.0 milestone Jan 3, 2018
QingWei-Li added a commit that referenced this issue Feb 10, 2018
QingWei-Li added a commit that referenced this issue Feb 11, 2018
@soulfly
Copy link
Contributor

soulfly commented Jun 12, 2018

Is it completely fixed?

I still just see a background and 'undefined' text in the center of a cover page
docsify_ssr

@soulfly
Copy link
Contributor

soulfly commented Jun 13, 2018

When I do

docsify start . -c ssr.config.js

and then open http://localhost:4000 for the 1st time - it says 'undefined'.
Then when I go to some page and then back to the Cover page - it works correctly

I fixed this by modifying the initFetch function:

    // callHook(vm, 'doneEach');
    // callHook(vm, 'ready');

    vm.$fetch(function (_) {
      callHook(vm, 'doneEach');
      return callHook(vm, 'ready');
    });

because from my understanding, the $fetch function is not fired on SSR mode when you open your site for the first time

@QingWei-Li could you please clarify it

@soulfly
Copy link
Contributor

soulfly commented Jun 13, 2018

So looks like it's still not working when use docsify start

Also, when use the docsify-server-renderer - there is an issue when the coverpage config is boolean (e.g. true)

It's simply no case for a boolean type in the fix - it just goes to else part which actually waits for an object, not a boolean
8b132d2

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

2 participants