Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Content] Can't break line on YML #26

Closed
abeldotam opened this issue Mar 22, 2024 · 2 comments
Closed

[Content] Can't break line on YML #26

abeldotam opened this issue Mar 22, 2024 · 2 comments

Comments

@abeldotam
Copy link
Contributor

Hi 馃憢

User of the landing template, I would like to break line on my content displayed on the FAQ module, in order to have multiple lines answer.

Since this is YAML, I've tried several common ways to do so in the index.yml file (here), , i.e:

      content: |+
        line1
        line2
      content: |
        line1
        line2
      content: >
        line1
        line2
      content: "Hey\
        line 1\n\n line 2"

etc.

None of these work and I'm running out of ideas for breaking line on my displayed content.
Am I missing something or is it an issue with the template, or eventually Nuxt Content?

Feel free to let me know if something is incorrect.

Copy link
Contributor

benjamincanac commented Mar 25, 2024

If you want to use markdown syntax, you might need to use the MDC component to display it correctly. Here is an example:

<ULandingFAQ :items="page.faq.items" multiple>
  <template #item="{ item }">
    <MDC :value="item.content" class="prose prose-primary dark:prose-invert max-w-none text-gray-500 dark:text-gray-400" />
  </template>
</ULandingFAQ>

@abeldotam
Copy link
Contributor Author

Awesome, it worked like a charm, thanks! 鈽猴笍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants