Skip to content

Commit

Permalink
Merge pull request #10 from esdete2/bugfix/LinkedData
Browse files Browse the repository at this point in the history
BUGFIX & IMPROVEMENTS: 

**TechDivision.Jobs:JobPostingMixin**
- description 
-- Remove strip tags because html is allowed 
-- Remove cropping because its used as content of google jobs postings
- hiringOrganization
-- Use linkedData of JobOrganization
- employmentType
-- Fix eel expression
- validThrough
-- Remove NotEmptyValidator because this option is not required for google jobs

**TechDivision.Jobs:JobOrganization**
- Resolve image uri of organizationLogo for linked data

Thanks @esdete2 for the pull request.
  • Loading branch information
SimonPaidla authored Nov 16, 2023
2 parents a5057c3 + 860ba25 commit 500596e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
4 changes: 3 additions & 1 deletion Configuration/NodeTypes.Content.JobOrganization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@
options:
TtreeLinkedData:Generator:
default:
context:
organizationLogo: "${q(node).property('jobPostingHiringOrganizationLogo')}"
fragment:
'@context': http://schema.org
'@type': Organization
name: "${q(node).property('jobPostingHiringOrganizationName')}"
logo: "${q(node).property('jobPostingHiringOrganizationLogo')}"
logo: "${organizationLogo && Neos.Link.resolveAssetUri('asset://' + organizationLogo.identifier)}"
properties:
jobPostingHiringOrganizationName:
type: string
Expand Down
14 changes: 5 additions & 9 deletions Configuration/NodeTypes.Mixin.JobPostingMixin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,19 @@
'@context': http://schema.org
'@type': JobPosting
title: "${q(node).property('jobPostingTitle')}"
description: "${String.stripTags(String.cropAtSentence(q(node).property('jobPostingDescription'), 180, '...'))}"
description: "${q(node).property('jobPostingDescription')}"
datePosted: "${Date.format(node.creationDateTime, 'Y-m-d')}"
hiringOrganization:
'@type': Organization
name: "${q(jobOrganization).property('jobPostingHiringOrganizationName')}"
jobLocation: "${nextJobLocation ? LinkedData.List(nextJobLocation, preset, false) : null}"
hiringOrganization: "${jobOrganization && LinkedData.item(jobOrganization, preset, false)}"
jobLocation: "${nextJobLocation && LinkedData.List(nextJobLocation, preset, false)}"
baseSalary:
'@type': MonetaryAmount
currency: "EUR"
value:
'@type': QuantitativeValue
value: "${q(node).property('jobPostingBaseSalary')}"
unitText: "YEAR"
employmentType: "Json.stringify(${q(node).property('jobPostingEmploymentType')})"
validThrough: "${Date.format(q(node).property('jobPostingValidThrough'), 'Y-m-d')}"
employmentType: "${Json.stringify(q(node).property('jobPostingEmploymentType'))}"
validThrough: "${q(node).property('jobPostingValidThrough') && Date.format(q(node).property('jobPostingValidThrough'), 'Y-m-d')}"
properties:
jobPostingTitle:
type: string
Expand Down Expand Up @@ -157,5 +155,3 @@
position: 'after jobPostingEemploymentType'
editorOptions:
format: 'Y-m-d'
validation:
'Neos.Neos/Validation/NotEmptyValidator': []

0 comments on commit 500596e

Please sign in to comment.