diff --git a/cmd/graph.go b/cmd/graph.go index 9c647c7..68e4596 100644 --- a/cmd/graph.go +++ b/cmd/graph.go @@ -15,6 +15,7 @@ import ( type page struct { ID string `json:"id"` Title string `json:"title"` + Author string `json:"author"` Views int `json:"views"` Linked int `json:"linked"` } @@ -112,7 +113,7 @@ func buildGraph(cmd *cobra.Command) { for _, p := range pages { gid := graph.AddNode(p.Title) pNodes[p.ID] = gid - pGraph.Pages = append(pGraph.Pages, page{p.ID, p.Title, p.Views, p.Linked}) + pGraph.Pages = append(pGraph.Pages, page{p.ID, p.Title, p.Author.ID, p.Views, p.Linked}) } uNodes := map[string]int{} if includeUser {