Hey we are trying to prevent just one file from being indexed by google. "preview.html"
How can we set this up to allow everything else but deny this one html file?
<meta name="robots" content="noindex">
Related
I’m trying to create a Single page with astro and netlify cms, in which the admin should be able to add/remove/modify the page through /admin, but I’m struggling with the understanding of the folder structure.
So, as far as I know, I need to specify the collection structure in the config.yml file. Something like this. (see attached file)
Which will create a content.md file. Basically it will contain all the info that was created through /admin.
The problem is that I don’t know how and where this content.md file is used. Should I import it manually in the index.astro file or am I wrong?
Thank you in advance 🙂
If you have a Markdown file at src/content/content.md, you will need to import and render it somewhere. It depends which page you want to display this content on, but if you want to show the content on your homepage, this would be src/pages/index.astro.
Here’s an example:
---
// src/pages/index.astro
import { Content, frontmatter } from '../content/content.md';
---
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>My homepage</title>
</head>
<body>
<h1>{frontmatter.title}</h1>
<article>
<Content /> <!-- this will render your Markdown body -->
</article>
</body>
</html>
The key things to note here are:
The use of the <Content /> component to render the main Markdown content of your Markdown file
The use of an expression {frontmatter.title} to access the title field from your Netlify CMS config. Other fields would be available in the same way: {frontmatter.description}, {frontmatter.heroImage} etc.
I want some of the pages to be redirected back to the main page as 'params'. These are not data or privacy sensitive, so I dont need to use the "session" variable.
I was thinking that it would be better for the robots to find physical html files. So for example, I have example.kiwi/downloads.html containing
<meta http-equiv=="refresh" content="0; url=https://example.kiwi?mode=downloads" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<script>window.location.href = "https://example.kiwi?mode=downloads"</script>
I assume that I can do the same with htaccess. Is that better and how do I do it. Being a sensitive file, I am trying not to experiment a lot with it.
I have bone.php and bone.css inside public_html in my server. Inside bone.php i have a link tag which calls bone.css <link rel="stylesheet" type="text/css" href="bone.css">. i have created .htaccess file for bone.php file
RewriteRule ^community/([0-9a-zA-Z]+) bone.php?first=$1 [NC, L]
After i created .htaccess i need to change link tag like <link rel="stylesheet" type="text/css" href="../bone.css">. Which means bone.php thinks its inside a folder, which is not.
If its only way i need change all links inside my website. I hope someone will say there is an another way.Thanks
This is because your relative URIs have their base changed. Originally, the base is / when the page is /bone.php, and the browser properly fills in relative links with the / base. But when the browser goes to a page like /community/foo/ the base suddenly becomes /community/foo/ and it tries to append that in front of all relative URLs and thus none of them load.
You can either make your links absolute, or change the URI base in the header of your pages (inbetween the <head> </head> tags):
<base href="/">
I used the iframe to add the like button to my website
and after read many questions/answer related with my issue I add to the HEAD:
<meta property="og:image"
<meta property="og:title" content="EL SUR TAMBIEN ES AMERICA"/>
<meta property="og:url" content="http://elsuresamerica.weebly.COM/"/>
<meta property="og:type" content="website" />
I debugged it and get:
"More Than One OG URL Specified:
Object at URL (my web site) of type 'website' is invalid because it specifies multiple 'og:url' values: (my web site), (my web site)"
I don't understand what that means. I am not a developer, just a writer and I'm getting crazy with this. Please I need help to show a thumbnail in FB when the like button is clicked.
Thanks!
If that is the original code, I'd first see if it is because the 1st meta tag is not closed ;-) Try adding /> to the end of the 1st line
I have the canonical line in a huge pages as below
<link rel="canonical" href="10-effective-ways-to-reduce-merchant-cash-advance-business-costs.php" />
sure every page has it's own url, I want to search this line for all the pages and change .php to be .html
I hope if you can help
I found the solution find
<link rel="canonical"([^<]*).php
replace with
<link rel="canonical"$1.html