diff --git a/Infocaster.Umbraco.DateFolders.sln b/Infocaster.Umbraco.DateFolders.sln index 5af6f14..ab09653 100644 --- a/Infocaster.Umbraco.DateFolders.sln +++ b/Infocaster.Umbraco.DateFolders.sln @@ -10,6 +10,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution .gitignore = .gitignore azure-pipelines.yml = azure-pipelines.yml GitVersion.yml = GitVersion.yml + LICENSE = LICENSE README.md = README.md ReadMe.txt = ReadMe.txt EndProjectSection diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..4efded2 --- /dev/null +++ b/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2022 Infocaster BV + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md index 3708e6b..b0f1343 100644 --- a/README.md +++ b/README.md @@ -1,21 +1,99 @@ -# Datefolders -This package creates Datefolders (year/month(/day)) for the specified doctype for Umbraco 9. For umbraco 8 use v3, for older versions please use v2 +

+ +

-# Behavior +

+DateFolders + +[![Downloads](https://img.shields.io/nuget/dt/Infocaster.Umbraco.DateFolders?color=ff0069)](https://www.nuget.org/packages/Infocaster.Umbraco.DateFolders/) +[![Nuget (with prereleases)](https://img.shields.io/nuget/vpre/Infocaster.Umbraco.DateFolders?color=ffc800)](https://www.nuget.org/packages/Infocaster.Umbraco.DateFolders/) +![GitHub](https://img.shields.io/github/license/Infocaster/DateFolders?color=ff0069) + +

+This package makes it easy to separate your content base on the day on which it is added. +With websites becoming bigger and bigger it is important that the content editors can easily find their content. This package makes that possible! +A great use case for this is a website that shows articles or blog posts. With this package they will always be ordered correctly by date, no matter how many items the content editor has written. + + +## Requirements +This package creates Datefolders (year/month(/day)) for the specified doctype for Umbraco 8.2.x+ . For umbraco 7 use v2 and older versions please use v1.4

+**for Umbraco 9 use version 9.0.x and above!** + +## Getting Started +The DateFolders package is also available via NuGet. Visit [The DateFolders package on NuGet](https://www.nuget.org/packages/Infocaster.Umbraco.DateFolders/). +After installing the package, just complete the configuration steps below and you'll be good to go! + +## Behavior - When you create a document with doctype "itemDocType", this package will automatically create year/month/day folders for it - When you edit the "itemDateProperty", the document is automatically moved to the correct year/month/day folder - Automatically cleans up empty year, month and day folders - Orders the items in the year, month and dayfolders by "itemDateProperty" with every action ## Configuration -Add these keys/values to your appsettings.json in a new section: - -
+```json
 "DateFolders": {
-    "ItemDateProperty":  "",            // the property of the itemDocType to read the date from (e.g. "startDate") (don't add this key if you just want to use the document's create date)
-    "CreateDayFolders": false,          // boolean indicating whether or not day folders should be created
-    "OrderByDescending": true,          // boolean indicating sort order for date folders (default: false)
-    "FolderDocType": "dateFolder",      // the doctype to use for creating the year/month/day folders (e.g "DateFolder")
-    "ItemDocTypes": [ "contentPage" ]   // the doctype alias to create datefolders for (e.g. "newsItem") - multiple doctype aliases are allowed
+    "ItemDateProperty":  "",            
+    "CreateDayFolders": false,          
+    "OrderByDescending": true,          
+    "FolderDocType": "dateFolder",      
+    "ItemDocTypes": [ "contentPage" ]   
 }
-
\ No newline at end of file +``` + +- **ItemDocTypes** | The doctype alias to create datefolders for. (e.g. "contentPage") - comma separated values are allowed for multiple doctype aliases +- **ItemDateProperty** | The property of the itemDocType to read the date from. (e.g. "startDate") (don't add this key if you just want to use the document's create date) +- **DateFolderDocType** | The doctype to use for creating the year/month/day folders. (e.g "DateFolder") +- **CreateDayFolders** | Boolean indicating whether or not day folders should be created, if false only years and months are created. +- **OrderByDecending** | Boolean indicating sort order for date folders (default: false) + +## Credits ## +The Support Module is made by Infocaster, a Dutch company dedicated to improving your Umbraco experience. + +## Changelog +Version 9.0.0 +- Updated to use umbraco v9. + +Version 3.0.0 +- Updated to use umbraco v8. + +Version 2.1.2 +- Fixed nested date folders. +- Fix to sort + +Version 2.1.1 +- Fixed cast error when using Date picker with DB type date. + +Version 2.1 +- Removed legacy configuration settings +- Added datefolders:OrderByDecending +- Implemented fix for 'Publish At' given by - Wayne Godfrey +- Refactored to reduce code complexity + +Version 2.0.1 +- Fix to order by child name + +Version 2.0 +- Updated to use umbraco v6 api. +- Fixed ordering to handle non date folders. + +Version 1.4 +- Removed Threading (Threading can cause the back-end to be out-of-sync, therefore removed) +- Changed configuration keys, added prefix (legacy still works) +- Added day folders feature (configurable, off by default) +- Fixed silly order by hard-coded propertyAlias bug + +Version 1.3 +- Better exception handling (speechbubble) +- Exception get's handled when the datefoler document type doesn't exist +- Month folders are now named with a leading zero if the month number is a single number (01, 02 etc.) +- Exception get's handled when a date item is created under the 'Content' root node + +Version 1.2 +- Support for multiple docTypes (comma separated) + +Version 1.1 +- Tree get's synced automatically + + + + \ No newline at end of file diff --git a/ReadMe.txt b/ReadMe.txt index ab458e6..a6b262d 100644 --- a/ReadMe.txt +++ b/ReadMe.txt @@ -1,4 +1,3 @@ - _____ _ __ _ _ | __ \ | | / _| | | | | | | | | __ _| |_ ___ | |_ ___ | | __| | ___ _ __ ___ @@ -7,18 +6,24 @@ |_____/ \__,_|\__\___| |_| \___/|_|\__,_|\___|_| |___/ ------------------------------------------------------------------ +======================================================== Add the following configuration to your appsettings.json file: "DateFolders": { - "ItemDateProperty": "", // the property of the itemDocType to read the date from (e.g. "startDate") (don't add this key if you just want to use the document's create date) - "CreateDayFolders": false, // boolean indicating whether or not day folders should be created - "OrderByDescending": true, // boolean indicating sort order for date folders (default: false) - "FolderDocType": "dateFolder", // the doctype to use for creating the year/month/day folders (e.g "DateFolder") - "ItemDocTypes": [ "contentPage" ] // the doctype alias to create datefolders for (e.g. "newsItem") - multiple doctype aliases are allowed + "ItemDateProperty": "", + "CreateDayFolders": false, + "OrderByDescending": true, + "FolderDocType": "dateFolder", + "ItemDocTypes": [ "contentPage" ] } ------------------------------------------------------------------ +ItemDocType | The doctype alias to create datefolders for. (e.g. "contentPage") - comma separated values are allowed for multiple doctype aliases +ItemDateProperty | The property of the itemDocType to read the date from. (e.g. "startDate") (don't add this key if you just want to use the document's create date) +DateFolderDocType | The doctype to use for creating the year/month/day folders. (e.g "DateFolder") +CreateDayFolders | Boolean indicating whether or not day folders should be created, if false only years and months are created. +OrderByDecending | Boolean indicating sort order for date folders (default: false) -More information: https://our.umbraco.com/packages/developer-tools/datefolders/ \ No newline at end of file +For more information, check out the links below: +Github - https://github.com/Infocaster/Datefolders +Our Umbraco - https://our.umbraco.com/packages/developer-tools/datefolders \ No newline at end of file diff --git a/docs/assets/Infocaster_Corner.png b/docs/assets/Infocaster_Corner.png new file mode 100644 index 0000000..4d401d4 Binary files /dev/null and b/docs/assets/Infocaster_Corner.png differ diff --git a/docs/assets/infocaster_nuget_pink.png b/docs/assets/infocaster_nuget_pink.png new file mode 100644 index 0000000..122cc26 Binary files /dev/null and b/docs/assets/infocaster_nuget_pink.png differ diff --git a/docs/assets/infocaster_nuget_pink.svg b/docs/assets/infocaster_nuget_pink.svg new file mode 100644 index 0000000..49313af --- /dev/null +++ b/docs/assets/infocaster_nuget_pink.svg @@ -0,0 +1,66 @@ + + + + + + + + + + diff --git a/docs/assets/infocaster_nuget_yellow.png b/docs/assets/infocaster_nuget_yellow.png new file mode 100644 index 0000000..e4a6f11 Binary files /dev/null and b/docs/assets/infocaster_nuget_yellow.png differ diff --git a/docs/assets/infocaster_nuget_yellow.svg b/docs/assets/infocaster_nuget_yellow.svg new file mode 100644 index 0000000..e2f462d --- /dev/null +++ b/docs/assets/infocaster_nuget_yellow.svg @@ -0,0 +1,66 @@ + + + + + + + + + +