Skip to content

garpunkal/Umbraco-Headless-Sandbox

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Umbraco Headless Sandbox

Umbraco Headless Sandbox

Credentials

Umbraco

username admin@umbraco.com
password HG8GrrELDKy3TqVOUcjE!

Notes

Uses Vercel for hosting, so the output is vercel adapter. This can be changed by changing or removing the astro adapter

Outstanding

  • Search minimal API
  • Sitemap optimisation? API for sitemap rather than recursive calls to cd API?
  • Sitemap xml for SSR? - potentially adding custom pages to the integration from api
  • Meta Data population
  • More filters for hideOnSitemap, hideInNavigation

Usage

use node 20.x (I'm using: 20.11.1).

nvm install 20.11.1
nvm use 20.11.1

use yarn:

npm install yarn -g

Umbraco

Umbraco must be running for the routes to build statically on the frontend client.

cd src
cd UmbracoHeadlessSandbox.umbraco
dotnet run

Frontend

cd src
cd UmbracoHeadlessSandbox.frontend
yarn start 

Once started, you might have a prompt to install an SSL certificate, accept the prompt.

Generate new TypeScript models

Only generate when document types / media types are updated in Umbraco.

yarn generate 

.env variables

.env.development

IMAGE_BASE_URL=https://localhost:44335
API_BASE_URL=https://localhost:44335
UMBRACO_API_KEY='6536e4ec-cba3-4411-a21e-d933eb7dcc23'
UMBRACO_PREVIEW=true
DISABLE_SSR=true  
NODE_ENV=development
NODE_TLS_REJECT_UNAUTHORIZED=0

Limitations on Content Delivery API

https://docs.umbraco.com/umbraco-cms/reference/content-delivery-api#current-limitations

Languages

  • TypeScript 53.2%
  • C# 27.2%
  • Astro 9.3%
  • HTML 5.0%
  • JavaScript 2.9%
  • CSS 2.4%