Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

General

Integrate HTML/CSS/JS Site to Grav CMS

first-time

Started by Patrick D. 6 years ago · 1 replies · 1909 views
6 years ago

I have a simple site that uses HTML/CSS/JS and I want to add it to my grav site as well. Ive seen examples of people inserting the raw html code in between grav code.

But for some reason I dont understand why its not functioning as intended. Can anybody help me in making this work?

Ive attached the link for the zip files containing the grav project and the html project.
https://drive.google.com/file/d/1PbduScEWSF5HLHh5RAsi70sgbFaN84pp/view?usp=sharing

Thank you!

6 years ago

You cannot copy & paste any HTML code with different CSS styles and maybe external JS dependencies into Grav. It's OK for code fragments, but in most cases it won't work for complex documents.

A better approach is to integrate an external page in an iFrame. You can use either a simple iFrame or a responsive iFrame solution. E.g. https://marketmix.com/de/grav-cms-responsive-iframes/

Translation here:
https://translate.google.com/translate?hl=en&sl=auto&tl=en&u=https%3A%2F%2Fmarketmix.com%2Fde%2Fgrav-cms-responsive-iframes%2F

-- Harald

last edited 10/09/20 by Harald Schneider

Suggested topics

Topic Participants Replies Views Activity
General · by Jerry Hunt, 4 days ago
2 74 7 hours ago
General · by pamtbaau, 12 hours ago
1 47 12 hours ago
General · by Andy Miller, 1 day ago
0 44 1 day ago
General · by Marcel, 12 months ago
6 346 5 days ago
General · by Duc , 5 days ago
3 39 5 days ago