<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Vanna </title>
    <description>The latest articles on DEV Community by Vanna  (@vanigami).</description>
    <link>https://dev.to/vanigami</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F181019%2F1ca662e0-e3da-4f8a-bfd8-9c4348e658dd.JPG</url>
      <title>DEV Community: Vanna </title>
      <link>https://dev.to/vanigami</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/vanigami"/>
    <language>en</language>
    <item>
      <title>Docusaurus Versioning</title>
      <dc:creator>Vanna </dc:creator>
      <pubDate>Fri, 03 Mar 2023 22:30:05 +0000</pubDate>
      <link>https://dev.to/vanigami/docusaurus-versioning-53mb</link>
      <guid>https://dev.to/vanigami/docusaurus-versioning-53mb</guid>
      <description>&lt;p&gt;&lt;a href="https://dev.to/vanigami/from-docsify-to-docusaurus-21o5"&gt;For reasons&lt;/a&gt;, I’m switching GraphGrid’s docs site from Docsify to Docusaurus. During this process I’m taking the opportunity to improve the site architecture. After getting the v1.4 docs building with Docusaurus, I had to start thinking about how I was going to pull in v2.0. I was anxious to implement the Docusaurus versioning CLI, because it relieves pain-points on both the development and user side. &lt;/p&gt;

&lt;p&gt;GG has two versions 1.4 and 2.0. With the old site (the Docsify one), I maintained two separate branches (1.4 and 2.0). You can imagine that these separate branches often got out of sync, and when they were finally merged, there’s a conflict list longer than a CVS receipt. From an architectural standpoint, the old site did not provide an intuitive way to switch between versions. For example, to switch from the 1.4 to the 2.0 docs, the user had to edit the version path in the URL. Users also didn’t have any clear indication of what version of the docs they were on.  &lt;/p&gt;

&lt;p&gt;With Docusaurus versioning, we’re not able to maintain the docs version under 1 branch by combining the two versions (1.4 and 2.0).  Now each version is updated synchronously, no more getting behind or merge conflicts! Docusaurus allows you to configure the versioning behavior.  &lt;/p&gt;

&lt;h2&gt;
  
  
  Getting around default current docs version directory
&lt;/h2&gt;

&lt;p&gt;By default, Docusaurus creates a directory for your project’s current version. For my use case it didn’t make sense to use the current version because we don’t publish pre-release docs.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flrtr8z2kqzs71lts7du0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flrtr8z2kqzs71lts7du0.png" alt="docusaurus_versioning_table" width="800" height="294"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftbgyx530y2qwyah3szmt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftbgyx530y2qwyah3szmt.png" alt="docusaurus_tip" width="800" height="144"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Because the current version is baked in, I had to figure out how to &lt;em&gt;un-bake&lt;/em&gt; it (&lt;em&gt;unbaking&lt;/em&gt; is a term I just made up that means deconstructing a feature in order to construct another).  This has been the most custom config I’ve had to do thus far because of a Docusaurus feature. I’m not complaining but  R.I.P. github issue #1243.&lt;br&gt;&lt;br&gt;
If you’re trying to use Docusaurus versioning without &lt;code&gt;/doc /next/&lt;/code&gt; (“current version” or pre-release docs), you’re going to have to do some configuring.    &lt;/p&gt;

&lt;p&gt;Docusaurus suggests two versioning behavior patterns. You should use the 1st pattern if you want to publish prerelease docs. I used pattern 2 which outlines the necessary plugin options to use to achieve &lt;em&gt;unbakening&lt;/em&gt;. &lt;/p&gt;
&lt;h2&gt;
  
  
  Unbake  🍪
&lt;/h2&gt;

&lt;p&gt;Within the docs-plugin preset config I used &lt;code&gt;lastVersion&lt;/code&gt; and set it to &lt;code&gt;current&lt;/code&gt;. This combines the current version and the major version (this includes all default routes). This is the recipe to follow for those looking to not include the default current docs versioning template. No more “Next” in the dropdown, and no more routing nightmares!&lt;/p&gt;
&lt;h2&gt;
  
  
  Presentation
&lt;/h2&gt;

