mirror of
https://gitlab.com/buildfeed/BuildFeed.git
synced 2024-03-22 21:10:34 +08:00
SEO tweaks, Version Meta support
This commit is contained in:
parent
8f832a68e9
commit
476bce6bb2
|
@ -24,6 +24,7 @@ group i by i.Id.Type into b
|
||||||
{
|
{
|
||||||
CurrentItems = from i in MetaItem.Select()
|
CurrentItems = from i in MetaItem.Select()
|
||||||
group i by i.Id.Type into b
|
group i by i.Id.Type into b
|
||||||
|
orderby b.Key.ToString()
|
||||||
select b,
|
select b,
|
||||||
|
|
||||||
NewItems = from i in (from l in MetaItem.SelectUnusedLabs()
|
NewItems = from i in (from l in MetaItem.SelectUnusedLabs()
|
||||||
|
@ -34,8 +35,17 @@ group i by i.Id.Type into b
|
||||||
Type = MetaType.Lab,
|
Type = MetaType.Lab,
|
||||||
Value = l
|
Value = l
|
||||||
}
|
}
|
||||||
})
|
}).Concat(from v in MetaItem.SelectUnusedVersions()
|
||||||
|
select new MetaItem()
|
||||||
|
{
|
||||||
|
Id = new MetaItemKey()
|
||||||
|
{
|
||||||
|
Type = MetaType.Version,
|
||||||
|
Value = v
|
||||||
|
}
|
||||||
|
})
|
||||||
group i by i.Id.Type into b
|
group i by i.Id.Type into b
|
||||||
|
orderby b.Key.ToString()
|
||||||
select b
|
select b
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
4
BingSiteAuth.xml
Normal file
4
BingSiteAuth.xml
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<users>
|
||||||
|
<user>77FAD24B9B2579631630796D246267C3</user>
|
||||||
|
</users>
|
|
@ -209,6 +209,7 @@
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Content Include="BingSiteAuth.xml" />
|
||||||
<Content Include="browserconfig.xml" />
|
<Content Include="browserconfig.xml" />
|
||||||
<Content Include="favicon.ico" />
|
<Content Include="favicon.ico" />
|
||||||
<Content Include="Global.asax" />
|
<Content Include="Global.asax" />
|
||||||
|
@ -223,6 +224,7 @@
|
||||||
<Content Include="Areas\admin\Views\users\admins.cshtml" />
|
<Content Include="Areas\admin\Views\users\admins.cshtml" />
|
||||||
<Content Include="Areas\admin\Views\meta\index.cshtml" />
|
<Content Include="Areas\admin\Views\meta\index.cshtml" />
|
||||||
<Content Include="Areas\admin\Views\meta\create.cshtml" />
|
<Content Include="Areas\admin\Views\meta\create.cshtml" />
|
||||||
|
<Content Include="yandex_702baad42b020be7.html" />
|
||||||
<None Include="Properties\PublishProfiles\Milestone 1 FTP.pubxml" />
|
<None Include="Properties\PublishProfiles\Milestone 1 FTP.pubxml" />
|
||||||
<Content Include="googleacffc6da14c53e15.html" />
|
<Content Include="googleacffc6da14c53e15.html" />
|
||||||
<Content Include="content\tile\large.png" />
|
<Content Include="content\tile\large.png" />
|
||||||
|
|
|
@ -331,5 +331,10 @@ public struct BuildVersion
|
||||||
{
|
{
|
||||||
public byte Major { get; set; }
|
public byte Major { get; set; }
|
||||||
public byte Minor { get; set; }
|
public byte Minor { get; set; }
|
||||||
|
|
||||||
|
public override string ToString()
|
||||||
|
{
|
||||||
|
return string.Format("{0}.{1}", Major, Minor);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -79,6 +79,25 @@ public static IEnumerable<string> SelectUnusedLabs()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[DataObjectMethod(DataObjectMethodType.Select, false)]
|
||||||
|
public static IEnumerable<string> SelectUnusedVersions()
|
||||||
|
{
|
||||||
|
|
||||||
|
using (RedisClient rClient = new RedisClient(DatabaseConfig.Host, DatabaseConfig.Port, db: DatabaseConfig.Database))
|
||||||
|
{
|
||||||
|
var client = rClient.As<MetaItem>();
|
||||||
|
var versions = Build.SelectBuildVersions();
|
||||||
|
|
||||||
|
var usedLabs = from u in client.GetAll()
|
||||||
|
where u.Id.Type == MetaType.Version
|
||||||
|
select u;
|
||||||
|
|
||||||
|
return from v in versions
|
||||||
|
where !usedLabs.Any(ul => ul.Id.Value == v.ToString())
|
||||||
|
select v.ToString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[DataObjectMethod(DataObjectMethodType.Insert, true)]
|
[DataObjectMethod(DataObjectMethodType.Insert, true)]
|
||||||
public static void Insert(MetaItem item)
|
public static void Insert(MetaItem item)
|
||||||
{
|
{
|
||||||
|
|
|
@ -82,6 +82,8 @@
|
||||||
{
|
{
|
||||||
<h3>About</h3>
|
<h3>About</h3>
|
||||||
@Html.Raw(ViewBag.MetaItem.PageContent)
|
@Html.Raw(ViewBag.MetaItem.PageContent)
|
||||||
|
<h3>Share</h3>
|
||||||
|
<div class="addthis_sharing_toolbox"></div>
|
||||||
<h3>Listing</h3>
|
<h3>Listing</h3>
|
||||||
}
|
}
|
||||||
<ul class="list-unstyled">
|
<ul class="list-unstyled">
|
||||||
|
@ -204,4 +206,5 @@
|
||||||
<p class="list-group-item-text">{{:Group}}</p>
|
<p class="list-group-item-text">{{:Group}}</p>
|
||||||
</a>
|
</a>
|
||||||
</script>
|
</script>
|
||||||
|
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-5431719a661cbfd0" async="async"></script>
|
||||||
}
|
}
|
4
yandex_702baad42b020be7.html
Normal file
4
yandex_702baad42b020be7.html
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
<html>
|
||||||
|
<head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head>
|
||||||
|
<body>Verification: 702baad42b020be7</body>
|
||||||
|
</html>
|
Loading…
Reference in New Issue
Block a user