Share Your Notes Online: Publish Dendron with Netlify and GitHub

Derek Ardolf
dendron
Published in
4 min readDec 10, 2021

--

GitHub, Dendron, and Netlify Logos

Dendron helps people and products organize with notes, docs, and knowledge of all the things. Let’s see how easy it is to publish and have a static site hosted on Netlify!

You’ll learn how to publish your Dendron notes using Netlify and GitHub, which looks like this demo website. This tutorial assumes that you have basic knowledge of GitHub and Visual Studio Code (VSCode).

This uses a brand new Dendron Workspace you can later configure to work with your own vaults. Do you already have a workspace you’d prefer using? Reference the Dendron docs for in-depth details on how the template, and other workspaces, can publish to Netlify: Publishing with Netlify.

Part 1: GitHub

When logged into GitHub, click here to generate a new Dendron Workspace pre-configured for Netlify publishing. If you’re wondering, we’re using this template on GitHub.

Clicking the generate button, from the template, generates a new repository in the location of your choice. This can be a private or public repo!

Nice! That’s all we need to do for this minimal Dendron setup. To understand what is going on behind the scenes, you can read the template README.

Note that this tutorial will work with both private and public repositories.

Part 2: Netlify

The rest of the steps are done in the Netlify portal.

Step 1: Import your repository

When logged into Netlify, you start on your Team Overview page.

  • Click New site from Git
  • Under Connect to Git provider, select GitHub
  • You’ll be asked configure Dendron for permissions. It’s best practice to go with Only select repositories, and selecting the repository you made from the template

Once permissions are configured, select the repository in Netlify. There is no need to change any of default values, since the GitHub template is providing them from netlify.toml. Scroll to the bottom, and click Deploy site.

Once authorized to access your repository on GitHub, you only need to hit the “Deploy” button in the import wizard. This is because all of the default settings, included in the GitHub Dendron template, are configured for Netlify to properly publish the notes

Your website should now be building!

For more information on Netlify app permissions, to GitHub, refer to Netlify Docs: Authentication with the Netlify GitHub App

Step 2: Configure your website name

By default, Netlify generates a random combination of strings. In the example so far, the website is named elastic-hugle-37bfd5.netlify.app. If you don't want to own your own domain name, you can at least change the elastic-hugle-37bfd5 section.

  • Site settings
  • Under Site information, click Change site name
  • Enter new name, and if it is available, click Save
“Site Settings” on Netlify, for your new website, allow you to change the website name from a randomly generated name to a chosen name

For more information on custom domains, beyond the above, refer to Netlify Docs: Custom domains

Step 3: View deploy status

Under the Deploys tab, in Netlify, you can view the status of your website. This is where build information will be posted whenever new commits are posted to the main branch of your repository on GitHub.

This is a great way to check whether build have failed, or are still in progress. If you run into any errors, and aren’t sure what to do next, jump into the Dendron Discord where we have a #questions channel.

Summary

You’re done! From now on, all new commits you make to your repository on GitHub will trigger a new publishing update to your website.

In this tutorial, you learned how to:

  • Create a pre-configured, minimal Dendron Workspace from a template
  • Import a repository into Netlify
  • Create a custom name for your Netlify website
  • View deploy status in Netlify

Next steps

Now what? Publishing is set, but Dendron isn’t just for what you want to share with the world. It’s an open source, local-first knowledge management solution that scales as you do.

Enjoy the blog? Subscribe to our newsletter!

Newsletters not your thing? You can also follow us elsewhere on the interwebs:

--

--

Derek Ardolf
dendron
Editor for

Person on the Internet that wants to connect to your Second Brain || Automate and document all the things! Docs-as-Code / DevOps / AWS / Python