On my blog (https://ervikrant06.github.io/), I am not sure why but blog font is italic characters example : https://ervikrant06.github.io/kubernetes/Kuberenetes-prometheus-persistent-storage/
How can I change this to default non-italic characters?
I guess it has happened after adding the category functionality in my blog but not sure what exactly went wrong.
The issue is because of the following markup in your _layouts/post.html:
https://github.com/ervikrant06/ervikrant06.github.io/blob/3061c33012326ebd2b580b56f916453add3ab845/_layouts/post.html#L18-L19
<div class="date">
<div class="date">
Related
I have a very lengthy html page with multiple instances of this type of code:
<h3>Some header text
<span class="text-small">Text I want to move</span>
</h3>
Ideal result:
<p>Text I want to move</p>
<h3>Some header text</h3>
I can use regex to find all the spans, but then what? Replace doesn't help me since the content is unique each time.
Thanks for your help, and let me know if I left any crucial info out.
Edit:
Per #bloodyKnuckles's comments, adding some more information:
I'm on mac, editing an html locally in Adobe Dreamweaver that will be copied onto a remote server later. The pages already exist there and I am updating some of the code.
In terms of regex, I do not have a lot of experience with it, and I tried a couple of different processors but I can't recall exactly which ones.
I use Sublime Text for programming on my Mac. (VIM when on the server.) They have a regex-capable find and replace feature. Here's what work with them:
Find: <h3>(.+)\n *(<span class="text-small">[^<]*</span>)\n</h3>
Replace: \2\n<h3>\1</h3>
Before:
<h3>Some header text
<span class="text-small">Text I want to move</span>
</h3>
<h3>Another header text
<span class="text-small">Something else.</span>
</h3>
After:
<span class="text-small">Text I want to move</span>
<h3>Some header text</h3>
<span class="text-small">Something else.</span>
<h3>Another header text</h3>
Looks like Dreamweaver uses something like this:
Find: <h3>(.+)\n *(<span class="text-small">[^<]*</span>)\n</h3>
Replace: $2\n<h3>$1</h3>
Based on the link shared by #bloodyKnuckles, I saw this useful tip:
Use parentheses to set off groupings within the regular expression to be referred to later. Then use $1, $2, $3, and so on in the Replace With field to refer to the first, second, third, and later parenthetical groupings.
Finally, my solution worked like this-
Find:
(<h3.*)(<span class="text-small">*.+<\/span>)(</h3>)
Replace with:
$2$1$3
Thanks so much, everyone, and thank you #bloodyKnuckles for pointing me in the right direction.
I'm using Real Homes theme, and I have this weird problem. After finishing up my website, I've noticed that some titles are not H1 tag, but H2. As I said, not everyone. I thought it might be the template, but some of the ones with H1 title use a template. So I checked them manually and I can't figure out where to edit this. So my question became: how do I override the banner title tag so that every banner title is H1 tag? Here is an example of a code in H1 and H2 tags. Thanks!
</div>
<section id="rh-banner-attachment-parallax" class="rh_banner rh_banner__image" style="background-image: url('');">
<div class="rh_banner__cover"></div>
<div class="rh_banner__wrap">
<h2 class="rh_banner__title">Real Estate</h2>
<div class="rh_banner__controls">
</div>
<section id="rh-banner-attachment-parallax" class="rh_banner rh_banner__image" style="background-image: url('');">
<div class="rh_banner__cover"></div>
<div class="rh_banner__wrap">
<h1 class="rh_banner__title">News</h1>
</div>
</section> <section class="rh_section rh_section--flex rh_wrap--padding rh_wrap--topPadding">
<div class="rh_page rh_page__listing_page rh_page__news rh_page__main">
I tried editing some files in editor theme, the one inside wordpress, but nothing worked. In the end, I couldn't even find the exact line I was looking for. I guess I was hoping to find a line do edit, but I'm not skilled enough I'm afraid. That's why I want to override the info. I also tried searching for a solution here, but nothing seems to work for this theme. Thanks in advance.
Edit: you can see the problem in the demo of this theme as well: https://modern.realhomes.io
The Contact page and News page have the banner title in H1 tag, while the other pages are in H2 tag.
I'm getting started with Jekyll. I carefully followed the step-by-step tutorial https://jekyllrb.com/docs/step-by-step/01-setup/ like a good person, and everything is brilliant except that syntax highlighting is not working out of the box like the advertisement seems to imply. I've read jekyll syntax highlighter not working but the answer didn't do it for me.
Where my markdown says, e.g.,
```php
namespace Foo;
use My\Thing;
$thing = new Thing();
```
the output is
<div class="language-php highlighter-rouge"><div class="highlight">
<pre class="highlight"><code><span class="kn">namespace</span> <span class="nn">Foo</span><span class="p">;</span>
<span class="kn">use</span> <span class="nn">My\Thing</span><span class="p">;</span>
<span class="nv">$thing</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">Thing</span><span class="p">();</span>
</code></pre></div>
</div>
but I'm not seeing any pretty colors. Obviously I am missing the CSS resource that defines highlighter-rouge and all that good stuff, but for all my searching I haven't been able to figure out where to get it or what I might be doing wrong.
I have tried multiple permutations of _config.yml with no luck, but I shouldn't need any special settings there because the default is what I want.
Suggestions?
Thanks.
You can find custom syntax highlighting libraries on GitHub and elsewhere, but you may want to start with https://prismjs.com/
I have a simple website, as I'm a beginner programmer. I inserted a <p> tag, which worked all fine and dandy. There was two words in the paragraph which I wanted to link to a different page on my website, and it decided it didn't want to work. I don't know why it didn't work, because I have <div> tags in the same document to the same page that were working fine.
Edit: To define what wasn't working: It wasn't clickable. It changed color, like a normal hyperlink tag should, but was just a piece of text. You just couldn't click it. Even tags with an invalid or nonexistent href should be clickable. Right? Maybe I'm wrong, again, I am a beginner.
The other strange thing was that in my CSS file, I had the text-decoration set to none, so it shouldn't have changed color in the first place.
CSS:
a{
text-decoration:none;
}
This is the HTML that I had an issue with:
<p id="p1">Ingsoc is the Newspeak word for English Socialism. (For more on Newspeak, see the Ministry of Truth page.)</p>
And here's an example of a link with the same destination that worked just fine:
<a href="TruthPage.html">
<div id="minitrue">Ministry of Truth</div>
</a>
Instead of
<a href="DifferentPage.html">
try
<a href="http://www.yoursite.com/folderpath/DifferentPage.html">
where 'yoursite.com' and 'folderpath' are changed to match your situation.
The code looks ok to me. You could try...
<p />
<div>This is just basic text that was doing what it was supposed to. This was the text that I wanted to link to a different page.
</div>
if it's working within a div tag
Your problem is that your href="DifferentPage.html" is not vailid. My suggestion is to open that other page on your site, then copy the location in the address bar.
While messing around with Twitter markup i just found out that they placed HTML Markup within the data-expanded-footer and it looks something like this:
data-expanded-footer="<div class="js-tweet-details-fixer tweet-details-fixer">
<div class="js-tweet-media-container "></div>
<div class="entities-media-container " style="min-height:0px">
</div>
<div class="js-machine-translated-tweet-container"></div>
<div class="js-tweet-stats-container tweet-stats-container ">
</div>
<div class="client-and-actions">
<span class="metadata">
<span title="12:11 PM - 10 Apr 13">12:11 PM - 10 Apr 13</span>
· <a class="permalink-link js-permalink js-nav" href="/****/status/****" >Details</a>
</span>
</div>
</div>"
Is this a valid html element (this attribute is child of a div element with class tweet)
If this is valid, is this a good idea, if not why?
Is this so bad for SEO ?
EDIT
Just tried to parse HTML from data attribute and it worked but there should be a single quotation if you want to make it work like :
http://jsfiddle.net/burimshala/crEXU/
And if you leave like twitter using double quotes within the markup and if you open the data-markup attribute with double quotes it does not work :
http://jsfiddle.net/burimshala/crEXU/1/
How does Twitter parse this ?
data-* attributes are valid HTML5, see:
http://ejohn.org/blog/html-5-data-attributes/
and http://www.w3.org/TR/2010/WD-html5-20101019/elements.html
It's main use is for data storage (in this case of HTML code). It all depends on your situation if this is a good idea, but it definitely serves a purpose. I use it often when I want to 'clone' dynamic content.
It's an 'invisible' element, so SEO should not really be affected, I am however, no expert on this.
It's good declared, I would not say its bad for SEO because others SEO factors like Microformats for SEO (hCard, vCard or schema) all use HTML attributes.
As long your site is valid to W3C, and dont have any markup error (Check here): http://validator.w3.org/, than you are good with SEO.
The only small problem for SEO friendly this will be if your HTML markup code will always beat the website TEXT.
Remmeber for SEO always is better that minimum 51% of website to be Text, and others HTML atributes.