Skip to content

Commit

Permalink
update default mixcontent folder
Browse files Browse the repository at this point in the history
  • Loading branch information
nhathoang989 committed Oct 8, 2023
1 parent 2ed3afa commit 4fa39ce
Show file tree
Hide file tree
Showing 35 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ ModelManifest.xml
*.db
src/applications/**/PublishProfiles/
src/applications/**/mixcontent/
src/applications/**/ServiceDependencies/

src/applications/Mixcore/wwwroot/portal-apps/
Expand Down
Binary file removed src/applications/Mixcore/wwwroot/default-content.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion src/platform/mix.constant/Constants/MixFolders.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class MixFolders
public const string ImportFolder = "mixcontent/staticfiles/imports/themes";
public const string UploadsFolder = "uploads";
public const string SiteContentAssetsFolder = "mixcontent/assets";
public const string SharedConfigurationFolder = "../../shared/MixContent";
public const string DefaultMixContentFolder = "wwwroot/default-mixcontent";
public const string MixCoreConfigurationFolder = "../../applications/Mixcore/mixcontent";
}
}
8 changes: 8 additions & 0 deletions src/platform/mix.library/Helpers/MixCmsHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,14 @@ public static object ParseSearchKeyword(MixCompareOperator? searchMethod, object

public static IHostBuilder CreateHostBuilder<TStartup>(string[] args) where TStartup : class
{
var mixContentFolder = new DirectoryInfo(MixFolders.MixContentFolder);

// Clone Settings from shared folder
if (!mixContentFolder.Exists)
{
MixHelper.CopyFolder(MixFolders.DefaultMixContentFolder, MixFolders.MixContentFolder);
Console.WriteLine("Clone Settings from shared folder completed.");
}
return Host.CreateDefaultBuilder(args)
.UseContentRoot(Directory.GetCurrentDirectory())
.ConfigureAppConfiguration((hostingContext, config) =>
Expand Down

0 comments on commit 4fa39ce

Please sign in to comment.