I have upgraded my development site to the latest Panopoly release and now my page titles include the site name. The daftest example is the contact form, which now has the title "Contact us | sitename". I've played with various options in my panels content settings, even tried the Page Title module (I see there are issues for it in Panopoly so not surprised that hasn't worked). I find it hard to imagine it's an issue and suspect I've (unwittingly) done something wrong?
Try https://www.drupal.org/project/metatag
Change globals here
/admin/config/search/metatags/config/node
Change specific content types by:
● admin/config/search/metatags/config/add
● Select Type Dropdown: “THE CONTENT TYPE YOU WANT TO CHANGE”
○ Add and configure
*Example below using tokens
○ Page title: “[site:name] at [node:title]”
Related
and pardon what might be a repeat question, the solutions to the others didn't solve my problem. I'm working on a Hugo site and attempting to embed an iframe. The element shows but the I get the message 'This content is blocked. Contact the site owner to fix the issue.' when it loads, so no one can see the content.
Here is my .md information
+++
title = "Resources"
description = "Hugo, the world's fastest framework for building websites"
date = "2019-02-28"
aliases = ["about-us", "about-hugo", "contact"]
author = "Hugo Authors"
+++
<iframe src="//docs.google.com/spreadsheets...."></iframe>
I've also updated my config.toml file by adding the following:
[markup.goldmark.renderer]
unsafe = true
I'm not sure what I'm missing. Please let me know if you need more information about what I've done. I've tried shortcode as well but that doesn't render anything at all (I'm still new to shortcodes which is why I am embedding the iframe).
Thank you for your time and consideration.
For those who just want to embed an iframe into a Hugo site, like the question title says:
In the examples below, the content between --- is called front matter and it is in YAML syntax. You can add here your own structured data or use predefined Hugo's front matter fields. The rest of the file (below the second ---) is a standard Markdown syntax formatted content.
You don't need to use the YAML syntax in your front matter. Also TOML and JSON formats are supported by Hugo (see docs)
Solution 1: direct HTML in the content
You can add the HTML code itself to the Markdown content (like T.J.'s .md file example in the question). Hugo's markdown engine will then render the iframe as it is.
---
title: "Your title"
description: "Your description, you can add more fields below of course..."
---
<iframe src="https://example.com/"></iframe>
Solution 2: custom shortcode
You can implement your own shortcode which can be useful when using some kind of CMS or in a case when you want to style the iframe somehow.
<!-- layouts/shortcodes/iframe.html -->
<iframe src="{{ .Get 0 }}"></iframe>
You can then add iframes to your content in markdown files like this:
---
title: "Your title"
description: "Your description, you can add more fields below of course..."
---
{{< iframe https://example.com/ >}}
Shortcodes allow you also to create named attributes so you would use the shortcode like {{< iframe url="https://example.com/" >}}. The benefit of this solution is that you are free to set up the HTML code that will be rendered when using the iframe shortcode. For more information, see the shortcode docs.
Solution 3: using the front matter
If you build your page from predefined blocks or components or the page is a very simple one where you for example don't use the markdown content but just the front matter fields, you can be interested in this solution which is basically just using the front matter for storing the iframe's URL or other settings you want to use during the HTML rendering.
---
title: "Your title"
description: "Your description, you can add more fields below of course..."
iframe: "https://example.com/"
---
In your layout file, you will get this piece of information by using {{ .Params.iframe }}.
I recently imported content from my WordPress page into Hugo. When I run hugo serve I get following error messages:
WARN 2020/02/17 20:51:06 found no layout file for "HTML" for "page": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
The page in question starts like this:
---
linktitle: "The Title of the Post"
title: "The Title of the Post"
author: "Franz Drollig"
type: post
date: 2020-01-09T14:41:55+00:00
url: /the-title-of-post/
categories:
- Uncategorized
weight: 10
---
This is the content of the post. This is the second sentence of the post.
It is located in mysite/content/posts/YYYY-MM-DD-title.md.
The layouts directory is empty. However, the themes directory contains the book theme. This theme is also configured in the config.toml.
Another post, starting like shown below, is rendered correctly.
---
author: "Michael Henderson"
date: 2014-09-28
linktitle: Creating a New Theme
menu:
main:
parent: tutorials
next: /tutorials/github-pages-blog
prev: /tutorials/automated-deployments
title: Creating a New Theme
weight: 10
---
## Introduction
Why is my post not rendered properly? How can I fix it?
Okay so here is what is likely happening:
You have a theme you added as a git submodule and you recently re-cloned your project. Guess what? Your submodule needs to be re-downloaded as well.
You can do this with:
git submodule init
git submodule update
Then your project will load without errors.
I don't have experience with Hugo, but figure I'd comment if it helps to point you in the right direction.
The front matter seems very different between those two documents. I'm thinking the type: post is probably the culprit.
What happens if you remove the post front matter altogether?
These links may also be helfpul:
Front Matter | Hugo
Hugo's Lookup Order | Hugo
You have to create the layouts needed; by default the layout of page is named single.html, and the layout of section is named list.html.
Even if you would not use those as a real template, you have to create it in order to avoid that WARN.
So, create those files inside layout/_default: single.html list.html. Also, if you feel applied write some comment with a hugo template inside each file like this:
{{ "<!-- Layout with no content to avoid WARN message about missing page layout -->" | safeHTML }}
If you use hugo academic theme, please try this:
$ hugo mod clean
$ hugo server
or
$ hugo mod clean
$ hugo mod get -u ./...
$ hugo server
Ref:
Error: File “not found” or “failed to extract” | Troubleshooting
In my case, I missed this step:
echo theme = \"hugo-future-imperfect-slim\" >> config.toml
Which adds your theme to the configuration. After that, it was using the right Kinds / Layout elements from the theme. More info in the quick start: https://gohugo.io/getting-started/quick-start/
Can we skip a diazo error and prevent page crash by replacing it with a nice message in page? Something like: Your content you want to show in this page is not created or published. Please check this section /source/homepage-content-sample-section.html.
<!-- Images slider section -->
<replace css:theme="[data-diazo='my-images-slider']"
href="homepage-content/homepage-images-slider" method="document"
css:content-children="#content-core" />
<drop css:content="#content-core [data-diazo='my-images-slider']" />
I have a page in Plone for each section in Homepage, that contains html code easy to edit. The problem is if a page is missing or private the homepage is broken.
Calling user-managed contents with href in a Diazo rule is like playing Russian roulette. If the page is not existing, there is not way to prevent the page crash.
The best approach is to call a developer-defined URL in charge of retrieving the content if it exists and that will just gently return nothing if the content does not exists.
Rapido is a very easy way to do that (you create a Rapido block which can be called like that: href="##rapido/myapp/blocks/get-content-for-my-homepage", this URL will always work, your page will never crash whatever the users have done with the content).
I am trying to add content in a WordPress post type with an acceptance test in Codeception.
I tried several things but I can not make to work.
For example. I would like to add content in a Post or Page or Product. The main content is the iframe with TinyMCE in WordPress.
The best solution I found until now is this but it is not working on WordPress :
$I->switchToIFrame('#content_ifr');
$I->executeJS('document.getElementById("tinymce").innerHTML = "<p>Test content</p>";');
Have you got any idea how to implement this?
If anyone need to add content in the tinymce editor in WordPress with Codeception the solution is this :
$I->click('#content-html');
$I->fillField('#content', 'Test Content');
With the 1st command we change the tinymce tab to html and with the 2nd one we can add the content we like inside.
Hope this helps!
This is what I have typed in the footer message section from the site configuration, sight information page:
Copyright Sage 2010 | Contact Us: < a ="mailto:admin#mysite.org" >admin#mysite.org< / a> | < a="www.mysite.org/contactoptions" >other contact options< / a>
However, when i click on the links nothing happens. I was told all I need to do is set input format to 'Full HTML' in drupal to make that work. But it still doesn't work.
You appear to be missing the 'href' attribute. Also, lose the spaces. It should be:
Contact Us: admin#mysite.org
Something similar works fine on my drupal site.