Repository: facebook/docusaurus
File: packages/docusaurus-plugin-content-blog/src/index.ts (TypeScript)

Code before:
      }

      // This prop is useful to provide the blog list sidebar
      const sidebarProp = await createData(
        // Note that this created data path must be in sync with
        // metadataPath provided to mdx-loader.
        `blog-post-list-prop-${pluginId}.json`,
        JSON.stringify(
          {
            title: blogSidebarTitle,
            items: sidebarBlogPosts.map((blogPost) => ({
              title: blogPost.metadata.title,
              permalink: blogPost.metadata.permalink,
              unlisted: blogPost.metadata.unlisted,
            })),
          },
          null,
          2,
        ),
      );

      const blogMetadataPath = await createData(
        `blogMetadata-${pluginId}.json`,
        JSON.stringify(
          {
            baseBlogPermalink: normalizeUrl([baseUrl, routeBasePath]),
            blogTitle,
          },
          null,
          2,
        ),
      );

      // Create routes for blog entries.
      await Promise.all(
        blogPosts.map(async (blogPost) => {
          const {id, metadata} = blogPost;
          await createData(
            // Note that this created data path must be in sync with
            // metadataPath provided to mdx-loader.
            `${docuHash(metadata.source)}.json`,
            JSON.stringify(metadata, null, 2),
          );

          addRoute({
            path: metadata.permalink,
            component: blogPostComponent,
            exact: true,
            modules: {
              sidebar: aliasedSource(sidebarProp),
              content: metadata.source,

Review comment (suggestion):
wondering if this attribute name is very good

What do you think of `blogBaseUrl` instead? Or `blogBasePath`? Or `blogUrl`


Code after:
        });
      }

      // This prop is useful to provide the blog list sidebar
      const sidebarProp = await createData(
        // Note that this created data path must be in sync with
        // metadataPath provided to mdx-loader.
        `blog-post-list-prop-${pluginId}.json`,
        JSON.stringify(
          {
            title: blogSidebarTitle,
            items: sidebarBlogPosts.map((blogPost) => ({
              title: blogPost.metadata.title,
              permalink: blogPost.metadata.permalink,
              unlisted: blogPost.metadata.unlisted,
            })),
          },
          null,
          2,
        ),
      );

      const blogMetadata: BlogMetadata = {
        blogBasePath: normalizeUrl([baseUrl, routeBasePath]),
        blogTitle,
      };
      const blogMetadataPath = await createData(
        `blogMetadata-${pluginId}.json`,
        JSON.stringify(blogMetadata, null, 2),
      );

      // Create routes for blog entries.
      await Promise.all(
        blogPosts.map(async (blogPost) => {
          const {id, metadata} = blogPost;
          await createData(
            // Note that this created data path must be in sync with
            // metadataPath provided to mdx-loader.
            `${docuHash(metadata.source)}.json`,
            JSON.stringify(metadata, null, 2),
          );

          addRoute({
            path: metadata.permalink,
            component: blogPostComponent,
            exact: true,
            modules: {
              sidebar: aliasedSource(sidebarProp),
              content: metadata.source,
            },
            context: {