Skip to content

Commit

Permalink
Umbraco 10 version (#86)
Browse files Browse the repository at this point in the history
* Umbraco 10 version

* Revert some site csproj changes

* Fix some warnings

* Fix for language files not being loaded

* Setup new version numbers

* Set version to Umbraco 10

* Set version to 2.0.0
  • Loading branch information
patrickdemooij9 authored Jun 16, 2022
1 parent 7801df9 commit 5a5c61b
Show file tree
Hide file tree
Showing 42 changed files with 3,972 additions and 113 deletions.
53 changes: 53 additions & 0 deletions src/SeoToolkit.Umbraco.Common.Core/Composers/SeoToolkitComposer.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;
using Umbraco.Cms.Core.Composing;
using Umbraco.Cms.Core.DependencyInjection;
using Umbraco.Extensions;
using SeoToolkit.Umbraco.Common.Core.Collections;
using SeoToolkit.Umbraco.Common.Core.ContentApps;
using SeoToolkit.Umbraco.Common.Core.Dashboards;
using SeoToolkit.Umbraco.Common.Core.Repositories.SeoSettingsRepository;
using SeoToolkit.Umbraco.Common.Core.Sections;
using SeoToolkit.Umbraco.Common.Core.Services.SeoSettingsService;
using Umbraco.Cms.Core.Services;

namespace SeoToolkit.Umbraco.Common.Core.Composers
{
public class SeoToolkitComposer : IComposer
{
public void Compose(IUmbracoBuilder builder)
{
builder.Sections().Append<SeoToolkitSection>();

builder.Dashboards().Add<WelcomeDashboard>();

builder.ContentApps().Append<SeoSettingsContentAppFactory>();
builder.ContentApps().Append<SeoContentAppFactory>();

builder.Services.AddSingleton<ModuleCollection>();

builder.Services.AddUnique<ISeoSettingsRepository, SeoSettingsRepository>();
builder.Services.AddUnique<ISeoSettingsService, SeoSettingsService>();

/*builder.Services.AddTransient(sp =>
{
var languageFiles = new List<LocalizedTextServiceSupplementaryFileSource>();
var webhostEnvironment = sp.GetRequiredService<IWebHostEnvironment>();
var seoToolkitFolder = webhostEnvironment.ContentRootFileProvider.GetDirectoryContents("/App_Plugins/SeoToolkit/");
foreach (var dir in seoToolkitFolder.Where(it => it.IsDirectory))
{
foreach (var langDir in new DirectoryInfo(dir.PhysicalPath).EnumerateDirectories().Where(d => d.Exists && d.Name.InvariantEquals("lang")))
{
languageFiles.AddRange(langDir.EnumerateFiles("*.xml").Select(langFile => new LocalizedTextServiceSupplementaryFileSource(langFile, false)));
}
}
languageFiles.Add(new LocalizedTextServiceSupplementaryFileSource(new FileInfo(webhostEnvironment.ContentRootFileProvider.GetFileInfo("/App_Plugins/SeoToolkit/lang/en-us.xml").PhysicalPath), false));
return (IEnumerable<LocalizedTextServiceSupplementaryFileSource>)languageFiles;
});*/
}
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Umbraco.Cms.Core.Scoping;
using Umbraco.Extensions;
using Umbraco.Extensions;
using SeoToolkit.Umbraco.Common.Core.Models.Database;
using Umbraco.Cms.Infrastructure.Scoping;

namespace SeoToolkit.Umbraco.Common.Core.Repositories.SeoSettingsRepository
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<Product>SeoToolkit Common Core</Product>
<PackageId>SeoToolkit.Umbraco.Common.Core</PackageId>
<Title>SeoToolkit Common Core</Title>
Expand All @@ -11,11 +11,11 @@
<PackageProjectUrl>https://github.com/patrickdemooij9/SeoToolkit.Umbraco</PackageProjectUrl>
<RepositoryUrl>https://github.com/patrickdemooij9/SeoToolkit.Umbraco</RepositoryUrl>
<PackageIconUrl>https://raw.githubusercontent.com/patrickdemooij9/SeoToolkit.Umbraco/main/package/SeoToolkitIcon.png</PackageIconUrl>
<Version>1.1.0</Version>
<Version>2.0.0</Version>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Umbraco.Cms.Web.Website" Version="9.0.1" />
<PackageReference Include="Umbraco.Cms.Web.BackOffice" Version="9.0.1" />
<PackageReference Include="Umbraco.Cms.Web.Website" Version="10.0.0" />
<PackageReference Include="Umbraco.Cms.Web.BackOffice" Version="10.0.0" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<ContentTargetFolders>.</ContentTargetFolders>
<Product>SeoToolkit Common</Product>
<PackageId>SeoToolkit.Umbraco.Common</PackageId>
Expand All @@ -12,12 +12,12 @@
<PackageProjectUrl>https://github.com/patrickdemooij9/SeoToolkit.Umbraco</PackageProjectUrl>
<RepositoryUrl>https://github.com/patrickdemooij9/SeoToolkit.Umbraco</RepositoryUrl>
<PackageIconUrl>https://raw.githubusercontent.com/patrickdemooij9/SeoToolkit.Umbraco/main/package/SeoToolkitIcon.png</PackageIconUrl>
<Version>1.1.0</Version>
<Version>2.0.0</Version>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Umbraco.Cms.Web.Website" Version="9.0.1" />
<PackageReference Include="Umbraco.Cms.Web.BackOffice" Version="9.0.1" />
<PackageReference Include="Umbraco.Cms.Web.Website" Version="10.0.0" />
<PackageReference Include="Umbraco.Cms.Web.BackOffice" Version="10.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/SeoToolkit.Umbraco.Core/SeoToolkit.Umbraco.Core.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<Product>SeoToolkit Core</Product>
<PackageId>SeoToolkit.Umbraco.Core</PackageId>
<Title>SeoToolkit Core</Title>
Expand All @@ -12,7 +12,7 @@
<PackageProjectUrl>https://github.com/patrickdemooij9/SeoToolkit.Umbraco</PackageProjectUrl>
<RepositoryUrl>https://github.com/patrickdemooij9/SeoToolkit.Umbraco</RepositoryUrl>
<PackageIconUrl>https://raw.githubusercontent.com/patrickdemooij9/SeoToolkit.Umbraco/main/package/SeoToolkitIcon.png</PackageIconUrl>
<Version>1.1.0</Version>
<Version>2.0.0</Version>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@
using SeoToolkit.Umbraco.MetaFields.Core.Models.SeoField;
using SeoToolkit.Umbraco.MetaFields.Core.Providers;
using SeoToolkit.Umbraco.MetaFields.Core.Repositories.DocumentTypeSettingsRepository;
using SeoToolkit.Umbraco.MetaFields.Core.Repositories.MetaFieldsSettingsRepository;
using SeoToolkit.Umbraco.MetaFields.Core.Repositories.SeoValueRepository;
using SeoToolkit.Umbraco.MetaFields.Core.Services.DocumentTypeSettings;
using SeoToolkit.Umbraco.MetaFields.Core.Services.MetaFieldsService;
using SeoToolkit.Umbraco.MetaFields.Core.Services.SeoValueService;
using Umbraco.Cms.Core.Services;

namespace SeoToolkit.Umbraco.MetaFields.Core.Composers
{
Expand All @@ -48,7 +50,7 @@ public void Compose(IUmbracoBuilder builder)
}

builder.Components().Append<EnableModuleComponent>();

builder.Services.AddTransient(typeof(IRepository<DocumentTypeSettingsDto>), typeof(MetaFieldsSettingsDatabaseRepository));
builder.Services.AddTransient(typeof(IMetaFieldsSettingsService), typeof(MetaFieldsSettingsService));
builder.Services.AddTransient(typeof(IMetaFieldsService), typeof(MetaFieldsService));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using SeoToolkit.Umbraco.MetaFields.Core.Models.DocumentTypeSettings.Business;
using SeoToolkit.Umbraco.MetaFields.Core.Models.MetaFieldsSettings.Database;
using SeoToolkit.Umbraco.MetaFields.Core.Repositories.DocumentTypeSettingsRepository;
using Umbraco.Cms.Core.Mapping;
using Umbraco.Cms.Core.Scoping;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.Infrastructure.Scoping;
using Umbraco.Extensions;
using SeoToolkit.Umbraco.MetaFields.Core.Models.DocumentTypeSettings.Business;
using SeoToolkit.Umbraco.MetaFields.Core.Models.DocumentTypeSettings.Database;
using SeoToolkit.Umbraco.MetaFields.Core.Models.MetaFieldsSettings.Database;

namespace SeoToolkit.Umbraco.MetaFields.Core.Repositories.DocumentTypeSettingsRepository
namespace SeoToolkit.Umbraco.MetaFields.Core.Repositories.MetaFieldsSettingsRepository
{
public class MetaFieldsSettingsDatabaseRepository : IMetaFieldsSettingsRepository
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using System.Collections.Generic;
using System.Linq;
using Newtonsoft.Json;
using Umbraco.Cms.Core.Scoping;
using Umbraco.Extensions;
using SeoToolkit.Umbraco.MetaFields.Core.Models.SeoSettings.Database;
using Umbraco.Cms.Infrastructure.Scoping;

namespace SeoToolkit.Umbraco.MetaFields.Core.Repositories.SeoValueRepository
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<Product>SeoToolkit MetaFields Core</Product>
<PackageId>SeoToolkit.Umbraco.MetaFields.Core</PackageId>
<Title>SeoToolkit MetaFields Core</Title>
Expand All @@ -12,12 +12,12 @@
<PackageProjectUrl>https://github.com/patrickdemooij9/SeoToolkit.Umbraco</PackageProjectUrl>
<RepositoryUrl>https://github.com/patrickdemooij9/SeoToolkit.Umbraco</RepositoryUrl>
<PackageIconUrl>https://raw.githubusercontent.com/patrickdemooij9/SeoToolkit.Umbraco/main/package/SeoToolkitIcon.png</PackageIconUrl>
<Version>1.1.0</Version>
<Version>2.0.0</Version>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Umbraco.Cms.Core" Version="9.0.1" />
<PackageReference Include="Umbraco.Cms.Web.BackOffice" Version="9.0.1" />
<PackageReference Include="Umbraco.Cms.Core" Version="10.0.0" />
<PackageReference Include="Umbraco.Cms.Web.BackOffice" Version="10.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
"css": [
"~/App_Plugins/SeoToolkit/MetaFields/css/main.css"
],
"version": "1.1.0",
"version": "2.0.0",
"name": "SeoToolkit.Umbraco.MetaFields"
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<ContentTargetFolders>.</ContentTargetFolders>
<Product>SeoToolkit MetaFields</Product>
<PackageId>SeoToolkit.Umbraco.MetaFields</PackageId>
Expand All @@ -13,7 +13,7 @@
<PackageProjectUrl>https://github.com/patrickdemooij9/SeoToolkit.Umbraco</PackageProjectUrl>
<RepositoryUrl>https://github.com/patrickdemooij9/SeoToolkit.Umbraco</RepositoryUrl>
<PackageIconUrl>https://raw.githubusercontent.com/patrickdemooij9/SeoToolkit.Umbraco/main/package/SeoToolkitIcon.png</PackageIconUrl>
<Version>1.1.0</Version>
<Version>2.0.0</Version>
</PropertyGroup>

<ItemGroup>
Expand All @@ -29,12 +29,6 @@

<Import Project="..\SeoToolkit.Umbraco.Common\build\SeoToolkit.Umbraco.Common.targets" Condition="'$(Configuration)'=='Release'" />

<ItemGroup>
<None Remove="App_Plugins\SeoToolkit\MetaFields\Interface\Previewers\OpenGraph\openGraphPreviewer.controller.js" />
<None Remove="App_Plugins\SeoToolkit\MetaFields\Interface\Previewers\OpenGraph\openGraphPreviewer.html" />
<None Remove="App_Plugins\SeoToolkit\MetaFields\Interface\Previewers\previewer.directive.js" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\SeoToolkit.Umbraco.MetaFields.Core\SeoToolkit.Umbraco.MetaFields.Core.csproj" />
<ProjectReference Include="..\SeoToolkit.Umbraco.Common\SeoToolkit.Umbraco.Common.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
using System.Linq;
using System.Linq.Expressions;
using Umbraco.Cms.Core.Cache;
using Umbraco.Cms.Core.Scoping;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.Core.Web;
using Umbraco.Extensions;
using SeoToolkit.Umbraco.Redirects.Core.Interfaces;
using SeoToolkit.Umbraco.Redirects.Core.Models.Business;
using SeoToolkit.Umbraco.Redirects.Core.Models.Database;
using Umbraco.Cms.Infrastructure.Scoping;

namespace SeoToolkit.Umbraco.Redirects.Core.Repositories
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<Product>SeoToolkit Redirects Core</Product>
<PackageId>SeoToolkit.Umbraco.Redirects.Core</PackageId>
<Title>SeoToolkit Redirects Core</Title>
Expand All @@ -12,7 +12,7 @@
<PackageProjectUrl>https://github.com/patrickdemooij9/SeoToolkit.Umbraco</PackageProjectUrl>
<RepositoryUrl>https://github.com/patrickdemooij9/SeoToolkit.Umbraco</RepositoryUrl>
<PackageIconUrl>https://raw.githubusercontent.com/patrickdemooij9/SeoToolkit.Umbraco/main/package/SeoToolkitIcon.png</PackageIconUrl>
<Version>1.1.0</Version>
<Version>2.0.0</Version>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
"css": [
"/App_Plugins/SeoToolkit/Redirects/css/main.css"
],
"version": "1.1.0",
"version": "2.0.0",
"name": "SeoToolkit.Umbraco.Redirects"
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<ContentTargetFolders>.</ContentTargetFolders>
<Product>SeoToolkit Redirects</Product>
<PackageId>SeoToolkit.Umbraco.Redirects</PackageId>
Expand All @@ -13,7 +13,7 @@
<PackageProjectUrl>https://github.com/patrickdemooij9/SeoToolkit.Umbraco</PackageProjectUrl>
<RepositoryUrl>https://github.com/patrickdemooij9/SeoToolkit.Umbraco</RepositoryUrl>
<PackageIconUrl>https://raw.githubusercontent.com/patrickdemooij9/SeoToolkit.Umbraco/main/package/SeoToolkitIcon.png</PackageIconUrl>
<Version>1.1.0</Version>
<Version>2.0.0</Version>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Umbraco.Cms.Core.Scoping;
using Umbraco.Extensions;
using SeoToolkit.Umbraco.RobotsTxt.Core.Interfaces;
using SeoToolkit.Umbraco.RobotsTxt.Core.Models.Business;
using SeoToolkit.Umbraco.RobotsTxt.Core.Models.Database;
using Umbraco.Cms.Infrastructure.Scoping;

namespace SeoToolkit.Umbraco.RobotsTxt.Core.Repositories
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<Product>SeoToolkit Robots.txt Core</Product>
<PackageId>SeoToolkit.Umbraco.RobotsTxt.Core</PackageId>
<Title>SeoToolkit Robots.txt Core</Title>
Expand All @@ -12,7 +12,7 @@
<PackageProjectUrl>https://github.com/patrickdemooij9/SeoToolkit.Umbraco</PackageProjectUrl>
<RepositoryUrl>https://github.com/patrickdemooij9/SeoToolkit.Umbraco</RepositoryUrl>
<PackageIconUrl>https://raw.githubusercontent.com/patrickdemooij9/SeoToolkit.Umbraco/main/package/SeoToolkitIcon.png</PackageIconUrl>
<Version>1.1.0</Version>
<Version>2.0.0</Version>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"javascript": [
"~/App_Plugins/SeoToolkit/backoffice/RobotsTxt/detail.controller.js"
],
"version": "1.1.0",
"version": "2.0.0",
"name": "SeoToolkit.Umbraco.RobotsTxt"
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<ContentTargetFolders>.</ContentTargetFolders>
<Product>SeoToolkit Robots.txt</Product>
<PackageId>SeoToolkit.Umbraco.RobotsTxt</PackageId>
Expand All @@ -13,7 +13,7 @@
<PackageProjectUrl>https://github.com/patrickdemooij9/SeoToolkit.Umbraco</PackageProjectUrl>
<RepositoryUrl>https://github.com/patrickdemooij9/SeoToolkit.Umbraco</RepositoryUrl>
<PackageIconUrl>https://raw.githubusercontent.com/patrickdemooij9/SeoToolkit.Umbraco/main/package/SeoToolkitIcon.png</PackageIconUrl>
<Version>1.1.0</Version>
<Version>2.0.0</Version>
</PropertyGroup>

<ItemGroup>
Expand Down
Loading

0 comments on commit 5a5c61b

Please sign in to comment.