Skip to content

Commit

Permalink
Use option jekyllDataKeyValue in the technical documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Witiko committed Jan 7, 2025
1 parent 5d4856a commit 045918b
Showing 1 changed file with 38 additions and 27 deletions.
65 changes: 38 additions & 27 deletions markdown.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -846,36 +846,47 @@ abbr {
},
},
}
\yamlSetup{
jekyllDataRenderers = {
/authors/* = {%
\expandafter\gdef
\expandafter\ltd@title@author
\expandafter{\ltd@title@author, #1}%
\ExplSyntaxOn
\keys_define:nn
{ markdown / techdoc }
{
authors / unknown .code:n = {
\tl_gput_right:Nn
\ltd@title@author
{ ,~#1 }
},
title = {%
\gdef\ltd@title@title{#1}%
\gdef\ltd@title@subtitle{}%
\hypersetup{pdftitle={#1}}%
title .code:n = {
\tl_gset:Nn
\ltd@title@title
{ #1 }
\tl_gset:Nn
\ltd@title@subtitle
{ }
\hypersetup
{ pdftitle = { #1 } }
},
date = {\gdef\ltd@title@date{#1}},
email = {\gdef\ltd@title@email{#1}},
revision = {\gdef\ltd@title@revision{#1}},
url = {\gdef\ltd@title@url{#1}},
date .tl_gset:N = \ltd@title@date,
email .tl_gset:N = \ltd@title@email,
revision .tl_gset:N = \ltd@title@revision,
url .tl_gset:N = \ltd@title@url,
}
}
\ExplSyntaxOn
\markdownSetup{
rendererPrototypes = {
headerAttributeContextEnd = {
\seq_map_inline:Nn
\g_@@_header_identifiers_seq
{ \label { sec:##1 } }
\seq_gclear:N
\g_@@_header_identifiers_seq
\cs_generate_variant:Nn
\cs_gset:Npn
{ NpV }
\yamlSetup
{ jekyllDataKeyValue = markdown / techdoc }
\markdownSetup
{
rendererPrototypes = {
headerAttributeContextEnd = {
\seq_map_inline:Nn
\g_@@_header_identifiers_seq
{ \label { sec:##1 } }
\seq_gclear:N
\g_@@_header_identifiers_seq
},
},
},
}
}
\ExplSyntaxOff
\renewcommand\markdownLaTeXRendererDirectOrIndirectLink[4]{%
#1\footnote{See \url{#3}.}}
Expand Down Expand Up @@ -21982,7 +21993,7 @@ following content:
{ % Define a key--value that processes YAML metadata.
title / programmaticString .str_gset:N = \g_markdown_example_title_str, % Store the raw title in a variable.
title .code:n = { \title { #1 } }, % Set the title. This is the same as writing `title / typographicString`.
authors / unknown .code = { % Store a variable-length list of authors in an array variable.
authors / unknown .code:n = { % Store a variable-length list of authors in an array variable.
\seq_put_right:Nn
\g_markdown_example_authors_seq
{ #1 }
Expand Down

0 comments on commit 045918b

Please sign in to comment.