How to change the meta on each page individually in React - reactjs

I am working on a project when the html.index file has the meta data. I.e. as follows:
<meta
property = "og: description"
content = "This is my web."
/>
Then when I post a link on WhatsApp or Slack I can see the description I wrote or more correctly the "slogan of the site".
How can I change the description when on the example page on the page "My projects" When I send the link in the description will be written "My projects".
Plus, I tried using React Helemnt but it does not work for me
<Helmet>
<title>{web.title}</title>
<description>My projects</description>
</Helmet>
Where am I wrong and what am I missing?

Related

Reddit Link Thumbnail not Showing Dynamic og:image

I've got a NextJS app where users can share links to Reddit and the link preview in Reddit should show a different thumbnail based on the shared link. It works perfectly sharing to Slack or FB, but it always shows the exact same image on Reddit regardless of the link shared.
As you can see below, it should be sharing a different image based on the trade.id. However, on Reddit it always only shows the image for trade.id == 2 (this was the first one I shared for testing). I've tried using different accounts, but still the same problem.
const TradePage: React.FC<Props> = ({ trade }) => {
return (
<div>
<Head>
<meta
property='og:url'
content={`https://${URL}/trades/${trade.id}`}
/>
<meta
property='og:image'
content={`https://${URL}/images/Thumbnail${trade.id}.png`}
/>
<meta property='og:image:width' content='1200' />
<meta property='og:image:height' content='901' />
<meta
property='og:title'
content={`Verified ${trade.ticker} Trade`}
/>
<meta
property='og:image:alt'
content={`Verified ${trade.ticker} Trade`}
/>
<meta property='og:image:type' content='image/png' />
</Head>
<TradeComponent trade={trade} />
</div>
);
Reddit caches the OG image on the first request, as do a few other services like Twitter.
Twitter offers an OG testing tool to bust the cache - Reddit does not offer such a tool.
Unfortunately, your OG image is cached on Reddit for as long as they want to cache it or until they release a tool. However, it's been like this for a few years, and it doesn't look high on their priority.
A workaround is to change the URL for the page. For example, adding a trailing slash, query param, or renaming the route.

How to get custom discord embeds for github.io website?

Source code
I just want to change some stuff like add a picture, change the colour of the blue strip, add some body text, etc.
Use these meta tags inside your index.html file <head> tags. You have used the og:title tag, use the other two.
<meta property="og:title" content="Write your desired title">
<meta property="og:description" content="Write the body text here">
<meta property="og:image" content="https://hypixelfarms.github.io/images/1.jpeg">
These are for social sharing which use the og property, unlike Search Engines.For more information visit this page of Css-Tricks.
Here's some Python code that will do what you're asking for. For color, set the variable to the hex code of any color you would like, and replace the # with 0x. I have provided an example one that sets it to green. You can get the color code from here.
#bot.command()
async def test(ctx):
embed = discord.Embed(
title="Farms and More",
url="https://hypixelfarms.github.io/",
description="body text",
color=0x4ef207
)
embed.set_thumbnail(url="") # enter the URL location of the picture to use for the embed picture
await ctx.send(embed=embed)
Go to this website for more detailed information on embed features.

SEO contents are not read by Google in angularjs App

I have developed an angularjs single page App. Meta tags and canonical link are dynamically set in each page. These contents are not shown in page source.It can be see while taking inspect element in browser.While we search our site in google,it doesn't show all pages and meta tags. We can see only index page in google search and the meta contents are not correct.
I have added these code in index.html page
<title>Processuae</title><meta name="title" content="Processuae"><meta name="keyword" content="Management Consulting,Business Setup,Call Center Outsourcing,PRO & Document Clearing,Event & Exhibition Organization,Technology Support Services"><meta name="description" content="Process UAE is a company focused on providing a multitude of outsourcing services."><link rel="canonical" href="{{canonical_link}}">
In each page, i have added
<update-title title="{{page_title}}"></update-title><update-meta name="title" content="{{meta_title}}"></update-meta><update-meta name="keyword" content="{{meta_keyword}}"></update-meta><update-meta name="description" content="{{meta_description}}"></update-meta>
I have attached screenshots below
Please help me.

page title name is not coming in page source using angular js site

Page title name is not coming in page source but page title is showing at right place..but when I open page source page title is not come as I expected.
page title is showing in page source like this mentioned below here
<title ng-bind="ngMeta.title"></title>
but the real title is not showing at page source..but real title is showing when I mouse over the place where page title shows.how to solve the problem..I am using angular js.can anyone help me please ?

How do I get the Google +1 button to give a preview of the article rather than the top HTML on the page?

Google Plus lists all your +1s with a small preview of the webpage that was +1ed. Techcrunch and Mashable's previews come up as the first sentence of the article, however for me it just takes the first HTML on the page (which in my case is navigation). How can I get it to target the article for this preview rather than the navigation?
I have looked through the API and couldnt find anything that would do what I'm talking about.
Well, you have three options to avoid G+ trying a best guess.
1) (prefered) Mark up your site with microdata. Please refer to http://schema.org and possibly the Google Webmaster Tools help section on microdata and the Opera Developer resources.
It will look something like:
<body itemscope itemtype="http://schema.org/Article">
<h1 itemprop="name">Article Title</h1> <!-- snippet title -->
<img itemprop="image" src="image-url"></img> <!-- the snippet icon -->
<p itemprop="description">Snippet text.</p>
</body>
The idea is to mark up the parts that you already uses as base for your snippet. Yahoo, MS Bing, Google and a few other search engines will try to honour this for their search snippets as well, as well as future browser versions, e.g. for bookmarks.
2) Use the facebook Open Graph protocol (which is not valid html, but makes your snippets compatible with facebook "shares").
It will look like (put this in your section)
<meta property="og:title" content="Your snippet title"/>
<meta property="og:image" content="url://of-your-snippet-image.jpeg"/>
<meta property="og:description" content="Your snippet text goes here"/>
3) Set the title and description meta tags.
<meta name="title" content="Your snippet title" />
<meta name="description" content="Your snippet text goes here">
Google finally released how to do it. http://developers.google.com/+/plugins/+1button/#plus-snippet
You need to use itemprop tags to tell +1 what you want to use.
There's many ways to go about it:
You can add the following tags to your opening HTML declaration:
<html itemscope itemtype="http://schema.org/Article">
and then add the following meta descriptors:
<meta itemprop="name" content="Your article's title" />
<meta itemprop="description" content="Your article's description or excerpt" />
and finally add this to the image you want to use:
<img itemprop="image" src="image.jpg" />

Resources