add ldif file output to import into ldap server

Signed-off-by: Toshaan Bharvani <toshaan@vantosh.com>
remotes/1694538624386119186/master
Toshaan Bharvani 3 years ago
parent bca295b102
commit d44e493219

@ -12,6 +12,7 @@ pygmentsUseClasses = true
enableGitInfo = true enableGitInfo = true
enableRobotsTXT = true enableRobotsTXT = true
disableHugoGeneratorInject = false disableHugoGeneratorInject = false
enableInlineShortcodes = true
enableEmoji = true enableEmoji = true


[build] [build]
@ -20,20 +21,36 @@ enableEmoji = true
writeStats = true writeStats = true


[outputs] [outputs]
home = [ "HTML" , "JSON" , "RSS" ] home = [ "HTML" , "RSS" ]
section = [ "HTML", "JSON", "RSS" ] section = [ "HTML", "RSS" ]
page = [ "HTML" , "JSON" ] page = [ "HTML" , "RSS" , "JSON" , "LDIF" ]
taxanomy = [ "HTML" , "JSON" , "RSS" ]
# term = [ "HTML" , "JSON" ]


[outputFormats] [outputFormats]
[outputFormats.RSS] [outputFormats.RSS]
mediatype = "application/rss" mediatype = "application/rss"
baseName = "feed" baseName = "feed"
suffix = "xml" suffix = "xml"
isPlainText = false
notAlternative = false
[outputFormats.JSON] [outputFormats.JSON]
mediaType = "application/json" mediaType = "application/json"
baseName = "index" baseName = "index"
isPlainText = true suffix = "json"
isPlainText = false
notAlternative = true notAlternative = true
[outputFormats.LDIF]
name = "ldif"
mediaType = "text/ldif"
baseName = "index"
suffix = "ldif"
isPlainText = false
notAlternative = true

[mediaTypes]
[mediaTypes."text/ldif"]
suffixes = [ "ldif" ]


[markup] [markup]
[markup.goldmark] [markup.goldmark]

@ -0,0 +1,11 @@
{{ range .Data.Pages }}
dn: cn={{ .File.BaseFileName }},ou=members,dc=openpower,dc=foundation
objectClass: groupOfNames
cn: {{ .File.BaseFileName }}
description: {{ .Title }}
{{ if .Param "owner" }}
owner: uid={{ .Param "owner" }},ou=people,dc=openpower,dc=foundation
{{- end -}}
member: uid=everyone,ou=people,dc=openpower,dc=foundation

{{ end }}

@ -0,0 +1,9 @@
dn: cn={{ .File.BaseFileName }},ou=members,dc=openpower,dc=foundation
objectClass: groupOfNames
cn: {{ .File.BaseFileName }}
description: {{ .Title }}
level: {{ .Param "level" }}
{{ if .Param "owner" }}
owner: uid={{ .Param "owner" }},ou=people,dc=openpower,dc=foundation
{{- end -}}
member: uid=everyone,ou=people,dc=openpower,dc=foundation
Loading…
Cancel
Save