Skip to content

Generate static HTML site (static site generation, SSG) #136

Closed

Description

@acathur

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

EDIT by maintainers:

status PR

Activity

  1. QingWei-Li commented on Mar 17, 2017

    @QingWei-Li
    Member

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

  2. jrappen commented on Mar 18, 2017

    @jrappen
    Contributor
  3. egoist commented on Mar 28, 2017

    @egoist

    so why not use gitbook 😄

  4. jrappen commented on Apr 21, 2017

    @jrappen
    Contributor
  5. egoist commented on Apr 21, 2017

    @egoist

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

  6. dietergoetelen commented on May 31, 2017

    @dietergoetelen

    @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?

  7. egoist commented on May 31, 2017

    @egoist
  8. QingWei-Li commented on May 31, 2017

    @QingWei-Li
    Member

    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?

  9. 39 remaining items

  10. qmjy commented on Sep 9, 2020

    @qmjy

    I'm looking forward to it. 👍

  11. itymarcel commented on Jun 17, 2021

    @itymarcel

    Also looking forward to it. Is there any reason why this hasn't been merged yet? Thank you for working on this it's an amazing tool!

  12. MattRiddell commented on Dec 14, 2021

    @MattRiddell

    Adding my voice to this - would make it a lot easier for me to get this deployed as a tool as I'd be able to send generated files to our documentation hubs.

    EDIT: Sorry, also forgot to say what an awesome tool this is and how long I've been searching for something that fills my needs the way this does. I've used a tonne of documentation tools and this one aligns with my thought process and development methods by far the best. Doesn't hurt that the output is gorgeous too!

  13. juukee commented on Feb 19, 2022

    @juukee

    so when can we use it?

  14. weituotian commented on Feb 19, 2022

    @weituotian
  15. hefengliang commented on Jul 8, 2022

    @hefengliang

    so when can we use it?

  16. BryanYin commented on Aug 10, 2022

    @BryanYin

    Is there any reason why this hasn't been merged yet? Thank you for working on this it's an amazing tool!

  17. trusktr commented on Aug 10, 2022

    @trusktr
    Member

    It was experimental and didn't reach a state of being ready.

    But! I'm interested in another plan:

    I'd like to get Docsify to use Solid.js (I've been working with the Solid team) for its built-in and fast SSR and SSG capabilities. This involves first re-writing Docsify internals as Solid components. I started that work in the dom-with-solid branch here:

    develop...dom-with-solid

    As you can see there, some internal code is getting cleaner, for example this code,

    function mainTpl(config) {
      let html = `<nav class="app-nav${
        config.repo ? '' : ' no-badge'
      }"><!--navbar--></nav>`;
    
      if (config.repo) {
        html += tpl.corner(config.repo);
      }
    
      if (config.coverpage) {
        html += tpl.cover();
      }
    
      html += tpl.main(config);
    
      return html;
    }

    was changed to

    function mainTpl(config) {
      return (
        <>
          <nav
            class={`app-nav${config.repo ? '' : ' no-badge'}`}
            innerHTML={'<!--navbar-->'}
          ></nav>
    
          {config.repo && (
            <GithubCorner
              githubUrl={config.repo}
              cornerExternalLinkTarget={config.cornerExternalLinkTarge}
            />
          )}
    
          {config.coverpage && <Cover />}
    
          <Main {...config} />
        </>
      );
    }

    where GithubCorner, Cover, and Main are also components, all with a more modern reactive-declarative paradigm.

    Besides SSR and SSG, this will allow us to more easily implement features like custom templates in a nice way. Imagine browsing a collection of templates to choose from (not just CSS themes), each with unique functionalities.

    Up next I will remove the existing SSR implementation (in that branch, or a new branch based on that branch) because it has issues with plugins, and fixing that would be some work that would need to be totally replaced with the Solid SSR approach anyway (and I don't want to spend time working on two things when I can work on just one).

    I'm also not sure that the team will approve of this direction. In that case I will be willing to make a fork to continue working on it there.

  18. sergeiromanov commented on Oct 3, 2022

    @sergeiromanov

    docsify looked so perfect for my case until I realized it doesn't generate static html :(

  19. weituotian commented on Oct 3, 2022

    @weituotian
  20. mandrasch commented on Oct 4, 2022

    @mandrasch

    Just a quick thought: Could docsify be coupled with eleventy (https://www.11ty.dev/) or astro (https://astro.build/)? Guess for some use case (https://github.com/hibbitts-design/docsify-open-course-starter-kit for example) working without npm and without a build pipeline is a key feature of docsify. But for users wanting to have static output a (technical) bridge to eleventy or astro would be maybe an option as well? 🤔

  21. scruel commented on Mar 24, 2023

    @scruel

    I don't think this would be necessary, for crawlers, we can just provide them the hidden URLs which will redirect to markdown file directly?

  22. weituotian commented on Mar 24, 2023

    @weituotian
  23. jhildenbiddle commented on Mar 1, 2024

    @jhildenbiddle
    Member

    Docsify may someday offer static site generation, but given the myriad of alternatives offering SSG it seems best for Docsify to continue focusing on its client-side site generation abilities.

    Closing due to inactivity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions