Public knowledge base

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!

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:

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:

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:

2 Likes

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

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:

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

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!

2 Likes

Hi @Adria,

Welcome to the Coda Community!

Looks like a novels worth of replies so far, :laughing:

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…

Stay tuned for updates!

2 Likes

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 :slight_smile:

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

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

1 Like

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 :slight_smile:

1 Like

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!

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.

/**
 * 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.

1 Like

Wow this is amazing!!! Thank you

1 Like