Get frustrated with Schema.org’s JobPosting. I found Google Structured Data Testing Tool said:
100000 (The attribute baseSalary.itemtype has an invalid value.)
I have tried using this inside or outside of JobPosting as follows:
"#type":"MonetaryAmount",
"EmployeeRole":{
"baseSalary": "100000"
}
However, I found more than one problem.
<script type="application/ld+json">{
"#context": "http://schema.org",
"#type": "JobPosting",
"baseSalary":"100000",
"datePosted":"2017-06-18T15:14:57+00:00",
"validThrough":"2017-12-31T00:00:00+00:00",
"title":"Sales And Marketing Manager",
"description":"Responsible for Corporate and Travel Agent Room Sales for the hotel",
"educationRequirements":"S-1 Management",//educationRequirements
"employmentType":"Kontrak 1 Tahun",//employmentType
"experienceRequirements":"100 Tahun",//experienceRequirements
"industry":"Perpajakan Daerah Sumedang",//industry
"qualifications":"Single, Fresh Graduates dan suka ternak bebek",//qualifications
"responsibilities":"Tukang mbersihin kadang embek",//responsibilities
"skills":"Bisa menjahit, ngetik 40 jari",//skills
"workHours":"Jam 10 s/d 70",//workHours
"hiringOrganization":{
"#type":"Organization",
"name":"Equity Jimbaran Resort And Villa",
"sameAs":"http://equityhoteljimbaran.com",
"url":"http://equityhoteljimbaran.com"
},
"jobLocation":{
"#type":"Place",
"address":{
"#type":"PostalAddress",
"addressRegion":"Bali",
"addressCountry":"ID",
"streetAddress":"Jl.Muara 3, KM.18, Blok4, RT04/05, Tanjung Perak",//streetAddress
"addressLocality":"Jimbaran",//addressLocality
"postalCode":"56161"//postalCode
}
}
}
}
</script>
After long distance, finally, I find the solution:
<script type="application/ld+json">{
"#context": "http://schema.org",
"#type": "JobPosting",
"baseSalary":{
"#type":"MonetaryAmount",
"value":"100000",
"currency":"USD"
},
"datePosted":"2017-06-18T15:14:57+00:00",
"validThrough":"2017-12-31T00:00:00+00:00",
"title":"Sales And Marketing Manager",
"description":"Responsible for Corporate and Travel Agent Room Sales for the hotel",
"educationRequirements":"S-1 Management",//educationRequirements
"employmentType":"Kontrak 1 Tahun",//employmentType
"experienceRequirements":"100 Tahun",//experienceRequirements
"industry":"Perpajakan Daerah Sumedang",//industry
"qualifications":"Single, Fresh Graduates dan suka ternak bebek",//qualifications
"responsibilities":"Tukang mbersihin kadang embek",//responsibilities
"skills":"Bisa menjahit, ngetik 40 jari",//skills
"workHours":"Jam 10 s/d 70",//workHours
"hiringOrganization":{
"#type":"Organization",
"name":"Equity Jimbaran Resort And Villa",
"sameAs":"http://equityhoteljimbaran.com",
"url":"http://equityhoteljimbaran.com"
},
"jobLocation":{
"#type":"Place",
"address":{
"#type":"PostalAddress",
"addressRegion":"Bali",
"addressCountry":"ID",
"streetAddress":"Jl.Muara 3, KM.18, Blok4, RT04/05, Tanjung Perak",//streetAddress
"addressLocality":"Jimbaran",//addressLocality
"postalCode":"56161"//postalCode
}
}
}
}
</script>
From the structure data above,baseSalary expects type of MonetaryAmount, where the value is the amount of the salary, as follow:
"baseSalary":{
"#type":"MonetaryAmount",
"value":"100000",
},
However, when the baseSalary has been added and verified, Google, again, gave me error in currency which I placed it inside baseSalary:
"baseSalary":{
"#type":"MonetaryAmount",
"value":"100000",
"currency":"USD"
},
Done successfully.
This is an answer to #huykon225 question about microdata above, because I can't find that this question is answered in microdata context anywhere although the internet is full of corrected versions of json. Frustrated me, just took an hour or more to sort it...
Replace this in the original code:
<span itemprop="salaryCurrency">USD</span> <span itemprop="baseSalary">100000</span>
With this:
<div itemprop="baseSalary" itemscope="" itemtype="https://schema.org/MonetaryAmount">
<span itemprop="currency">USD</span>
<span itemprop="value">100000</span>
</div>
Related
A Docusaurus documentation website: https://slovakia-atmo-plan.marvintest.vito.be/docs/ is rendered in Docs only mode.
The Algolia Docsearch scraper is not scraping root level pages, instead it logs Ignored: from start url. This issue only seems to arise when the Docusaurus build is nested under {baseUrl}/docs.
Why is this being ignored? This is my docsearch config:
{
"index_name": "atmoplan-documentation",
"start_urls": ["https://slovakia-atmo-plan.marvintest.vito.be/docs"],
"sitemap_urls": ["https://slovakia-atmo-plan.marvintest.vito.be/docs/sitemap.xml"],
"sitemap_alternate_links": true,
"stop_urls": ["/tests"],
"selectors": {
"lvl0": {
"selector": "(//ul[contains(#class,'menu__list')]//a[contains(#class, 'menu__link menu__link--sublist menu__link--active')]/text() | //nav[contains(#class, 'navbar')]//a[contains(#class, 'navbar__link--active')]/text())[last()]",
"type": "xpath",
"global": true,
"default_value": "Documentation"
},
"lvl1": "header h1",
"lvl2": "article h2",
"lvl3": "article h3",
"lvl4": "article h4",
"lvl5": "article h5, article td:first-child",
"lvl6": "article h6",
"text": "article p, article li, article td:last-child"
},
"strip_chars": " .,;:#",
"custom_settings": {
"separatorsToIndex": "_",
"attributesForFaceting": ["language", "version", "type", "docusaurus_tag"],
"attributesToRetrieve": ["hierarchy", "content", "anchor", "url", "url_without_anchor", "type"]
},
"conversation_id": ["833762294"],
"nb_hits": 46250
}
Inside your docusaurus.config.js you should set the url parameter with the actual website where you will be hosting your docs. Something like:
module.exports = {
url: 'https://slovakia-atmo-plan.marvintest.vito.be/docs',
[…]
}
This will be used by your docusaurus to generate the sitemap.xml, used by algolia to locate your pages.
REFERENCE: https://docusaurus.io/docs/docusaurus.config.js/#url
DISCLAIMER
I noted something strange inside your sitemap.xml. For example the first link was https://www.vito.be/docs/markdown-page, but defined URL for Algolia is https://slovakia-atmo-plan.marvintest.vito.be/docs.
I usually declare all standard libraries that the application depends on in the manifest under sap.ui5/dependencies/libs.
Now what should I put in the bootstrap argument data-sap-ui-libs, the same libraries? What are the effects if I put less / more in data-sap-ui-libs? How do they differ?
PS. I couldn't find this in SAP's documentation, but please proof me wrong. :-)
The bootstrapping (data-sap-ui-libs) is done in the index.html. It only needs to contain the libs which are referenced in the index.html.
If your code looks like this:
new sap.m.Shell({
app: new sap.ui.core.ComponentContainer({
name: "my.namespace.app",
height: "100%"
})
}).placeAt("content");
Then you should require the following libs:
data-sap-ui-libs="sap.m, sap.ui.core"
If your code looks like this:
sap.ui.require([
"sap/m/Shell",
"sap/ui/core/ComponentContainer"
], function(Shell, ComponentContainer) {
new Shell({
app: new ComponentContainer({
name: "my.namespace.app",
height: "100%"
})
}).placeAt("content");
});
You don't need to require anything (but it may affect loading time of your app).
All libraries that are used in the views should be required in the manifest.json. So if you use sap.m in your app you should require it in your manifest.json, even if you've already required it in the index.html.
This is because the Component.js and the manifest.json are the default entry points for an app and the index.html ist just a wrapper for standalone apps outside of a Fiori Launchpad.
What are the effects if I put less/more in data-sap-ui-libs? How do they differ?
My recommendation is to remove data-sap-ui-libs from index.html altogether. Especially if the app is dealing with OData, it's important to retrieve the $metadata document as early as possible. See the example below:
In index.html
<head>
<script id="sap-ui-bootstrap"
src="https://ui5.sap.com/<version>/resources/sap-ui-core.js"
data-sap-ui-theme="sap_horizon"
data-sap-ui-oninit="module:sap/ui/core/ComponentSupport"
data-sap-ui-async="true"
data-sap-ui-compatversion="edge"
data-sap-ui-excludejquerycompat="true"
data-sap-ui-resourceroots='{ "demo": "./" }'
data-sap-ui-xx-waitfortheme="init"
></script><!-- No data-sap-ui-lib -->
</head>
<body id="content" class="sapUiBody">
<div style="height: 100%"
data-sap-ui-component
data-name="demo"
data-height="100%"
></div>
</body>
In manifest.json
{
"sap.app": {
"dataSources": {
"myODataSource": {
"uri": "/odata_org/V2/Northwind/Northwind.svc/",
"type": "OData",
"settings": {
"odataVersion": "2.0",
"localUri": "model/metadata.xml",
"annotations": [
"annotation0"
]
}
},
"annotation0": {
"type": "ODataAnnotation",
"uri": "annotation/annotation0.xml",
"settings": {
"localUri": "annotation/annotation0.xml"
}
}
},
"...": "..."
},
"sap.ui5": {
"dependencies": {
"minUI5Version": "1.108.4",
"libs": {
"sap.ui.core": {},
"sap.m": {},
"sap.ui.table": {},
"sap.ui.unified": {}
}
},
"models": {
"": {
"dataSource": "myODataSource",
"settings": {
"preliminaryContext": true,
"tokenHandling": false
},
"preload": true
}
},
"...": "..."
},
"...": "..."
}
Result
As you can see, the $metadata document is being fetched in parallel with the control libraries. This ensures that entities can be requested right away (e.g. in $batch) as soon as the libs are loaded. If libs were declared in data-sap-ui-libs, they'd be loading first, then the $metadata, and then the entities which creates an unnecessary bottleneck.
But even without considering OData, I noticed the page gets already a bit faster when the libs are removed from data-sap-ui-libs. In general, try different approaches and do performance measurements, in addition to documented performance guidelines, and regardless of what people say (including me).
TL;DR
Use data-sap-ui-libs only if:
The app has no Component.js at all.
Modules from libraries other than sap.ui.core are accessed before creating the component (E.g. instantiating sap.m.Shell as a shell for the ComponentContainer)
Otherwise, remove data-sap-ui-libs altogether and maintain /sap.ui5/dependencies/libs only - Especially if the app is supposed to be launched from an app container such as SAP Fiori launchpad (FLP) which skips loading index.html altogether.
See also What happens if a library preload file / library dependencies is not updated in the UI5-manifest?
I would kept them declared on the manifest.
By declaring them on your .html file under the data-sap-ui-libs, you are basically requiring those dependencies right after the UI5 lib is loaded - even before your component is loaded.
By declaring them on your manifest, you are declaring the dependencies for your own component. So, those dependencies are only loaded before the initialization of your component.
As the component should be isolated, you component should not expect to be always used in a standalone mode.
I'm at a loss with the documentation here.
I'm trying to create a basic hello world email template, with some simple email substitutions - and I can't work out the syntax.
The documentation here suggests using a -igetreplaced- syntax, and gives the following example:
<html>
<head></head>
<body>
<p>Hello -name-,<br>
Thank you for your interest in our products. I have set up an appointment to call you at -time- EST to discuss your needs in more detail. If you would like to reschedule this call, please visit the following link: `reschedule`
Regards,
-salesContact-
-contactPhoneNumber-<br>
</p>
</body>
</html>
An accompanying SMTP API JSON header might look something like this:
{
"to": [
"example#example.com",
"example#example.com"
],
"sub": {
"-name-": [
"John",
"Jane"
],
"-customerID-": [
"1234",
"5678"
],
"-salesContact-": [
"Jared",
"Ben"
],
"-contactPhoneNumber-": [
"555.555.5555",
"777.777.7777"
],
"-time-": [
"3:00pm",
"5:15pm"
]
}
}
I've tried pasting these in to the template code editor, but it doesn't work.
Can someone point me to the right documentation for getting the syntax correct?
The syntax is Handlebars.
Use it like this:
Hello {{name}}
with data:
{
"name": "Bob"
}
Hi This is all out of my league so I could do with some help with this.
I have a simple website that uses paypal as the means of payment, but all payment will be different. With the below code if I have a fixed number it works fine but as mentioned it will be a different amount each time. I am using classic asp and the session to help with the variable but it's not working.
In my ASP page I have a simple test code:
<script src="https://www.paypalobjects.com/api/checkout.js"></script>
Session("pay") = "1.00"
<div id="paypal-button-container" style="float: right;" style="width: 50%"></div>
and in the JS file
return actions.payment.create({
payment: {
transactions: [
{
amount: { total: '<%=Session("pay")%>', currency: 'GBP' }
}
]
},
We are looking at using Silverstripe CMS and want to be able to have modules which can be reordered.
We have come from a Wordpress setup and mostly use the flexible content ACF field. Modules (e.g. text, masthead or video) need to be able to be re-ordered.
We use our CMS's as an API so these modules are output as a section to the page or post:
[
{
"id": 10,
"title": "Post title",
"slug": "post_slug",
"path": "/post_slug",
"template": "campaign",
"published": "2017-05-25 06:09:36",
"image": null,
"seo": {
"title": "",
"description": "",
"image": {
},
},
"sections": [
{
"type": "masthead",
"Title": "",
"video": false,
"image": [
],
"showCta": false,
"cta": [
]
},
{
"type": "video_text",
"video_text": [
{
"type": "video",
"video_url": "https://www.youtube.com/watch?v=asdfa",
"video_length": "07:38",
"video_preview": false
},
{
"type": "text",
"title": "Video Title",
"content": "Video text content",
"call_to_action": false,
"cta": [
]
}
]
},
{
"type": "text",
"title": "Text Title",
"content": "",
"alignment": "centre",
"call_to_action": false,
"cta": {
"text": "CTA button",
"link_type": "internal_link",
"internal_link": "about",
"external_link": "",
"section_id": [
]
}
},
]
}
]
Does Silverstripe have it's own way of handling modules / do I need to ditch this flexible content modules method? How do others handle flexible content modules in Silverstripe?
Both silverstripe-blocks and silverstripe-elemental works very well in their own regard but I don't think they will achieve what you want. These modules don't really give you the power to use pre-defined templates. You can hook the templates in but the code will be massive. I not sure if there is an open source module for that yet.
From your JSON code, in order to have those Sections to render something like this below;
<section id="Sections">
<div id="video_text" class="section">
<iframe width="560" height="315" src="https://www.youtube.com/watch?v=asdfa" frameborder="0" allowfullscreen></iframe>
</section>
<div id="text" class="section">
<h2>Text Title</h2>
<a class='text-center btn btn-default' href="/about/">CTA button</a>
</section>
</sections>
You might want to do this.
Use DataObjects (DO) for you Sections, easy for re-ordering.
Create an abstract DO, BlockSection, with fields like Title(Varchar), Content(HTMLText), Sort(Int) and most importantly has_one to Page.
For the video use can name the DO VideoBlockSection and it extends BlockSection,
TextBlockSection for the other one. Don't forget the $singular_name for each DO (useful for nice class naming in the Grid)
On Page getCMSFields add the Grid to manage the Sections. You need to add GridFieldSortableRows and GridFieldAddNewMultiClass and now you can add you Section on each Page.
Add has_many from Page to BlockSection and a method that will render the Blocks and outputs the html.
Page.php
private static $has_many = array(
"Sections" => "BlockSection",
);
function SectionContent()
$aContent = ArrayList::create();
$oSections = $this->Sections();
if (count($oSections )) {
foreach ( $oSections as $oSection ) {
$aContent->push(ArrayData::create([
"Section" => $oSection,
"Content" => $oSection->renderWith([$oSection->ClassName, get_parent_class($oSection)]),
]));
}
}
return $aContent;
For the VideoBlockSection the template array list will be VideoBlockSection and BlockSection
VideoBlockSection.ss
<div id="video_text_{$ID}" class="section">
<iframe width="560" height="315" src="{$URL}" frameborder="0" allowfullscreen></iframe>
</section>
In you specific case, because you are using an API you need to use a wrapper to render the Template.
It needs to match [section][type] to a Template (renderWith) video_text to VideoBlockSection
Lastly in Page.ss
<% loop $SectionContent %>
{$Content}
<% end_loop %>
This was a proof of concept but its working for me so refactoring, speed and memory usage was not considered (but its working).
This way I had to ditch the unnecessary so called "page types" which I find not to be reusable in most cases.
This works 100% for me and I use it together with Bootstrap 3. I use it to create CTAs, parallax scroll, Google Map Section (multiple maps on one page), Thumbnails. Specify image resize method (Cropped, ByWidth, ByHeight).
DO NOT ditch that flexible content modules method.
I am working on an open source module which works with SS4 and Bootstrap 4 (with possibilities of using any other html framework)