# Public knowledge base

**URL:** <https://connect.superhuman.com/t/public-knowledge-base/13782>\
**Category:** Ask the Community\
**Created:** [February 11, 2020, 6:08pm UTC](https://connect.superhuman.com/t/public-knowledge-base/13782 "2020-02-11T18:08:41Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Adria](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/adria/32/8450_2.png) [@Adria](https://connect.superhuman.com/u/Adria)\
**Post date:** [February 11, 2020, 6:08pm UTC](https://connect.superhuman.com/t/public-knowledge-base/13782/1 "2020-02-11T18:08:41Z")

</div>

Has anyone successfully used Coda to create a public knowledge base for his product/website?

I don’t know where to start or where to find some examples.

Thanks!

---

<div class="post-metadata">

**Author:** ![Connor\_McCormick](https://avatars.discourse-cdn.com/v4/letter/c/e79b87/32.png) [@Connor\_McCormick](https://connect.superhuman.com/u/Connor_McCormick)\
**Post date:** [February 11, 2020, 8:04pm UTC](https://connect.superhuman.com/t/public-knowledge-base/13782/2 "2020-02-11T20:04:20Z")

</div>

TLDR; right now, since infinite nesting and dynamic document generation is not well supported it’s not quite possible to build public knowledge bases, though Coda will one day be excellent for that!

There are some ways to get around that depending on the amount of work you’re willing to do.

This directly addresses your question and there are some great solutions here:

> [@Can Coda replace a Wiki?](https://connect.superhuman.com/t/can-coda-replace-a-wiki/9806/40):
>
> Hey @Ed_Liveikis, been appreciating your posts and another good one. I just referenced this post in another carrying on the Roam Research dialogue that’s been active around here lately. I would also be very interested in hearing more about the Coda Product’s team plans in this regard. Like @GJ_Roelofs, I’ve also experimented with using Row’s themselves as actual documents, due to the attributes they have that Sections don’t. And the absolutely terrific writing capabilities you get - in part…

This is a repository for any tricks that people have collected, I wrote quite a bit about the things that are possible and the shortcomings therein:

> [@How best to generate text (a document) from a table?](https://connect.superhuman.com/t/how-best-to-generate-text-a-document-from-a-table/13432):
>
> Hello everyone, My current goal is to use Coda to automate the creation of Scope of Work documents. For each of my prospective customers I want to: Input information about them into tables Select a particular customer to populate a Section that contains their scope of work which should contain: a. One off items like their name, the date, and my contact information b. FormulaMap generated items. For example, a customer may have multiple security locations, and each location may require mult…

Finally, here is a Feature Request for what it seems would be necessary to get a wiki working, if there is anything you see missing there please add it to the thread:

> [@Content Formatting / Text nesting / Dynamic text generation / Infinite Section Nesting](https://connect.superhuman.com/t/content-formatting-text-nesting-dynamic-text-generation-infinite-section-nesting/13612):
>
> As a result of this topic: And many others, it has become clear that a key feature that we need is a way to take data from in our tables, display them in sections, then output them to documents. To some, it may seem like this is already functionality that Coda has, for example, we can already do this: However, there are a number of difficulties that come with trying to pull this off. Most of the difficulties that are encountered when building dynamic documents are recorded here: The pr…

---

<div class="post-metadata">

**Author:** ![ABp](https://avatars.discourse-cdn.com/v4/letter/a/c67d28/32.png) [@ABp](https://connect.superhuman.com/u/ABp)\
**Post date:** [February 11, 2020, 9:42pm UTC](https://connect.superhuman.com/t/public-knowledge-base/13782/3 "2020-02-11T21:42:35Z")

</div>

@Connor_McCormick good synopsis, there is a lot around the community and you’ve gathered some of the good ones.

I think there is huge potential in using the Coda Rows to create docs: This is one of the great statements on that, much more elegantly put than anything I have written, haha!

> [@Can Coda replace a Wiki?](https://connect.superhuman.com/t/can-coda-replace-a-wiki/9806/1):
>
> I absolutely _love_ the fact that I can easily references topics and that hovering over links gives me previews to their contents. It works wonders in a table-centric approach to pages. The added benefit being that I can programmatically use this information to provide an easily accessible way to expose designers to concepts & design that is then used to generate code.

But then @GJ_Roelofs equally elegantly sums up why this needs work in Coda, and to this day I don’t think much of that has been addressed:

> [@Can Coda replace a Wiki?](https://connect.superhuman.com/t/can-coda-replace-a-wiki/9806/1):
>
> The **Rows-As-Pages** approach gives me most of the functionality I need. However, I don’t have good control over the visual structure of a page. [Building Block Layouts](https://blog.coda.io/new-building-block-layouts-6337b28a4ca7) get me there partially, but, per example, the text column in a table doesn’t allow me to add in images directly. I also lose the ability to comment on parts of the “page” as I can only comment on the page as a whole.

I think the best hope is for Rows to evolve as bonafide structures for till-now untapped ability to create  
“Next-Gen” wikis, akin to what Roam Research is doing, which many of us are talking about in here.  
The fundamentals have been laid by Coda and I really hope the Product Folks appreciate their opportunity. Coda is in fact much better positioned, due to its inherently superior structure, than Notion to meet this need. To make that point more simply - if I were to say right now if I think Notion or Coda is closer to Roam, hands down my answer is Coda.

Two features right now that aid to this end that are absent in Notion:

- Forward-thinking Rich Text fields with massive speed of use thanks to great keyboard shortcuts. You can 1) keep them fully visible in a table because rows will expand to their size to accommodate all the text within, giving you a very unique outline view of the entire context of text in these fields, and 2) ability to pop out and write in these fields freely. These boxes are essentially a min Word doc of their own, but with all the bonus of being in a row and having all the metadata benefit and structure.

- Coda Grouping. While I poorly understand how this works, one of my most used features when building my Coda doc is grouping in Subtables. You can produce a dynamite view, and again @GJ_Roelofs you had an inspiring example I have lost track of where you were doing some design/feature stuff I believe for some of your video game elements? No chance to do that in Notion, or anything else I’ve seen. And another part of grouping I’m eager to tap into is grouping above the table, for example to create a bonafide [User Story Map](https://connect.superhuman.com/t/user-story-mapping/8401)

I think the role of Sections and Folders would be best to evolve as containers and another type of view within Coda. I think in fact this is also superior to Notion, which has a mangled - IMHO - approach in spite of its popularity. A “page” is also what we’d see as a Section in Coda, but then it’s also an entity and behaves like a row…all while being able to house an embedded table? That is a very confusing set up I have seen many users scratch their head about. And it is very hard in Notion to figure out if your page is a page, or a db, because a page that is only a db behaves differently, while looking to the naked eye the same! Sections and Folders in Coda have a distinct role, and there’s a lot of potential here.

That was long winded and I apologize for that! I get excited when I think about some of these features coming around…and I am always hopeful the Codan Product Team finds details useful. I know they seem to ask for them everywhere!

Cheers!

---

<div class="post-metadata">

**Author:** ![Ben\_Lee](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/ben_lee/32/49867_2.png) [@Ben\_Lee](https://connect.superhuman.com/u/Ben_Lee)\
**Post date:** [February 11, 2020, 11:42pm UTC](https://connect.superhuman.com/t/public-knowledge-base/13782/4 "2020-02-11T23:42:04Z")

</div>

Hi @Adria,

Welcome to the Coda Community!

Looks like a novels worth of replies so far, 😆

We’ve sent out some teaser emails with links to some docs that are shared publicly. This might be more of the style you’re looking for. Here’s are a few links for you to check out…

> **[Claire's Offsite Toolkit](https://coda.io/@clairehughesjohnson/claires-offsite-toolkit)**
>
> The Stripe COO's handbook for running offsites that work.

> **[Square’s 1-on-1 Toolkit: The secret to managing your team’s careers](https://coda.io/@jenniferemick/squares-1-on-1-toolkit)**
>
> I'm Jenny, a Design Lead for Square's ECOM team. I developed this 1-on-1 doc to help my designers prioritize their career development and design beyond their day-to-day.

> **[Des Traynor's 4-Step Prioritised Productivity Guide](https://coda.io/@destraynor/des-traynors-4-step-prioritised-productivity-guide)**
>
> The Intercom co-founder's guide to stop letting everyone else control \_your\_ time.

> **[Adam Nash's 3-Bucket Product Planning Guide](https://coda.io/@adamnash/adam-nashs-3-bucket-product-planning-guide)**
>
> The guide to focusing your product roadmap on what matters most, from the former VP of Product & Growth at Dropbox.

Stay tuned for updates!

---

<div class="post-metadata">

**Author:** ![Adria](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/adria/32/8450_2.png) [@Adria](https://connect.superhuman.com/u/Adria)\
**Post date:** [February 12, 2020, 1:14pm UTC](https://connect.superhuman.com/t/public-knowledge-base/13782/5 "2020-02-12T13:14:30Z")

</div>

Thanks a lo for all the answers. Looks like is not ready yet but maybe soon it will be. So I’ll check in a couple of months to see if there has been any progress on all this 🙂

---

<div class="post-metadata">

**Author:** ![Ben\_Lee](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/ben_lee/32/49867_2.png) [@Ben\_Lee](https://connect.superhuman.com/u/Ben_Lee)\
**Post date:** [February 12, 2020, 1:33pm UTC](https://connect.superhuman.com/t/public-knowledge-base/13782/6 "2020-02-12T13:33:34Z")

</div>

We’re hoping for a lot sooner than a couple of months!

---

<div class="post-metadata">

**Author:** ![Connor\_McCormick](https://avatars.discourse-cdn.com/v4/letter/c/e79b87/32.png) [@Connor\_McCormick](https://connect.superhuman.com/u/Connor_McCormick)\
**Post date:** [February 12, 2020, 6:41pm UTC](https://connect.superhuman.com/t/public-knowledge-base/13782/7 "2020-02-12T18:41:28Z")

</div>

That’s great news, Ben! Thank you! Also happy birthday! 🎂

---

<div class="post-metadata">

**Author:** ![Adria](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/adria/32/8450_2.png) [@Adria](https://connect.superhuman.com/u/Adria)\
**Post date:** [February 12, 2020, 6:52pm UTC](https://connect.superhuman.com/t/public-knowledge-base/13782/8 "2020-02-12T18:52:53Z")

</div>

Here I am again. After several hours I came up with a solution. I’m sharing in case someone wants to do it as well.

I’ve created several tables in a document and using the Coda API, I’ve create a page in my website which pulls the data from the tables and displays it in the website properly formatted according to my needs. This way I can easily update the content using Coda and the content is reflected directly on the page allowing our team to make quick updates on Coda without having to deploy or anything.

Will see how good or bad this solution works until the official release is done 🙂

---

<div class="post-metadata">

**Author:** ![Connor\_McCormick](https://avatars.discourse-cdn.com/v4/letter/c/e79b87/32.png) [@Connor\_McCormick](https://connect.superhuman.com/u/Connor_McCormick)\
**Post date:** [February 12, 2020, 6:56pm UTC](https://connect.superhuman.com/t/public-knowledge-base/13782/9 "2020-02-12T18:56:38Z")

</div>

Adria that is a really cool solution. Would you be willing to share some of the code you used to accomplish that? Would be useful for me and I’m sure it would be beneficial for others as well.

Nice work!

---

<div class="post-metadata">

**Author:** ![Adria](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/adria/32/8450_2.png) [@Adria](https://connect.superhuman.com/u/Adria)\
**Post date:** [February 12, 2020, 7:10pm UTC](https://connect.superhuman.com/t/public-knowledge-base/13782/10 "2020-02-12T19:10:24Z")

</div>

Here is the code that does it. It’s written in nodejs using the coda-js library.

The code loads a document named FAQ and uses one of the sections to extract all tables and its rows. I’ve added some comments to make it easier to understand, modify and use.

````javascript
/**
 * This code loads a document named FAQ and uses one of the sections to extract all tables and its rows.
 */
const Coda = require('coda-js');
const marked = require('marked'); // This is a library to transform markdown to html
const coda = new Coda('CODA_API_TOKEN');

coda.listDocs({ query: 'FAQ' }) // Search documents matching name "FAQ"
  .then(docs => {
    // From all returned documents, which maybe is just one, take the one that we want. So we specify the ID
    const document = docs.find(document => document.id === 'XXXXXX'); // FAQ document ID
    return document.listTables(); // We list all tables in the document
  })
  .then(tables => {
    // Now we get back all the tables in the document, but we only want the ones in one of the sections (this is optional as I didn't want the ones for the other sections)
    const promises = tables
      .filter(table => table.parent.id === 'canvas-XXXXX') // So we filter the section that we need
      .map(table => new Promise(resolve => {
        // Here for all the tables, we list all rows and we save them in the table object as .rows
        table.listRows({
          useColumnNames: true,
          sortBy: 'natural',
          valueFormat: 'rich',
        }).then(rows => {
          table.rows = rows;
          resolve(table);
        });
      }));
    return Promise.all(promises);
  })
  .then(tables => {
    // This last step is optional, I'm doing some code manipulations
    // We have now an array of tables and each table has a .rows property with all the rows
    tables.forEach(table => {
      table.rows.forEach(row => {
        // Here I manipulate some of the values. Basically I have 2 columns in the table. Question and Answer
        // Somehow Coda adds some weird characters at the beginning and end, so I'm cleaning them here
        row.values.Question = row.values.Question.replace(/^```|```$/g, '');
        row.values.Answer = marked(row.values.Answer.replace(/^```|```$/g, ''));
        // Finally I store the row ID in the values, just to make it easier for me later to use
        row.values.id = row.id;
      });
    });
    return tables;
  })
  .catch(error => console.error(error));

````

Finally you have to get the returned tables and rows from the last step and print them however you want on your website.

---

<div class="post-metadata">

**Author:** ![Connor\_McCormick](https://avatars.discourse-cdn.com/v4/letter/c/e79b87/32.png) [@Connor\_McCormick](https://connect.superhuman.com/u/Connor_McCormick)\
**Post date:** [May 9, 2020, 2:13am UTC](https://connect.superhuman.com/t/public-knowledge-base/13782/11 "2020-05-09T02:13:19Z")

</div>

Wow this is amazing!!! Thank you
