-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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
Documentation and Examples for Static Site Generation (SSG) #5015
Comments
Docusaurus focus mostly on the docs use case, considering that your docs are available on the filesystem at build time. However, it technically remains a generic SSG, and is similar to Gatsby without the GraphQL data layer. If you want to integrate with a CMS, it is probably not the best choice currently (at least we don't have very good doc to help you figure this out). We'll definitively try to improve our APIs and doc on that, but keep in mind Docusaurus does not aim to be a better generic SSG than Next or Gatsby, so if your main use-case is to integrate with CMSes and not build doc sites based on git markdown files, you'd better not use Docusaurus in the first place. |
@slorber Thank you for clarifying.
Just to show that building the docs from a remote source is still a recurrent question for me, either integrating with a CMS or with remote documentation files: There's a second project that i'm part of, the documentation in this case is indeed markdown files. Part of the documentation lives inside each applications repository and part of it are in a centralized gitlab wiki (it uses gollum git wiki under the hood). Docusaurus lives in a separated repository and i'm struggling to come with a way to fetch all the docs file during development/build files. Is there any better way of doing this besides using git submodules? |
Docusaurus does not care about what you use, as long as it's able to see the files at the correct file-system location when using start/build. I can't really tell you what is the best way to "fetch" your docs, using git, rsync, ssh, cp, mv, curl, wget, unzip or whatever you want is the same for Docusaurus. If we build something for CMS integration, it's more likely to be a way to fetch/cache the data using an async callback as part of a content plugin. Not sure it would solve your use-case anyway if your source is already markdown files. |
Thank you, I'll try to find a way to see what works best for my use-case.
That would be really great! Should we keep this issue open so we can gather more feedback if other users are having the same doubts? |
We can keep this open until I document better how Docusaurus can be used as a less opinionated SSG, in a similar way to Gatsby |
This is an old issue and I think we improved our documentation regarding plugins creation, lifecycles etc... Also things are going to change deeply once we introduce React Server Components (#9089). I think we can close it for now and imporve our docs even more once we implement RSCs |
Hello, coming from a NextJS background and not being an expert in react hooks, I'm having some confusion trying to set up Static Side Generation using Server Side hooks. My markdown files are stored in a CMS and I would like to generate the static pages at build time.
I found NextJS server-side methods are well documented (getInitialProps, getStaticProps, getStaticPaths, getServerSideProps) and easy to learn. I think this could be done with Docusaurus as well.
The following informations is what i gathered in research but still didn't manage to implement myself:
📚 Documentation
Can we, please, have:
The text was updated successfully, but these errors were encountered: