Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linking other files in path_html and HTML title #30

Closed
MahbubAlam231 opened this issue Sep 21, 2020 · 4 comments
Closed

Linking other files in path_html and HTML title #30

MahbubAlam231 opened this issue Sep 21, 2020 · 4 comments

Comments

@MahbubAlam231
Copy link

MahbubAlam231 commented Sep 21, 2020

1.

a) Say I have two markdown files, first.md, second.md, and first.md refers to the other inside it. Now I run :Vimwiki2HTML on the first one to create first.html neither does it automatically create second.html nor it shows any prompt to convert the second one simultaneously.
b) Now if I convert both of them using :Vimwiki2HTML, and open first.html and click on the link of the second file, it shows file doesn't exist. Cause inside first.html second file is linked as path_html/second not as path_html/second.html

Shouldn't first.html, second.html be linked together? How to make the work?

2.

Say I have a markdown file like the following:

---
title: NewFile
created: 18/09/2020 15:13:58 IST
theme: Copenhagen
---

# Header
Some text
.
.
.
_End of file_

After convertion, resulting file looks like the following:


title: NewFile created: 18/09/2020 15:13:58 IST theme: Copenhagen

Header

Some text
.
.
.
End of file

How do I get the file to look like this:


NewFile

Header

Some text
.
.
.
End of file

This is how pandoc converts it. I couldn't get it done even after fiddling with default.tpl long enough. I don't know much html. Any help will be appreciated.

3.

If I comment a line in markdown like this:

%% a comment

after conversion it is displayed in html like %% a comment. Comments in markdown should remain comments in html. How to get that? Am I doing anything wrong?

@patrickdavey
Copy link
Owner

Hmmm, I'm not sure. Are you definitely using vimwiki_markdown for your conversion? (did you actually run gem install vimwiki_markdown?). The files certainly ought to be created, but, you should probably be running VimwikiAll2HTML not just Vimwiki2HTML.

This gem uses github flavoured markdown which uses <!-- .... --> as the comment delimiters.

So, I don't think there's anything broken with the gem to be honest, please double check you're actually using the correct markdown format and most importantly that you've installed the gem and are referencing it correctly from your .vimrc , see the setup section for more details :)

@MahbubAlam231
Copy link
Author

I did run sudo gem install vimwiki_markdown. VimwikiAll2HTML and github flavoured markdown comments work. Thanks for your help! Could you please comment on 2? I couldn't get it to work even after changing default.tpl. Maybe I'm missing something, I don't know much html. Is there a way to change default.tpl and get it to work?

@patrickdavey
Copy link
Owner

You can see my default .tpl here . You can use %date% and %title% markers. There's no concept of a theme however, that you'll have to work out yourself.

If you can learn markdown you can learn html. For what you seem to want to do, changing your .tpl to have something like:

<h1>%title%<h1>
<h2>%date%</h2>
%content%

might work. Sorry - that's as much as I can really help you with - there are tonnes of tutorials on writing HTML so I'm sure you can work it out :). Good luck!

@MahbubAlam231
Copy link
Author

MahbubAlam231 commented Sep 22, 2020

Thanks for taking the time to respond 👍

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

No branches or pull requests

2 participants