add ldif file output to import into ldap server

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

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

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

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

[outputFormats]
[outputFormats.RSS]
mediatype = "application/rss"
baseName = "feed"
suffix = "xml"
isPlainText = false
notAlternative = false
[outputFormats.JSON]
mediaType = "application/json"
baseName = "index"
isPlainText = true
suffix = "json"
isPlainText = false
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.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