DEV Community

victorchukwuemeka
victorchukwuemeka

Posted on

Build and publish a docs site with Thally

For a practical assessment I built a small documentation site with Thally. It documents Pinocchio, a zero-dependency Rust library for writing Solana programs. This article shows how to build a similar site, including the problems I hit and how I got past them.

i picked Pinocchio because is very light and with zero dependencies and i have made a lot of open-source contribution to it.

The finished site is here: https://pinocchio-docs.thally.app
Its source repository: https://github.com/victorchukwuemeka/pinocchio-docs

Prerequisites

  • A GitHub account
  • A Thally Cloud account at app.thally.io
  • A project or tool you know well enough to document accurately
  • Git and a text editor, to edit the content locally

1. Create the site

In the Thally dashboard, choose Create a site. Enter a name, a description, and the thally.app address you want. Thally checks that the address is free.

2. Connect GitHub

Choose Create a new docs repository. Thally creates a GitHub repository from its starter template, so you do not need to make one yourself.

It then asks you to install the Thally GitHub App. This is not a download. It opens GitHub and grants Thally access to your account. For a fresh site the screen says to choose All repositories. That gives the app access to every repository on the account, so decide whether you are comfortable with it. A separate GitHub account is an option.

3. Skip product sources and publish

The next step lists your repositories and asks which ones change your product, so Thally can track them. It is optional. If your docs are not about code in your own repositories, skip it.

Then review the details and choose Publish site.

4. Understand the starter

Clone the repository Thally created. Three places matter:

  • src/content/ holds one .mdx file per page. The file name is the page slug.
  • docs.json controls the tabs, groups, and page order in the sidebar. A page must be listed here to appear.
  • src/data/site.ts holds the site name, description, and links.

5. Write your content

Replace the placeholder pages. I wrote three:

  1. An introduction that explains what the project does, who it is for, and when not to use it.
  2. A quickstart that follows the starter's shape: before you begin, install, configure, complete one task, verify, next step.
  3. A troubleshooting guide, built from the errors I actually hit.

Each file starts with frontmatter (title and description). Keep the fields the starter uses. To group pages, put them in a subfolder, for example src/content/guides/troubleshooting.mdx, and list them in docs.json as guides/troubleshooting.

Run every step of your own quickstart before you publish it. Building mine step by step exposed several problems, such as a CLI installed the wrong way and a Rust version that was too old.

while writing this with thally i realise that this could be the easiest way to write docs cause it focuses on doing the heavy lifting for you .

6. Publish

Commit and push to the production branch:

git add src/content docs.json
git commit -m "Add intro, quickstart and troubleshooting guide"
git push
Enter fullscreen mode Exit fullscreen mode

Thally builds and deploys from the push. Check the Deployments page, then reload your site.

Problems I hit

Setup failed with "The configured GitHub template is not a compatible Thally site." Thally had already created the repository, and its files looked complete. Retrying twice gave the same message. Later, a page refresh showed the site had finished. I do not know the cause, but the status had not updated on its own, and the message pointed at the template and GitHub access, which was misleading. If you see it, refresh the page before anything else.

"We couldn't find an installation you can access." This is the normal first-time state before you install the GitHub App, but it reads like an error.

"Install app" sounds like a download. It is a permission grant on GitHub.

Placeholder content. The starter ships with sample pages and extra tabs. Replace the content first, and remove the unused tabs one change at a time, checking each deployment.

What I did not do

  • I did not run Thally's local check and build commands. I used the deployment as my check.

Wrap-up

going forward everything relating to building a dev tool i will do that with thally more mostly my sg32 solana light client .

Top comments (0)