Anupam-dagar / GitHub-Education-Portfolio

A portfolio made using React and tools from GitHub Student Developer Pack
https://anupamdagar.com/GitHub-Education-Portfolio
MIT License
58 stars 26 forks source link

html code in profileData.json? #9

Closed christianholland closed 4 years ago

christianholland commented 4 years ago

Hi,

is it somehow possible to use html code in the profileData.json file so that it is correctly parsed and interpreted in the corresponding *.js files?

E.g.

{
    "landing": {"bio": "<b>This text is bold</b>"}
}

Currently it seems that the html code is treated as plan text.

Thanks, Christian

Anupam-dagar commented 4 years ago

Hi @christianholland. To achieve this, you can modify the component itself. For your above mentioned example, you can make the following changes in file https://github.com/Anupam-dagar/GitHub-Education-Portfolio/blob/master/src/Components/Landing.js#L21

- <p className="lead mb-5">{this.landingData.bio}</p>
+ <p className="lead mb-5"><b>{this.landingData.bio}</b></p>