Skip to content

doc: adjust WikiExport documentation#370

Closed
A-dot-S-dot wants to merge 1 commit intolervag:masterfrom
A-dot-S-dot:docupdate
Closed

doc: adjust WikiExport documentation#370
A-dot-S-dot wants to merge 1 commit intolervag:masterfrom
A-dot-S-dot:docupdate

Conversation

@A-dot-S-dot
Copy link
Copy Markdown

@A-dot-S-dot A-dot-S-dot commented Jun 27, 2024

Hey,
it seems to be sufficient to set only url_extension to make -link_ext_replace work. It's my first pull request I ever made. So I appreciate every feedback.

It is sufficient to set only `url_extension` for `-link_ext_replace`.
Copy link
Copy Markdown
Owner

@lervag lervag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, it seems to be sufficient to set only url_extension to make -link_ext_replace work. It's my first pull request I ever made. So I appreciate every feedback.

To be honest, it's a little bit unclear why you find the original phrasing to be wrong. Could you perhaps expand a little on what makes you think your suggested change is correct?

Considering the PR, it is clear that the phrasing must be confusing, and so I would be surprised if we can come up with an improvement here.

@A-dot-S-dot
Copy link
Copy Markdown
Author

A-dot-S-dot commented Jun 28, 2024

Ok, then I had misunderstood the instructions. I thought you had to create a separate entry for html. Then it would be enough to use option url_extension for the extension. But I realize that I don't need this entry and that the links are adjusted on its own somehow. How was this requirement originally meant? Suppose you have the following code example? How I should adjust it regarding the doc?

let g:wiki_link_creation = {
      \ 'md': {
      \   'link_type': 'md',
      \   'url_extension': '.md',
      \   'url_transform': { x ->
      \     printf("0x%08x", str2nr(strftime('%s')))},
      \ },
      \}

let s:pandoc_args = '--standalone '
      \.. '--toc '
      \.. '--template easy_template.html '
      \.. '--mathjax '
      \.. '--citeproc '
      \.. '--metadata-file metadata.yaml'

let g:wiki_export = {
      \ 'args' : s:pandoc_args,
      \ 'from_format' : 'markdown',
      \ 'ext' : 'html',
      \ 'link_ext_replace': v:true,
      \ 'view' : v:true,
      \ 'output': 'build/',
      \}

With this settings I experience no issues. Is it possible that the requirement in the doc can simply be omitted?

@lervag
Copy link
Copy Markdown
Owner

lervag commented Jun 29, 2024

Suppose you have the following code example? How I should adjust it regarding the doc?

With this settings I experience no issues. Is it possible that the requirement in the doc can simply be omitted?

Good question. Perhaps you are right. I'll look into it!

lervag added a commit that referenced this pull request Jun 29, 2024
@lervag
Copy link
Copy Markdown
Owner

lervag commented Jun 29, 2024

I think you are right. I've updated the docs. I think the second requirement is not relevant, so I removed it.

@lervag lervag closed this Jun 29, 2024
@A-dot-S-dot A-dot-S-dot deleted the docupdate branch July 9, 2024 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants