Embed external html file using iframe in Sphinx - python-sphinx

I'm trying to embed an interactive graph, which is saved as an html file, in a reStructuredText document using iframe:
.. raw:: html
<iframe src="filename.html" height="345px" width="100%"></iframe>
The html file is in the same directory as my .rst file, but the graph does not display, and I'm getting a file could not be found error.
However, if I paste the external html file in the _build/html directory, the graph displays fine. How do I properly embed this html file, so that the graph is embedded automatically when I make html?
Working example of the thing that I want.

You can also include a file directly:
.. raw:: html
:file: filename.html
May not be what you wanted, but may help others coming here from google...

You could put the file filename.html in your source/_static directory. It would then be copied into build/html/_static, so you would have to replace the iframe attribute by src="_static/filename.html".

Related

Asciidoc Maven Build PDF links not Working

I am using the asciidoctor-maven-plugin to create a PDF User Guide from asciidoc source files.
I use the following format for cross references within the adoc files:
link:overview/name_of_file.adoc[Link name]
But the link is rendered as follows in the PDF:
file:///<local path>/overview/name_of_file.adoc
That is, the links the don't work. How to generate working links in the PDF (but also retain an .adoc link format that works in the source file for use in bitbucket)?
Output is one PDF

where do I find ckeditor's default style?

my documents are looking good in the CKeditor's textarea field. But when using the so generated HTML-files it doesn't look good. No wonder: there are no CSS styles saved in the HTML.
Which css files do I have to include to display ckeditor's HTML files looking similar to those within the editor? Or can I make Ckeditor include it's styles information in the HTML?
Use contents.css, located in your ckeditor root folder.

How do I put HTML, JS and CSS in a Github page .md file?

I'm writing a post for my Github-hosted site. I'm writing to my-first-post.md.
I have Javascript in script tags, CSS in style tags, and HTML in divs and spans.
When I paste the code in the .md and run jekyll serve thru Ruby, all I get is a page with the raw HTML.
What am I doing wrong?
"HTML is a publishing format; Markdown is a writing format." --daringfireball
Markdown is supposed to be simple.
You shouldn't be putting javascript into markdown unless you have a good reason to be doing so and even then I don't think every markdown converter will process javascript.
Ideally, your markdown should be confined to this list and maybe some simple HTML.
Any CSS or javascript should be included as part of your theme.
Edit, explaining jekyll filestructure:
So your Jekyll site should have a file structure that looks something like this. In very broad terms, your CSS and javascript should be in the default.html file located in the _layouts folder. You'll probably notice that the file appears to be a regular HTML file, more or less. The blog post--which is the markdown after it has been converted to HTML--will insert itself into the layout at the {{ content }} tag.
Also, the CSS and javascript doesn't have to be in default.html. It can also be in external files that you link to from default.html
Use MDX. It can do a lot. But if you want to use something more appropriate for the task at hand, I'd suggest looking into Astro . You can find more on these websites. For astro you can install the CLI and write markdown in less than 2 minutes. And also, it's very fast and integrates with a lot of frameworks.

Grab all HTML Source Code using VB6 WebBrowser Control

I've tried Webbrowser1.Document.body.OuterHTML and Webbrowser1.Document.body.innerHTML, but both are missing JS links and CSS stylings, any way to get the full html, seems it is just grabbing the html within the body not the full source.
Found out...
WebBrowser1.Document.documentElement.outerHTML

How can I create a download link in octopress

I'm using Octopress for my blog and need to create a link to download a text file.
There is a built in plugin called include_code that renders a link but also shows the file. I just want the link. Does anyone know how I can do this?
Put your text file under source/downloads/code
Then you can use the markdown syntax for showing links like this :
[link name](url for the txt file)
The url will be {your blog url}/downloads/code/{name of txt file}
This is derived from the include_code plugin which also shows a download link for each code listing.
UPDATE :
To do it from within HTML, you can use
Text File

Resources