Tailwind Logo

Update sample repositories -sitecoredemo-jp

Headless SXAXM Cloud

Published: 2024-10-02

Yesterday, I introduced the procedure for dealing with the new repository type, and I have also published a sample code that I have applied to the sample code on my blog. In this article, I will show you how to use it.

Regarding new repositories

Yesterday, we introduced the changes regarding the Next.js Starter Kit in the following blog post.

In addition to the changes to the multilingual component that we have been blogging about, we have created a new branch for the existing repository and released it as the current, up-to-date version.

The usage of the new repository is as follows

Docker-related processes

First of all, we need to set up the necessary parameters before starting Docker. Since all items are under the local-containers path, you will need to add a path to work with, unlike in the past. Please start a terminal where you can use administrative privileges and initialize the license file and password as shown below.

PowerShell
.\local-containers\scripts\init.ps1 -InitEnv -LicenseXmlPath "C:\projects\license\license.xml" -AdminPassword "DesiredAdminPassword"

Then, use the following command to start up the system.

powershell .\local-containers\scripts\up.ps1

When executing commands such as docker compose, it is convenient to move to local-containers and work with it.

Docker initialization

The above command will start Docker as before, but if you want to initialize the environment, the procedure is as follows.

PowerShell
docker compose down
docker\clean.ps1

All data that had been created will now be deleted and a clean environment will be deployed by running scripts\up.ps1 again.

Regarding Serialized Data

Data serialized by Sitecore CLI is included in the repository. In this case, there are two serialized json file definitions.

  • authoring\items\sites-init.module.json : Information on custom components and sites is available.
  • authoring\items\tailwindcss.module.json : It contains the first site created with Tailwind CSS.

By importing each of the data in turn, the site can be paired.

PowerShell
dotnet sitecore ser push -i sites-init
dotnet sitecore ser push -i tailwindcss

In the future, we would like to share the sample data serialized in tailwindcss.module.json in a separate repository, but for now, the site is still up and running with no content included.

Regarding Headapps

There are two projects available: a sample code and a tailwindcss project that I have prepared myself.

  • headapps\nextjs-starter
  • headapps\tailwindcss

The actual code used by Docker and XM Cloud is headapps\tailwindcss, and the nextjs-starter can be removed. The default code is only placed for convenience.

Summary

I have introduced a new branch of the code I have on hand regarding the project I introduced the other day. In the future, I would like to reflect it in the main branch and connect it to the sample site, but first, I have made it public as a repository of code under development.

Tags