예제 #1
0
 public PageHeadBuilder(SeoSettings seoSettings)
 {
     _seoSettings = seoSettings;
     _titleParts = new List<string>();
     _metaDescriptionParts = new List<string>();
     _metaKeywordParts = new List<string>();
     _scriptParts = new Dictionary<ResourceLocation, List<ScriptReferenceMeta>>();
     _cssParts = new Dictionary<ResourceLocation, List<string>>();
     _canonicalUrlParts = new List<string>();
     _headCustomParts = new List<string>();
 }
예제 #2
0
 /// <summary>
 /// Hàm nhận vào 1 chuỗi nguồn, thực hiện các xử lý cần thiết ( loại bỏ dấu, thay khoảng trắng ...v...\v.. )
 /// để chuyển đổi nó thành 1 chuỗi đích hỗ trợ SEO có thể dùng trong Url.
 /// 
 /// Cấu hình lấy chuỗi SEO sẽ được lấy ra từ SeoSettings
 /// </summary>
 public static string GetSeName(string name, SeoSettings seoSettings = null)
 {
     if (seoSettings == null)
         seoSettings = EngineContext.Current.Resolve<SeoSettings>();
     return GetSeName(name, seoSettings.ConvertNonWesternChars, seoSettings.AllowUnicodeCharsInUrls);
 }