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

Embedding CSS for single-file / one file / standalone HTML not working in commandline #71

Open
johentsch opened this issue Sep 20, 2023 · 0 comments

Comments

@johentsch
Copy link

johentsch commented Sep 20, 2023

Goal

The documentation states:

  • Some common use cases:
    ...
    • having everything in one file: use -i -c to have everything in one file.

This is consistent with the documentation of the -c argument which states:

  • --css-paths (or -c): You can leave this empty to disable storing the CSS in an external CSS file (useful e.g. if you want to convert only one file)

I would like to convert my README.md into a standalone README.html that does not depend on any other files so I run

gh-md-to-html README.md -c -i 

Bug

The CSS is outsourced to the default folder github-markdown-css

.
├── github-markdown-css
│   ├── code-navigation-banner-illo.svg
│   └── github-css.css
└── README.html

and embedded in the second line of the HTML file which reads

<link href="/github-markdown-css/github-css.css" rel="stylesheet"/>

Desired behaviour

Only a single file, README.html should be created which has the CSS embedded.

Other attempts

Equally unsuccessful:

gh-md-to-html -c -i -- README.md
gh-md-to-html README.md -c -i -o OFFLINE
gh-md-to-html README.md -c -i -o OFFLINE+

Setup

gh-md-to-html==1.21.2
python==3.11.4
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

1 participant