HTML text style shortcuts functioning within Github repository file edits? - html

I am just starting to learn Javascript, and I have a small question about editing files within a Github repository.
I am writing functions within a file in my repository that involve mathematical equations, and I am finding that within the editor itself, it is changing the style of the text based on common HTML shortcuts. In my case, whenever I use the asterisk key, *, to multiply values, the editor file will show all text between two consecutive asterisks in italics. It doesn't change the nature of the code itself at all, so it's just a QOL issue for me personally. It's just strange to see blocks of my code appearing italicized within the editor.
Is there any way to have HTML not try and parse such characters as text style shortcuts within the Github repository file editor?

Use .js file extension for Javascript code.
In README.md file put basic description for your project. Basic guid how to write README.md

Related

Is it possible to add notes to an rmarkdown html document AFTER knitting?

I am knitting a html markdown file for a customer with plenty of interactive visualizations inside it.
My client - not a tech user - would like to add their own comments, conclusions to the document, and using it for a presentation.
Is it possible to add a text box to an rmarkdown html document that can be edited and saved by a non-technical user?
What alternatives I have to keep the document interactive but editable after knitting?
I would like to avoid the case that the customer just copies screenshots from my html and pastes into a ppt.
As per my personal experience, I think you can add text commenting feature on the Rmd by uploading it to a Github page. You may follow this guidance on how to do so:
https://www.smaranyadey.com/post/creating-r-markdown-documents-and-publishing-them-using-github-pages
After the Github page set up, you can add widget like Hypothes.is which enable your client to annotate as well as highlight some texts.
You can make the Github page private so only your client can access your Rmd.
UPDATE:
Gosh, I just foud very simpler way to embed the Hypothesis script to the HTML output without the need for uploading to Github Page.
Just put this code under YAML:
---
<script src="https://hypothes.is/embed.js" async></script>
This update refers to an answer from this

VSCode HTML "pieces"

I use "pieces" to avoid confusion with the built-in "snippets" functionality.
The scenario is that I am rendering pages server-side in Nodejs, and as part of that I want to code portions of html in files that can be used to assemble an entire page. These are project-specific so the snippets functionality is really not useful here. Problem is if I write an html file that for example only has a section, VSCode tells me there is an error since that file does not start with <DOCTYPE>, etc.
The goal here is reusable pieces instead of duplicating for each page. E.g. define a header.html file that only defines the <header> section, and can then be inserted into each rendered page.
Has anyone done similar? How to tell VSCode to treat as HTML but without demanding a complete document and indicating an error?

confusion about files end with .thtml and what exactly are they

I was going over my company's code base, and I saw some file format I have never seen before. They are all ended with .thtml .
What exactly is the .thtml? I was told it is for template files, and every time I view it in vscode I need to choose a language at bottom right corner of the IDE (default was plain text). What is the use of template file in web development? Are they the substitutes of .html files?
HTML templates are HTML files enriched with variables, macros or other logic. They need to be preprocessed to ordinary HTML files before they can be viewed in a broswer. HTML templates are very useful when you want to create a lot of static HTML files sharing the same structure but with different contents.
There are several HTML templating engines out there, of which one happens to be named exactly thtml. (Of course this does not guarantee that it is the one your company uses.)

Atom editor custom made file template

I currently use ATOM as my text editor for HTML files and etc. My headers, nav bar, and footer are usually all the same. Is there a way or package that I can install that will allow me to have this autocomplete as a shortcut for any HTML file that I am working on?
Example:
I open an atom file
Save as HTML
Type in a button or do something
Page will have all my custom made HTML code
That way I don't have to re-entering it or etc.
To do this in Atom, you're probably looking for the snippets feature. This lets you auto-insert arbitrary content as you need, and you can specify your own snippets - like your standard header, footer etc. You can even create shortcuts so your snippets are automatically expanded.
Once you've found the snippets feature, do let us know if you have any problems getting it to do exactly what you need. Most text editors will have something similar - it's a common use case.

Changing html content for local application only

I want to organize my notes (on scientific articles).
I want to be able save text and images notes for each article
Save the pdf file
Organize it into a hierarchy with a document somewhere with a content table containing the hierarchy of thematics and link to all articles
I want to be able to move fast between articles (open note on an article fast)
Add tags to filter the articles
Add an importance level to filter articles
There is many softawre for that kind of thing but it's often difficult to combine pdf file and notes containing text and images and hierarchy and tags
And they are often not really customizable.
The best solution I can think of is to use html files to put the article contents, and other html files with links to the articles pages.
I currently use a python script that I call from command line with pdf download link and article name as argument
The script creates an empty html page for the article at the good place in the hierarchy, add link in the table of content html page, and the article link with his tags in a seperate file
What I would like to do is to have a button in my table of content html page which would allow me to add an article and so add and modify some files.
t's seems that a very specific case because I'm using web like technologies only to organize local files.
But I don't know how to do that and I don't know where to look. Could it be done with javascript or php ? Or may be use something like python dash to display the html page and run some python script in the background
Sorry for my english I'm not a native speaker
I found some app on github that did almost what I want: trilium and pervane
But I didn't use them because they were to complicated for me to customize them to add new functionalities
I finally find a solution by using flask to render my local notes that are stores as html.