I have _data/navigation.yml file that looks like
main:
- title: email
url: mailto:hardcoded#email.sop
The problem is that Idk how to reuse email variable from the _config.yml in the _data/navigation.yml file.
Here is part of my _configl.yml
title: title configured
email: configured#email.sop
I've tried to adjust the _data/navigation.yml file like below
main:
- title: email
url: mailto:{{ site.email }}
but the navigation link is generated like mailto:{{%20site.email%20}}
I suppose it should be mailto:configured#email.sop as any other .md page output has.
(this is Jekyll 4.2.0 site is using the
minimal-mistake
theme)
Related
I have several collections with my Netlify CMS site, all worked fine, but needed to add a new one which is not working on the live site.
I’ve added a new collection to the config file, which works flawlessly in a local environment (I can see the content of the folder referenced in the CMS, all entries are editable, I can create new ones or delete them) but this new collection shows up empty in the live environment - no entries are visible in the live CMS.
I got no error in the console, no build errors either.
I’ve tried to create an entry on the live site, which shows up in the CMS, but not on the site itself, and when I pull it, the newly created page/.md is not getting added to the folder where the other entries are - cannot be found locally.
The site itself displays the content of the folder - all articles show up on the site that were visible in the local CMS environment.
The newly created collection is a copy of a working one (tried it multiple times with different naming) and no matter how I renamed it, each try produced the same result - shows up locally, not in the live CMS.
Any ideas what should I do to display the content of the folder in the live CMS?
a trimmed version of the config file:
backend:
name: git-gateway
branch: main
media_folder: "public/logos"
public_folder: "/logos"
logo_url: "/img/cb_logo.svg"
local_backend: true
collections:
- name: "review"
editor:
preview: false
label: "Reviews"
folder: "src/review"
create: true
slug: "{{slug}}"
fields:
- {label: "Page Title", name: "pagetitle", widget: "string", hint: "Displayed in browser tabs", default: "placeholder text" }
- {label: "Page meta description", name: "pagemeta", widget: "string", required: false }
- name: "article"
editor:
preview: false
label: "Articles"
folder: "src/article"
create: true
slug: "{{slug}}"
fields:
- {label: "Title for Page URL", name: "title", widget: "string", default: "url-friendly-text" }
- {label: "Page Title", name: "pagetitle", widget: "string", default: "placeholder text" }
"Articles" is the one that shows as an empty collection on the live site.
The project folder structure:
src/
_data/
_includes/
assets/
article/
review/
I'm trying to enable i18n json files with SSR on assets folder following this docs:
https://sap.github.io/spartacus-docs/i18n/
But when enabled, all files in PT folder results 404 error.
Here's my provideConfig on spartacus-configuration.module.ts file:
and my assets folder:
Thanks for your time, have a nice day!
Looks like it's trying to load a bunch of json files that aren't in your directories.
What I did on mine was I provided original Spartacus translations then I added mine below that:
provideConfig(<I18nConfig>{
i18n: {
resources: translations,
chunks: translationChunksConfig,
fallbackLang: 'en'
},
}),
provideConfig(<I18nConfig>{
i18n: {
backend: {
loadPath: 'assets/i18n-assets/{{lng}}/{{ns}}.json',
chunks: {
footer: ['footer']
}
}
},
})
otherwise, you can try to add those files its complaining about (orderApproval.json, savedCart.json, etc) to your 'pt' folder (not sure what language that is but perhaps Spartacus doesn't come with translations for it)
I have created a Prestashop child theme to a theme I purchased.
I can see my child theme (once enabled), but every time I visit the theme page to switch themes I get a 500 error.
The way I get around this is to change my child theme's config/theme.yml file. This is what I have normally which gives me the 500 error:
parent: parent-theme
name: My Child Theme
display_name: Child Theme
version: 1.0.0
author:
name: "Me"
email: "email#email.com"
url: "domain.com"
assets:
use_parent_assets: true
css:
all:
- id: theme-custom
path: assets/css/custom.css
media: all
priority: 1000
js:
all:
- id: theme-custom
path: assets/js/custom.js
priority: 1000
position: bottom
And this is what I need to have in the confog/theme.yml file in order to NOT get the 500 error:
parent: parent-theme
name: My Child Theme
display_name: Child Theme
version: 1.0.0
author:
name: "Me"
email: "email#email.com"
url: "domain.com"
assets:
use_parent_assets: true
What is it about the lines starting with css: and below that is causing this issue? Does the – id: need to be a reference to something above it, or has to be theme-custom?
Any good tutorials / reference out there that you guys can point me to, to create a child theme the right way?
My Prestashop version is 1.7.3
Thanks.
You can read the complete guide how to achieve this on: https://devdocs.prestashop.com/1.7/themes/reference/template-inheritance/parent-child-feature/
But the code you will need use in the theme.yml file to use your custom styles/scripts files, here a complete example.
parent: classic
name: childtheme
display_name: My first child Theme
version: 1.0.0
assets:
use_parent_assets: true
css:
all:
- id: custom-lib-style
path: assets/css/custom-lib.css
js:
all:
- id: custom-lib-script
path: assets/js/custom-lib.js
PD. It's important keep the correct tabulation, otherwise could not works.
I'm new to bundlers and am currently learning about Fusebox. I really like it so far except that I can't figure out how to use it for a multi-page project. So far I've only been able to find a tutorial on how to do this using webpack, not for fusebox.
Input files in src folder:
index.html
index2.html
index.ts
Desired output in dist folder:
app.js
vendor.js
index.html
index2.html
Actual output in dist folder:
app.js
vendor.js
index.html
Here is my config in the fuse.js file:
Sparky.task("config", () => {
fuse = FuseBox.init({
homeDir: "src",
output: "dist/$name.js",
hash: isProduction,
sourceMaps: !isProduction,
plugins: [
[SassPlugin(), CSSPlugin()],
CSSPlugin(),
WebIndexPlugin({
title: "Welcome to FuseBox index",
template: "src/index.html"
},
WebIndexPlugin({
title: "Welcome to FuseBox index2",
template: "src/index2.html"
},
isProduction && UglifyJSPlugin()
]
});
// vendor should come first
vendor = fuse.bundle("vendor")
.instructions("~ index.ts");
// out main bundle
app = fuse.bundle("app")
.instructions(`!> [index.ts]`);
if (!isProduction) {
fuse.dev();
}
});
Setting WebIndexPlugin twice within plugins doesn't work. What is the correct way to set up a multi-html page project with fusebox?
The WebIndexPlugin can not be configured, to output more than one html file.
But if you don't use a hash for the generated bundles (e.g.: output: "dist/$name.$hash.js"), you don't need the WebIndexPlugin -- you can remove it completly from the plugins option. Because you already know the names of the generated bundles (vendor.js and app.js) you can just include the following lines
<script src="vendor.js"></script>
<script src="app.js"></script>
instead of the placeholder $bundles.
If you want, that both html files are copied from your src directory into your dist directory, you can add the following lines to your fuse.js script:
const fs = require('fs-extra');
fs.copySync('src/index.html', 'dist/index.html');
fs.copySync('src/index2.html', 'dist/index2.html');
Note: Don't forget to add fs-extra:^5.0.0 to your package.json
Might not been the case when the question was asked, but WebIndexPlugin now can be specified multiple times and also takes optional bundles parameter where list of bundles to be included in html can be specified (all bundles are included by default).
For example 2 html files (app1.html, app2.html) where each includes a common library (vendor.js), and different entry points (app1.js and app2.js)
app1.html
vendor.js
app1.js
app2.html
vendor.js
app2.js
Config would look like this:
const fuse = FuseBox.init({
homeDir : "src",
target : 'browser#es6',
output : "dist/$name.js",
plugins: [
WebIndexPlugin({
target: 'app1.html',
bundles:['vendor', 'app1']
}),
WebIndexPlugin({
target: 'app2.html',
bundles:['vendor', 'app2']
})
]
})
// vendor bundle, extracts dependencies from index1 and index2:
fuse.bundle("vendor").instructions("~[index1.ts,index2.ts]")
// app1 and app2, bundled separately without dependencies:
fuse.bundle("app1").instructions("!>index1.ts")
fuse.bundle("app2").instructions("!>index2.ts")
I'm trying to generate my API at the moment but having some difficulty adding a description for the first method within a listing group. I can add a description for every other method in a group, just not the first one.
I have attached an image below of how I want it to look but I cannot achieve this using the RAMLtoHTML generator.
Below is the code I am using in the main file. This file has an include for the file I am having the problem with. I was thinking maybe I could change something in it?
#%RAML 0.8
title: Hubs
baseUri: https://apis.3dissue.com/hubsdashboard/api/{version}
version: v1
mediaType: application/json
documentation:
- title: Getting Started
content: !include md/getting_started.md
- title: Overview
content: !include md/overview.md
- title: Creating a Hub
content: !include md/creating_hub.md
- title: Adding Social Sources to a Hub
content: !include md/social_sources.md
- title: Adding an Article to a Hub
content: !include md/articles.md
traits: !include traits.raml
#Hubs
/hubs: !include calls/hubs.raml
This is the file I want to add the description in below. As you can see, I have already added a listing description and if I try to add a method description here, then I get a complaint from the parser that "description" is already defined.
is: [appkey]
displayName: User Hubs
description: This group contains methods that will allow you to create, manage, and retrieve details of one or more hubs.
get:
description: Returns a JSON array containing details of hubs associated with the user account.
queryParameters:
page:
description: The page number to be returned within the paged results. By default, this will return the first page.
type: number
default: 1
page_size:
description: The number of elements to return per page. By default, a total of 10 elements will be returned. This parameter should be used in combination with the page parameter for setting up paged results.
type: number
default: 10
related:
description: Determines whether to return related objects. If set to 1, all child elements for each hub in the list will be returned including any sections and sources.
type: boolean
default: 0
body:
example: !include ../php/getListOfHubs.php
responses:
200:
body:
application/json:
example: !include ../json/hubs.json
post:
description: This method will allow you to create a new hub.
body:
example: !include ../php/createHub.php
responses:
200:
body:
application/json:
example: !include ../json/hub_create_response.json
/{hub_id}:
description: The following methods can be used to manage or retrieve details for a given hub.
uriParameters:
hub_id:
description: A string value used to uniquely identify a hub.
type: string
get:
description: Returns a JSON array containing details for the given hub.
body:
example: !include ../php/getHub.php
responses:
200:
body:
application/json:
example: !include ../json/hub.json
put:
description: This method will allow you to update the display name of the given hub.
body:
example: !include ../php/updateHub.php
responses:
200:
body:
application/json:
example: !include ../json/hub.json
delete:
description: This method will allow you to delete the selected hub. Deleting a hub will not remove any sources from your account.
body:
example: !include ../php/deleteHub.php
responses:
204:
description: No response body
Does anyone have a workaround for this? I have tried adding the description within the first file before the include but get parser errors. I have also tried moving the /hubs declaration within the second file but the only way I can get it to parse is by adding in an extra character to the method call URL which is far from ideal.