~melchizedek6809/nujel.net

f6be3a3d17bc60f22e3a6b9816b71d099d434b9b — Ben (X13/Arch) 2 years ago fc218b2
Added support for tags
M content/reference/core/generator.nuj => content/reference/core/generator.nuj +3 -1
@@ 94,8 94,10 @@
[defn generate-content-for [f]
      [def filename [fmt "{}.html" [closure/name f]]]
      [when [= filename ".html"] [return #nil]]
      [def tags #nil]
      [when [meta f :internal] [cons! :internal tags]]
      [queue-content filename
                     @[:type :page :title [closure/name f] :category [closure/cat f]]
                     @[:type :page :title [closure/name f] :category [closure/cat f] :tags tags]
                     [fn [] [generate-reference-for f]]]]

[-> [symbol-table]

M ssg/content.nuj => ssg/content.nuj +2 -1
@@ 50,7 50,8 @@


[defn build-frontmatter-index [ctx]
      "Load all the frontmatters and look generate datastructures necessary for building navigations"
      "Load all the frontmatters and look generate datastructures necessary for"
      "building navigations"
      :export
      [def content-frontmatter @[]]
      [build-content ctx

M ssg/theme.nuj => ssg/theme.nuj +5 -1
@@ 137,8 137,12 @@
[defn render-link* [ctx path target]
      [if [string? target]
          [render-link* ctx path [tree/ref [tree/ref ctx :frontmatter] [string->keyword target]]]
          [fmt "<a href=\"{}\">{}</a>"
          [fmt "<a href=\"{}\" class=\"{}\">{}</a>"
               [get-href* ctx path target]
               [do [def classes #nil]
                   [def tags [and [tree? target] [tree/ref target :tags]]]
                   [doseq [tag tags] [cons! [cat "tag-" [keyword->string tag]] classes]]
                   [join classes " "]]
               [if [tree? target]
                   [or [tree/ref target :nav-title]
                       [tree/ref target :title]]

M ssg/theme/default/resources/main.css => ssg/theme/default/resources/main.css +4 -0
@@ 479,4 479,8 @@ h4 {
		display: block;
		column-count: 3;
	}
}

a.tag-internal {
	color: #8f949e;
}
\ No newline at end of file