Skip to content

auuunya/inkgraph

Repository files navigation

Inkgraph

中文说明

Inkgraph is a Hugo theme for publishing a blog with a wiki-shaped knowledge base behind it.

Inkgraph preview

It keeps the public surface narrow:

  • Home for orientation
  • Posts for primary reading
  • Graph for public topic exploration

Features

  • Editorial sidebar layout with persistent footer links
  • Minimal home page focused on title, tagline, and intro copy
  • Post archive optimized for chronological writing
  • Public graph page and optional graph shortcode powered by G6
  • Canonical, Open Graph, and Twitter Card meta tags
  • Theme defaults for params and menu, with site-level overrides on top
  • Opt-in noindex handling for non-public sections
  • Standalone exampleSite for local verification and release checks
  • Installable as either a theme directory or a Hugo Module

Install

As a theme directory

theme = ["inkgraph"]

Place the theme in:

themes/inkgraph/

As a Hugo Module

[module]
  [[module.imports]]
    path = "github.com/auuunya/inkgraph"

Configuration

Inkgraph keeps its theme defaults in hugo.toml. The theme only sets mergeable defaults such as params and menu; site identity settings such as baseURL, title, copyright, languageCode, and markup should live in your site config.

Typical site-level configuration:

theme = ["inkgraph"]
title = "Field Notes"
copyright = "© Your Name"

[params]
description = "Essays, notes, and a public graph."

[params.brand]
title = "Field Notes"
sidebar_title = "Field Notes"
home_title = "Ideas Worth Returning To"
subtitle = "Blog shell, wiki brain"

[params.ui]
home_tagline = "Publish essays on the surface. Keep structure underneath."

[params.graph]
g6_cdn_url = "https://unpkg.com/@antv/g6@5/dist/g6.min.js"

[params.seo]
noindex_private_pages = true
public_sections = ["posts", "graph"]
default_image = "/images/share-card.png"

[params.footer]
copyright = "© Your Name"
repo_label = "github.com/your-name/your-site"
repo_url = "https://github.com/your-name/your-site"

[[params.footer.links]]
label = "Built with Hugo"
url = "https://gohugo.io/"

If you need to override the public/private rule for a single page, add one of these front matter flags:

public = true
public = false

Archive labels, pagination text, and graph UI copy can all be overridden through params.ui.

Content Model

Inkgraph expects these public entry points:

content/_index.md
content/posts/_index.md
content/graph/index.md

The graph page and graph shortcode read:

data/knowledge_graph/public.json

Legacy exports at data/knowledge-graph.public.json are still supported.

Public graph nodes are intentionally narrow:

  • topic
  • post

Legacy graph groups such as concept are normalized to topic on render so older exported graph data can keep working.

Shortcodes

  • {{< graph >}} renders the public graph payload inside page content
  • {{< disclosure summary="More" >}} ... {{< /disclosure >}} renders a collapsible disclosure block

Example Site

From the theme repository root:

hugo server --source exampleSite --themesDir ../..

To run a production build for the demo:

hugo --source exampleSite --themesDir ../..

Repository Layout

  • theme.toml contains Hugo theme metadata
  • hugo.toml contains theme defaults
  • go.mod enables Hugo Module usage
  • exampleSite/ contains a runnable demo site
  • images/ contains preview assets for release pages and theme catalogs

Brand Titles

  • params.brand.sidebar_title controls the left-rail title
  • params.brand.home_title controls the home page hero title
  • params.brand.title remains the shared fallback for both

License

The theme code is MIT-licensed.

Bundled fonts retain their own OFL licenses:

  • static/fonts/OFL-inter.txt
  • static/fonts/OFL-newsreader.txt
  • static/fonts/OFL-space-grotesk.txt

About

Inkgraph is a Hugo theme for publishing a blog with a wiki-shaped knowledge base behind it.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors