Publish your Foam workspace as an Azure DevOps wiki.
Azure DevOps is Microsoft’s collaboration software for software development teams, formerly known as Team Foundation Server (TFS) and Visual Studio Team Services. It is available as an on-premise or SaaS version. The following recipe was tested with the SaaS version, but should work the same way for the on-premise.
The following recipe is written with the assumption that you already have an Azure DevOps project.
.order
in the Foam workspace root folder, with first line being the document filename without .md
extension. For a project created from the Foam template, the file would look like this:readme
master
or main
), folder (for workspace created from foam-template it is /
), and wiki name, and press Publish.A published workspace looks like this:
There is default table of contents pane to the left of the wiki content. Here, you’ll find a list of all directories that are present in your Foam workspace, and all wiki pages. Page names are derived from files names, and they are listed in alphabetical order. You may reorder pages by adding filenames without .md
extension to .order
file.
Note that first entry in .order
file defines wiki’s home page.
While you are pushing changes to GitHub, you won’t see the wiki updated if you don’t add Azure as a remote. You can push to multiple repositories simultaneously.
git remote show origin
. If you don’t see Azure add it in the output then follow these steps.git remote rename origin main
git remote add azure https://<YOUR_ID>@dev.azure.com/<YOUR_ID>/foam-notes/_git/foam-notes
. You can get it from: Repos->Files->Clone and copy the URL.git config -e
and edit it.remote origin
section to the bottom of the file with the URLs from each remote repository you’d like to push to. You’ll see something like that: [core]
...
(ignore this part)
...
[branch "master"]
remote = github
merge = refs/heads/master
[remote "github"]
url = git@github.com:username/repo.git
fetch = +refs/heads/*:refs/remotes/github/*
[remote "azure"]
url = https://<YOUR_ID>@dev.azure.com/<YOUR_ID>/foam-notes/_git/foam-notes
fetch = +refs/heads/*:refs/remotes/azure/*
[remote "origin"]
url = git@github.com:username/repo.git
url = https://<YOUR_ID>@dev.azure.com/<YOUR_ID>/foam-notes/_git/foam-notes
git push origin master
or a single one using: git push github master
or git push azure master
For more information, read the Azure DevOps documentation.