&lt;p&gt;Now that we baked the site how WE want it, it's time to make it pretty. In the same configuration, I defined the label for the now combined current and major release version. This value will be used in the UI components like the navBar items. I set the path as root because I want this version to (2.0) to be the main docs.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docs {
    lastVersion: 'current',
    versions: {
        current: {
            label: '2.0',
            path: '/',
            badge: true
        }
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I added a version number badge, which isn't necessary but I like having a clear version indicator to prevent confusion.&lt;/p&gt;

&lt;h2&gt;
  
  
  Version NavBar
&lt;/h2&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Next I added navbar items to improve the user experience. I added an item called `docsVersionDropdown` which adds a version drop down.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6c9pv6s01to8eeinkebs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6c9pv6s01to8eeinkebs.png" alt="version_dropdown" width="652" height="500"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
    type: 'docsVersionDropdown',
    position: 'left',
    dropdownActiveClassDisabled: true,
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For more info and configuration options check out Docusaurus’s versioning docs! &lt;/p&gt;

&lt;p&gt;Checkout out &lt;a href="https://vpuzakulics.myportfolio.com/docusaurus-versioning" rel="noopener noreferrer"&gt;my blog&lt;/a&gt; for a demo video! &lt;/p&gt;

</description>
    </item>
    <item>
      <title>From Docsify to Docusaurus</title>
      <dc:creator>Vanna </dc:creator>
      <pubDate>Fri, 17 Feb 2023 17:08:31 +0000</pubDate>
      <link>https://dev.to/vanigami/from-docsify-to-docusaurus-21o5</link>
      <guid>https://dev.to/vanigami/from-docsify-to-docusaurus-21o5</guid>
      <description>&lt;p&gt;For the past two weeks I’ve been working on transferring GraphGrid’s documentation site from Docsify to Docusaurus. Both of these open source documentation site generation tools are great but for our needs, switching to Docusaurus is a total upgrade.&lt;/p&gt;

&lt;p&gt;With that &lt;em&gt;total upgrade&lt;/em&gt; came a lot of excitement and ambitions to make our docs look and feel incredible.✨&lt;/p&gt;

&lt;h2&gt;
  
  
  Docsify, get your site up fast.. with some limitations
&lt;/h2&gt;

&lt;p&gt;I did the initial work of creating our docs site with Docsify. At the time, our goal was to get our first docs site up quickly. Docsify is perfect for that. No build, no nonsense, just good ol’ markdown and HTML. Docsify has a lot of nice community-made plugins. However, because Docsify uses Vue, scalability and styling can be limited. &lt;/p&gt;

&lt;p&gt;However, theres was one glaring detriment, &lt;strong&gt;Docsify is not SEO friendly&lt;/strong&gt;. This is the main reason for switching to Docusaurus.&lt;/p&gt;

&lt;h3&gt;
  
  
  Docsify limited-to-none SEO support
&lt;/h3&gt;

&lt;p&gt;Docsify does not generate static HTML files and uses hash routing (Google crawlers don’t really like that). As a single-page-application (SPA), that does not pre-render HTML, the search engine crawlers have to interpret javascript. This process slows the crawlers down because it uses a lot of its (the crawler’s) allocated budget.&lt;/p&gt;

&lt;p&gt;Below is a helpful infographic posted on a &lt;a href="https://github.com/docsifyjs/docsify/issues/656#issuecomment-433892203"&gt;GitHub forum about Docsify SEO&lt;/a&gt; by user SidVal. The infographic is from a writeup of an &lt;a href="https://www.onely.com/blog/javascript-seo-experiment/"&gt;experiment by Bartosz Góralewicz&lt;/a&gt;, called "Can Google Properly Crawl and Index JavaScript Frameworks? A JS SEO Experiment."&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--AX0_a3iQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/telyxb9g4hc299x66s5c.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--AX0_a3iQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/telyxb9g4hc299x66s5c.png" alt="Image description" width="800" height="355"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Docsify is planning to add SEO support
&lt;/h3&gt;

&lt;p&gt;There are plans for server-side rendering in Docsify version 5. I did reach out to Docsify’s community and there are ways around this until then, but unfortunately none of them work with the way we deploy our site. It would just be too much code and some hack-ish strategies to make it work. After accepting this fact, we decided to switch to another beloved, green-mascot having documentation site generator, Docusaurus. &lt;/p&gt;

&lt;h2&gt;
  
  
  Docusaurus has SEO AND style 😎
&lt;/h2&gt;

&lt;p&gt;Docusaurus is more complex in that it has a build process, but worth it if you’re trying to create a customized, feature-rich site for your documentation.&lt;/p&gt;

&lt;p&gt;Docusaurus uses MDX and React.. if that scares you, it’s okay! It’s still just as simple to initialize. Docusarus has excellent guides on styling and configuration. Even if you’re not very familiar with React, you can still set up a good-looking site without getting too much in the weeds. In addition, there are tons of plugins for low-code styling and quality of life features (Hi custom sidebars and live code snippets!). &lt;/p&gt;

&lt;p&gt;Most importantly though, Docusaurus is SEO friendly! &amp;lt;3 &lt;/p&gt;

&lt;p&gt;HTML files are statically generated (unlike Docsify) for every URL so search engines can find and index your content. There is also a sitemap plugin called &lt;code&gt;@docusaurus/plugin-sitemap&lt;/code&gt; that ships with the &lt;code&gt;preset-classic&lt;/code&gt; version of Docusaurus by default. The &lt;code&gt;sitemap.xml&lt;/code&gt; is autogenerated and will help crawlers crawl more accurately. &lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;With all of this being said, both communities for Docsify and Docusaurus are quite active and helpful. If you’re planning on choosing a documentation site generator, take into account the tool’s SEO compliance and how easy it would be to configure. Also look into the available plugins. Will your docs site need charts, live code snippets, or other special features? There’s probably a plugin out there to use instead of having to build it out yourself! Be sure that your doc site generator supports your needs so that you can spend more time focused on content rather than building a documentation site. &lt;/p&gt;

</description>
      <category>webdev</category>
      <category>devrel</category>
      <category>react</category>
      <category>documentation</category>
    </item>
  </channel>
</rss>
