-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* GH-66 :: refactor to remove warnings: - prefer default values before nullable types in class properties - mark method parameters as nullable if we expect them to be null at any point - adjust references and provide fallback values in cases of null * GH-66 :: update readme proposal * Update README.md * Update README.md * Gh 69 add rfs and taxonomies/sb (#71) * GH-69 :: transfer types and changes from finished branch spike * GH-69 :: adjust cherry-picked code * GH-69 :: Transfer CI data for content items and pages * GH-69 :: add new content items * GH-69 :: content updates * GH-69 :: refactoring and renaming * GH-69 :: refactor, include nullable for featured article view model * GH-69 :: remove non-existant tag helper from article list widget * GH-69 :: update condition in article list widget * GH-69 :: remove unused code from content item retriever service, register generic version --------- Co-authored-by: Matthew Sandstrom <[email protected]>
- Loading branch information
1 parent
ac419f4
commit 66abb49
Showing
200 changed files
with
4,305 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,37 @@ | ||
# Xperience by Kentico Training Guides starter repository | ||
This repository is the starting point for the [Xperience by Kentico technical Training Guides](https://docs.kentico.com/guides/development). Use this branch to follow along with the training guides. | ||
|
||
The [finished branch](https://github.com/Kentico/xperience-by-kentico-training-guides/tree/finished) contains the cumulative results of the training guides, as well as some sample widgets and can be used for reference. As it contains several independent examples, it is not built comprehensively, and we recommend against using it as a boilerplate. | ||
This repository is the starting point for the [Xperience by Kentico technical Training Guides](https://docs.kentico.com/guides/development). Use this branch to follow along with the Training guides. | ||
|
||
The [finished branch](https://github.com/Kentico/xperience-by-kentico-training-guides/tree/finished) contains the cumulative results of the Training guides, as well as some sample widgets and can be used for reference. As it contains several independent examples, it is not built comprehensively, and we recommend against using it as a boilerplate. We continuously add new features to this repository as we create new Training guide materials. | ||
|
||
The goal of the [Training Guides](https://docs.kentico.com/guides/development) is to teach recommended development practices with Xperience by Kentico. | ||
However, keep in mind that the code in this repository is intended to be examined in the context of individual guides -- some aspects are simplified to keep attention on the main topic of the corresponding lesson. | ||
|
||
## Installation requirements | ||
|
||
- The database backup included in this repository requires SQL Server 2022 or newer. | ||
- If you are using an older version of SQL server, you can prepare a fresh database by installing a fresh instance of Xperience by Kentico version **29.2.0** | ||
- This repository targets the .NET 8 SDK. | ||
- If you are using a different .NET version, you can update the target framework in your solution. Note that the files in this repository use [C# 12 features and syntax](https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-12), some of which are not supported in lower versions. | ||
|
||
## Getting started | ||
|
||
1. Clone or download this repository to your development environment | ||
1. Open **`TrainingGuides.sln`** under the **src** folder and restore all NuGet packages. | ||
1. Restore **`Xperience.TrainingGuides.bak`** from the **Database** folder to your SQL server | ||
1. Update the connection string in the **`appsettings.json`** file under the **.\src\TrainingGuides.Web** folder to point to your newly restored database | ||
1. Run a [*Continuous integration restore*](https://docs.xperience.io/xp/developers-and-admins/ci-cd/continuous-integration#ContinuousIntegration-Restorerepositoryfilestothedatabase) to populate the database with the necessary data | ||
1. Clean and rebuild the solution | ||
1. Log in with the username **administrator** and the password **TrainingGuides123\*** | ||
|
||
## Contributing | ||
|
||
This repository is related to Training Guides for developers and has an educational purpose. For this reason, please do not submit ideas for new functionality. However, please do let us know if you encounter a bug that needs to be fixed, either by submitting an issue or contributing a fix directly. | ||
|
||
To see the guidelines for Contributing to Kentico open source software, please see [Kentico's `CONTRIBUTING.md`](https://github.com/Kentico/.github/blob/main/CONTRIBUTING.md) for more information and follow the [Kentico's `CODE_OF_CONDUCT`](https://github.com/Kentico/.github/blob/main/CODE_OF_CONDUCT.md). | ||
|
||
Instructions and technical details for contributing to **this** project can be found in [Contributing Setup](./docs/Contributing-Setup.md). | ||
|
||
## License | ||
|
||
Distributed under the MIT License. See [`LICENSE.md`](./LICENSE.md) for more information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# Contributing Setup | ||
|
||
## Required Software | ||
|
||
The requirements to setup, develop, and build this project are listed below. | ||
|
||
### .NET Runtime | ||
|
||
.NET SDK 8.0 or newer | ||
|
||
- <https://dotnet.microsoft.com/en-us/download/dotnet/8.0> | ||
- See `global.json` file for specific SDK requirements | ||
|
||
### Node.js Runtime | ||
|
||
- [Node.js](https://nodejs.org/en/download) 20.10.0 or newer | ||
- [NVM for Windows](https://github.com/coreybutler/nvm-windows) to manage multiple installed versions of Node.js | ||
- See `engines` in the solution `package.json` for specific version requirements | ||
|
||
### C# Editor | ||
|
||
- VS Code | ||
- Visual Studio | ||
- Rider | ||
|
||
### Database | ||
|
||
SQL Server 2022 or newer compatible database | ||
|
||
- [SQL Server Linux](https://learn.microsoft.com/en-us/sql/linux/sql-server-linux-setup?view=sql-server-ver16) | ||
- [Azure SQL Edge](https://learn.microsoft.com/en-us/azure/azure-sql-edge/disconnected-deployment) | ||
|
||
### SQL Editor | ||
|
||
- MS SQL Server Management Studio | ||
- Azure Data Studio | ||
|
||
## Development Workflow | ||
|
||
1. Create a new branch with one of the following prefixes | ||
|
||
- `refactor/` - for restructuring of existing features | ||
- `fix/` - for bugfixes | ||
|
||
1. Commit changes, with a commit message preferably following the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/#summary) convention. | ||
|
||
1. Once ready, create a PR on GitHub. The PR will need to have all comments resolved and all tests passing before it will be merged. | ||
|
||
- The PR should have a helpful description of the scope of changes being contributed. | ||
- Include screenshots or video to reflect UX or UI updates | ||
- Indicate if new settings need to be applied when the changes are merged - locally or in other environments |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
72 changes: 72 additions & 0 deletions
72
src/TrainingGuides.Entities/ReusableContentTypes/GeneralArticle/GeneralArticle.generated.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
//-------------------------------------------------------------------------------------------------- | ||
// <auto-generated> | ||
// | ||
// This code was generated by code generator tool. | ||
// | ||
// To customize the code use your own partial class. For more info about how to use and customize | ||
// the generated code see the documentation at https://docs.xperience.io/. | ||
// | ||
// </auto-generated> | ||
//-------------------------------------------------------------------------------------------------- | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using CMS.ContentEngine; | ||
|
||
namespace TrainingGuides | ||
{ | ||
/// <summary> | ||
/// Represents a content item of type <see cref="GeneralArticle"/>. | ||
/// </summary> | ||
[RegisterContentTypeMapping(CONTENT_TYPE_NAME)] | ||
public partial class GeneralArticle : IContentItemFieldsSource, IArticleSchema | ||
{ | ||
/// <summary> | ||
/// Code name of the content type. | ||
/// </summary> | ||
public const string CONTENT_TYPE_NAME = "TrainingGuides.GeneralArticle"; | ||
|
||
|
||
/// <summary> | ||
/// Represents system properties for a content item. | ||
/// </summary> | ||
[SystemField] | ||
public ContentItemFields SystemFields { get; set; } | ||
|
||
|
||
/// <summary> | ||
/// ArticleSchemaTitle. | ||
/// </summary> | ||
public string ArticleSchemaTitle { get; set; } | ||
|
||
|
||
/// <summary> | ||
/// ArticleSchemaTeaser. | ||
/// </summary> | ||
public IEnumerable<Asset> ArticleSchemaTeaser { get; set; } | ||
|
||
|
||
/// <summary> | ||
/// ArticleSchemaSummary. | ||
/// </summary> | ||
public string ArticleSchemaSummary { get; set; } | ||
|
||
|
||
/// <summary> | ||
/// ArticleSchemaText. | ||
/// </summary> | ||
public string ArticleSchemaText { get; set; } | ||
|
||
|
||
/// <summary> | ||
/// ArticleSchemaRelatedArticles. | ||
/// </summary> | ||
public IEnumerable<Article> ArticleSchemaRelatedArticles { get; set; } | ||
|
||
|
||
/// <summary> | ||
/// ArticleSchemaCategory. | ||
/// </summary> | ||
public IEnumerable<TagReference> ArticleSchemaCategory { get; set; } | ||
} | ||
} |
78 changes: 78 additions & 0 deletions
78
src/TrainingGuides.Entities/ReusableContentTypes/Interview/Interview.generated.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
//-------------------------------------------------------------------------------------------------- | ||
// <auto-generated> | ||
// | ||
// This code was generated by code generator tool. | ||
// | ||
// To customize the code use your own partial class. For more info about how to use and customize | ||
// the generated code see the documentation at https://docs.xperience.io/. | ||
// | ||
// </auto-generated> | ||
//-------------------------------------------------------------------------------------------------- | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using CMS.ContentEngine; | ||
|
||
namespace TrainingGuides | ||
{ | ||
/// <summary> | ||
/// Represents a content item of type <see cref="Interview"/>. | ||
/// </summary> | ||
[RegisterContentTypeMapping(CONTENT_TYPE_NAME)] | ||
public partial class Interview : IContentItemFieldsSource, IArticleSchema | ||
{ | ||
/// <summary> | ||
/// Code name of the content type. | ||
/// </summary> | ||
public const string CONTENT_TYPE_NAME = "TrainingGuides.Interview"; | ||
|
||
|
||
/// <summary> | ||
/// Represents system properties for a content item. | ||
/// </summary> | ||
[SystemField] | ||
public ContentItemFields SystemFields { get; set; } | ||
|
||
|
||
/// <summary> | ||
/// InterviewRespondantName. | ||
/// </summary> | ||
public string InterviewRespondantName { get; set; } | ||
|
||
|
||
/// <summary> | ||
/// ArticleSchemaTitle. | ||
/// </summary> | ||
public string ArticleSchemaTitle { get; set; } | ||
|
||
|
||
/// <summary> | ||
/// ArticleSchemaTeaser. | ||
/// </summary> | ||
public IEnumerable<Asset> ArticleSchemaTeaser { get; set; } | ||
|
||
|
||
/// <summary> | ||
/// ArticleSchemaSummary. | ||
/// </summary> | ||
public string ArticleSchemaSummary { get; set; } | ||
|
||
|
||
/// <summary> | ||
/// ArticleSchemaText. | ||
/// </summary> | ||
public string ArticleSchemaText { get; set; } | ||
|
||
|
||
/// <summary> | ||
/// ArticleSchemaRelatedArticles. | ||
/// </summary> | ||
public IEnumerable<Article> ArticleSchemaRelatedArticles { get; set; } | ||
|
||
|
||
/// <summary> | ||
/// ArticleSchemaCategory. | ||
/// </summary> | ||
public IEnumerable<TagReference> ArticleSchemaCategory { get; set; } | ||
} | ||
} |
64 changes: 64 additions & 0 deletions
64
src/TrainingGuides.Entities/ReusableFieldSchemas/ArticleSchema/IArticleSchema.generated.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
//-------------------------------------------------------------------------------------------------- | ||
// <auto-generated> | ||
// | ||
// This code was generated by code generator tool. | ||
// | ||
// To customize the code use your own partial class. For more info about how to use and customize | ||
// the generated code see the documentation at https://docs.xperience.io/. | ||
// | ||
// </auto-generated> | ||
//-------------------------------------------------------------------------------------------------- | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using CMS.ContentEngine; | ||
|
||
namespace TrainingGuides | ||
{ | ||
/// <summary> | ||
/// Defines a contract for content types with the <see cref="IArticleSchema"/> reusable schema assigned. | ||
/// </summary> | ||
public interface IArticleSchema | ||
{ | ||
/// <summary> | ||
/// Code name of the reusable field schema. | ||
/// </summary> | ||
public const string REUSABLE_FIELD_SCHEMA_NAME = "ArticleSchema"; | ||
|
||
|
||
/// <summary> | ||
/// ArticleSchemaTitle. | ||
/// </summary> | ||
public string ArticleSchemaTitle { get; set; } | ||
|
||
|
||
/// <summary> | ||
/// ArticleSchemaTeaser. | ||
/// </summary> | ||
public IEnumerable<Asset> ArticleSchemaTeaser { get; set; } | ||
|
||
|
||
/// <summary> | ||
/// ArticleSchemaSummary. | ||
/// </summary> | ||
public string ArticleSchemaSummary { get; set; } | ||
|
||
|
||
/// <summary> | ||
/// ArticleSchemaText. | ||
/// </summary> | ||
public string ArticleSchemaText { get; set; } | ||
|
||
|
||
/// <summary> | ||
/// ArticleSchemaRelatedArticles. | ||
/// </summary> | ||
public IEnumerable<Article> ArticleSchemaRelatedArticles { get; set; } | ||
|
||
|
||
/// <summary> | ||
/// ArticleSchemaCategory. | ||
/// </summary> | ||
public IEnumerable<TagReference> ArticleSchemaCategory { get; set; } | ||
} | ||
} |
Oops, something went wrong.