Make prepros watch Jade HTML include files - html

How can I make prepros watch HTML include files in Jade templates?
Gets a bit tiresome having to save the Jade file too after updating the included HTML. Codekit has this feature, any ideas how to get it working in Jade?

I didn't make it too, but I use simple hotfix which you might like.
Rename your example.html file to example.jade
Select your file contents and make indent.
Write any tag with a dot on top of the file, with no indents on the left (it is a top level tag).
span.
<html> ...
Now you can edit example.jade as a simple .html file. Hope it will help.

Related

Can I use SCSS in a <style> tag?

I have been looking into this subject for ages and cannot find anything about it. My question is:
How do I put SCSS into a normal HTML document with JavaScript in it as well.
Can I put the SCSS in a <style> tag or in an external stylesheet? If so (the stylesheet one) does it have to be like the following format: style.scss or style.css.
Thank you if you can help.
SCSS needs to be transformed into CSS before browsers can use it.
You could put SCSS inline in a <style type="text/scss">...</style> element and then use client-side JS to convert it to CSS and inject the resulting CSS into the DOM.
Likewise your build toolchain could parse the HTML, pluck out the SCSS, run it through a converted to get CSS and then inject that back into the page.
SCSS will not run in a browser without first being compiled to native CSS.
Webpack seems to be the build tool of choice for doing this during development.
well if your using VS CODE then there is a very simple way to add scss with html
(1) install the live sass compiler extention
Link : https://marketplace.visualstudio.com/items?itemName=ritwickdey.live-sass
(2) create a file (style.scss).
(3) after the installation.Write some SCSS code in the file and then you will find (watch sass button) on left bottom menu click on it and it will create 2 files (1)style.css and (2)style.map.css.
(4)now whatever you right in .scss file it will compile in style.css. Now connect your (style.css) with html and boom it will work......

Include standalone HTML page in sphinx document

For most of my project's documentation I prefer a standard sphinx layout. However for the landing page I would prefer to use custom HTML/CSS/JS without any of the layout, TOC, or sidebars of the normal sphinx site. Is there a way to include a raw HTML standalone page in a sphinx-generated website in a way that completely disregards the normal layout of the rest of the site?
As a counter example I know that I can include raw HTML bits into a page using the following (see also this question)
.. raw:: html
:file: myfile-html
However this just embeds a file within the normal layout. I would like to have a completely standalone HTML page.
I just ran into this problem myself, and the way I solved it was to simply include the html file in my source/_static folder, then refer to it with a relative link.
So if source/_static/my_standalone.htm is the path where I have my non-generated HTML file, and the .rst file where I want to type my link is at source/otherfolder/index.rst, I write it like this in my rst:
Link to my non-Sphinx HTML file
===============================
To get to my standalone, non-generated HTML file,
just `click here <../_static/my_standalone.html>`_ now!

How to automatically load a CSS file into HTML

I have a basic index.html file in a folder, as well as many, many other files. I want them all to use the same CSS file, without having to manually add to every file. I was wondering if you renamed the file index.css or something like that it would automatically load into every HTML file in the folder? Out of curiosity, is there also a Javascript method for this too?
Bad news my friend No. There is no magical tool that will import the CSS into all of your files. You have to do it yourself. Also it's really easy
Get the CSS file
Import the CSS File
See it's that easy. Was it so hard to do it?
You can't do that with simple HTML.
Do a PHP template instead, basically with:
head
header
nav menu
a content/container div/section
footer
Then, include your HTML/PHP page in your content.
For instance, use $_GET or $_POST to know which page to include.

Save a file style.min.css automatically when I save my style.css or .js on sublime text

I would like to know if a plugin for SublimeText is available to optimise automatically my .css and .js (like http://cleancss.com/) when i save my file ?
Like that, in my html code I have just to link my .min.css instead of .css and it's always updated.
Thx
If you go to Package Control and search for minify you'll get a number of options. It looks like some of them are web-based, and some rely on local compilers. There are also a couple that only do JavaScript, and the rest do JS and CSS.
Good luck!

linking html from another html file?

I know this may be a stupid question, im newer to this.
My menu bar takes over 1,000 lines in my html file. My client wants his index.html file organized so he can edit himself if needed.
I want to know if i can put my html for my menu in another files for instance in a file called : menu.html
and link in my index.html file by
<link href="../files/menu.html " type="text/html">
or in any other way that would work?
if you are using any programming language, use its code. For example, if you are using php
use
include_once('../files/menu.html');