Put markdown.md
into the created folder.
---\nmarp: true\ntheme: your-theme\n---\n\n# Hello, world!
Hit F1 and run \"Preferences: Open Workspace Settings\".
\nSearch \"Themes\" and find out Markdown > Marp: Themes
.
Add a path theme.css
. Now ready to use \"your-theme\".
Open markdown.md
, and confirm the root of current workspace is the working folder you've made.
Open Markdown preview from the this icon:
\n\nCheck whether showing \"Hello, world!\" with red text.
\n\nCongratulations, you've created your first CSS theme!
\nExcerice
\nTry changing color: red;
to color: blue;
in theme.css
and save it.
\n
The most part of Marp theme is plain CSS so you have to dive into CSS from here. If you are a beginner, strongly recommend to learn CSS first. https://web.dev/learn/css/
","upvoteCount":17,"url":"https://github.com/orgs/marp-team/discussions/115#discussioncomment-759004"}}}-
I want to create a theme, but after I read the documentation, it's still not clear how to create a theme and use it. Can you give me an example of a quick start? I am using marp via vscode plugin. The documents I read were https://marpit.marp.app/theme-css |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 16 replies
-
https://marpit.marp.app/theme-css is only describing about the thinking of theme CSS syntax. To use your own theme actually, you have to register the custom CSS theme in your VS Code workspace: https://github.com/marp-team/marp-vscode#use-custom-theme-css-shield Tutorial
ExcericeTry changing The most part of Marp theme is plain CSS so you have to dive into CSS from here. If you are a beginner, strongly recommend to learn CSS first. https://web.dev/learn/css/ |
Beta Was this translation helpful? Give feedback.
-
the path in 6 should be a full path: |
Beta Was this translation helpful? Give feedback.
-
how can I configure marp to use a custom theme without using vscode? |
Beta Was this translation helpful? Give feedback.
-
what about hosting the theme on a git repository and reference the raw file via its HTTP path? |
Beta Was this translation helpful? Give feedback.
-
Thanks for the detailed solution mentioned above. "markdown.marp.themes" : [
${workspaceFolder}/theme.css
], |
Beta Was this translation helpful? Give feedback.
https://marpit.marp.app/theme-css is only describing about the thinking of theme CSS syntax. To use your own theme actually, you have to register the custom CSS theme in your VS Code workspace: https://github.com/marp-team/marp-vscode#use-custom-theme-css-shield
Tutorial
Create a folder for working and open the folder in VS Code.
Put
theme.css
into the created folder. It makes a theme named "your-theme".Put
markdown.md
into the created folder.Hit F1 and run "Preferences: Open Workspace Settings".
Search "Themes" and find out
Markdown > Marp: Themes
.Add a p…