docsify icon indicating copy to clipboard operation
docsify copied to clipboard

Generate static HTML site (static site generation, SSG)

Open acathur opened this issue 7 years ago β€’ 52 comments

Eagerly waiting for this function, maybe it can be added to docsify-cli.

EDIT by maintainers:

status PR

  • This is from #802 (The original Implementation)
  • We can either continue on #802 or create a fresh PR for this (@QingWei-Li thoughts ?)
  • docsify-cli implementation ref https://github.com/docsifyjs/docsify-cli/pull/55
  • Original issue https://github.com/docsifyjs/docsify/issues/136

acathur avatar Mar 17 '17 07:03 acathur

Sorry I don't have time to do now 😣, if you are interested, you can contribute.

QingWei-Li avatar Mar 17 '17 08:03 QingWei-Li

For comparison, maybe this is a start?

jrappen avatar Mar 18 '17 16:03 jrappen

so why not use gitbook πŸ˜„

egoist avatar Mar 28 '17 03:03 egoist

@jrappen that looks cool, but seems it does the same things that gitbook can do

egoist avatar Apr 21 '17 19:04 egoist

@QingWei-Li I'm new to docsify, would love to see this feature. I'm interested in contributing, can you point me in the right direction?

dietergoetelen avatar May 31 '17 13:05 dietergoetelen

@dietergoetelen Seems the SSR API can achieve this https://docsify.js.org/#/ssr?id=deploy-for-your-vps

egoist avatar May 31 '17 13:05 egoist

Hi @dietergoetelen, Now part of the compiler can run in Node, you can refer to docsify-server-renderer. We can read the files and then compile them like docsify-server-renderer do the same. Would you like to try it?

QingWei-Li avatar May 31 '17 13:05 QingWei-Li

@QingWeil-Li Was this close because it's now possible? Won’t fix?

maoueh avatar Feb 27 '18 01:02 maoueh

@maoueh

GitBook is recommended if you need to build static files.

QingWei-Li avatar Feb 27 '18 01:02 QingWei-Li

But GitBook is a paid product, It's only free for "non private" projects. Can we at least leave the PR Welcome?

luishdez avatar Mar 14 '18 19:03 luishdez

@QingWei-Li

A really simple solution would be to just add a print-css and reference the browser print function with a simple button (printing to PDF can then be chosen by the user). What do you think?

gottlike avatar Apr 22 '18 12:04 gottlike

+1 on the feature request.

KerimG avatar Aug 13 '18 13:08 KerimG

@jrappen I stumbled upon Madoko a while back. The main issue with it is that it is written in Koka, which no one knows apart from its author Daan Leijen, who is also the author of that package. For a while it was hosted on CodePlex, and it was really difficult to find the sources, let alone understand them, or contribute. I suppose this is now on GitHub because MS acquired the company... The reference manual looks absolutely amazing, and it's difficult to think that only one person is behind this; but IMO that summarises the project well. It looks awesome, but it's a black-box, written in sanskrit, with a single contributor.

@egoist Have a look at the reference manual; it serves a different purpose than GitBook. Madoko was designed to write scientific publication-like content; it supports LaTeX maths, internal references, citations, and footnotes out of the box. GitBook is meant to be an advanced documentation-writing tool, oriented towards web-publishing. Let us not compare pears and apples.

sheljohn avatar Nov 02 '18 11:11 sheljohn

@QingWei-Li can it output pdf? need!

weituotian avatar Nov 07 '18 06:11 weituotian

+1 on the feature request.

ideacco avatar Dec 19 '18 06:12 ideacco

+1 on the feature request.

yhhwpp avatar Dec 05 '19 09:12 yhhwpp

https://github.com/egoist/presite might be useful here

justerhan avatar Dec 09 '19 23:12 justerhan

Anyone that wants this feature, why do you want it? Has the live client-side markdown rendering been too slow for you? Is it hindering your user experience?

I am just curious, because performance updates for the sake of performance updates may not be as productive use of time compared to other features that are being planned. Please let us know if you encountered any performance problems that make a difference to the user experience (so far I haven't seen one that is significant, but it could be possible if you have giant markdown pages then that's an issue, for example).

@anikethsaha Since you listed this in v5, I'll re-open and add it to the 5.0 project so we can track it.

trusktr avatar May 10 '20 22:05 trusktr

Mostly because static files are easy to deploy across a cdn Service like Netlify

On Sun, May 10, 2020, 15:50 Joe Pea [email protected] wrote:

Just curious, anyone that wants this feature, why do you want it? Has the live client-side markdown rendering been too slow for you? Is it hindering your user experience?

@anikethsaha https://github.com/anikethsaha Since you listed this in v5, I'll re-open and add it to the 5.0 project so we can track it.

β€” You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/docsifyjs/docsify/issues/136#issuecomment-626401785, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGTNWYJT5DYMQ5ELKDQPTLRQ4VSPANCNFSM4DEBBIDA .

justerhan avatar May 10 '20 23:05 justerhan

@bountyx Markdown files are also static files.

trusktr avatar May 10 '20 23:05 trusktr

Ah! SEO!

That's a good reason to serve HTML, to make things more indexable by search engines.

trusktr avatar May 11 '20 03:05 trusktr

@trusktr there is an issue with plugins. most of the things in docsify is a plugin. we cant make them work if we don't have the DOM. So either we need to do it with jsdom while but this won't give 100% accurate results.

This will be a blocking issue for v5.

anikethsaha avatar May 11 '20 04:05 anikethsaha

Maybe also doesn't have to be for 5.0, it can be for "when it's ready". :) It's a bit complex.

Maybe we can build it on NW.js instead of JSDom.

trusktr avatar May 14 '20 00:05 trusktr

@trusktr yeah, we can remove this from the roadmap, this will be blocking issue

anikethsaha avatar May 14 '20 05:05 anikethsaha

πŸ‘

trusktr avatar May 14 '20 16:05 trusktr

+1 on the feature request.

I using docsify for a online converter:

  1. it can convert opml outline file to md;
  2. then preview the md file using docsify;
  3. and using the docsify server renderer, convert the md file to html file;
  4. then using WeasyPrint (python package) convert html to PDF.

now i am blocked in the step 3. because docsify server renderer have some probreams:

  1. it can't set basePath to local location;
  2. I don't know how to save the rendered content to an html file at server.

vagra avatar May 19 '20 09:05 vagra

need 2 function:

  1. generate static html files for all docs;
  2. genarate a html file for a specific doc;

vagra avatar May 20 '20 07:05 vagra

We have a blocking issue as plugins won't work if there is no DOM. Many plugins are using browser's features like local storage.

So i am not sure how long it will take or even it will be done or not

anikethsaha avatar May 20 '20 07:05 anikethsaha

Do plugins work with Docsify's SSR?

trusktr avatar May 21 '20 07:05 trusktr