diff --git a/README.md b/README.md index 79d7943..7914269 100644 --- a/README.md +++ b/README.md @@ -19,12 +19,39 @@ hugo-obsidian -input=content -output=data ### Example Usage (GitHub Action) +Add 'Build Link Index' as a build step in your workflow file (e.g. `.github/workflows/deploy.yaml`) +```yaml +... +jobs: + deploy: + runs-on: ubuntu-18.04 + steps: + - uses: actions/checkout@v2 + - name: Build Link Index + uses: jackyzha0/hugo-obsidian@v1.4 + with: + input: content # input folder + output: data # output folder + ... +``` ## Hugo Partial +To then embed this information in your Hugo site, you can copy and use the provided partials in `/partials`. Graph provides a graph view of all nodes and links and Backlinks provides a list of pages that link to this page. +To start, create a `graphConfig.yaml` file in `/data` in your Hugo folder. This will be our main point of configuration for the graph partial. + +Then, in one of your Hugo templates, do something like the following to render the graph. + +```html +