-
-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support hreflang #20
Comments
Merged
Implemented in Release 2.5.1 |
@ernado-x, It is simply missing in 2.7.0 and master: using System;
using System.Xml.Serialization;
using JetBrains.Annotations;
namespace X.Web.Sitemap;
[PublicAPI]
[Serializable]
[XmlRoot("url")]
[XmlType("url")]
public class Url
{
[XmlElement("loc")]
public string Location { get; set; }
[XmlIgnore]
public DateTime TimeStamp { get; set; }
/// <summary>
/// Please do not use this property to change last modification date.
/// Use TimeStamp instead.
/// </summary>
[XmlElement("lastmod")]
public string LastMod
{
get => TimeStamp.ToString("yyyy-MM-ddTHH:mm:sszzz");
set => TimeStamp = DateTime.Parse(value);
}
[XmlElement("changefreq")]
public ChangeFrequency ChangeFrequency { get; set; }
[XmlElement("priority")]
public double Priority { get; set; }
public Url()
{
Location = "";
}
public static Url CreateUrl(string location) => CreateUrl(location, DateTime.Now);
public static Url CreateUrl(string url, DateTime timeStamp) =>
new()
{
Location = url,
ChangeFrequency = ChangeFrequency.Daily,
Priority = 0.5d,
TimeStamp = timeStamp,
};
} |
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
More info: https://support.google.com/webmasters/answer/189077?hl=en
Thank you.
The text was updated successfully, but these errors were encountered: