Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion Deloitte.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,12 @@ style: |
position: relative;
z-index: 1;
}

/* Book syntax highlighting */
@import url('book-highlight.css');
---


<!-- _class: split -->
<!-- backgroundColor: white -->

Expand All @@ -129,7 +133,7 @@ style: |
- **We make the Book, next-generation language for AI**
- You no longer need ML Department to create your own personal AI apps

```markdown
```book
# ✨ Email to customer

- PERSONA George, experienced AI consultant
Expand All @@ -147,6 +151,7 @@ style: |
```

---

# The Benefits for you

- Faster, cost-effective solution ✅
Expand Down
73 changes: 73 additions & 0 deletions book-highlight.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
/* Book Language Syntax Highlighting for Marp */

.hljs-keyword {
color: #9932cc;
font-weight: bold;
}

.hljs-variable {
color: #d63384;
font-weight: bold;
}

.hljs-section {
color: #0066cc;
font-weight: bold;
}

.hljs-strong {
font-weight: bold;
}

.hljs-emphasis {
font-style: italic;
}

.hljs-code {
color: #CE9178;
}

.hljs-link {
color: #569CD6;
text-decoration: underline;
}

.hljs-bullet, .hljs-number {
color: #DCDCAA;
}

.hljs-quote {
color: #608B4E;
font-style: italic;
}

.hljs-arrow {
color: #D7BA7D;
font-weight: bold;
}

.hljs-comment {
color: #888;
font-style: italic;
}

.hljs-string {
color: #008000;
}

.hljs-built_in {
color: #0066cc;
}

.hljs-meta {
color: #1e90ff;
font-weight: bold;
}

/* Style the code block container for 'book' language */
pre code.language-book {
background-color: #f8f9fa;
border-left: 4px solid #4a90e2;
border-radius: 3px;
padding: 1em;
}
63 changes: 63 additions & 0 deletions book.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
// Define custom 'book' language for highlight.js
(function() {
function bookLanguage() {
return {
name: 'book',
aliases: ['promptbook', 'ptbk'],
case_insensitive: true,
keywords: {
keyword: 'PERSONA KNOWLEDGE',
built_in: 'Write Generate Create Describe',
},
contains: [
// Section headers
{
className: 'section',
begin: '^#+\\s',
end: '$',
relevance: 10
},
// Comments
{
className: 'comment',
begin: '//|#',
end: '$',
contains: [{
begin: /\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/
}]
},
// Prompt blocks with >
{
className: 'string',
begin: '^>',
end: '$',
relevance: 0
},
// Variables with {}
{
className: 'variable',
begin: '\\{',
end: '\\}',
relevance: 0
},
// Arrows ->
{
className: 'meta',
begin: '->',
end: '$',
relevance: 10
}
]
};
}

// Register the language with highlight.js when loaded in the browser
if (typeof window !== 'undefined' && window.hljs) {
window.hljs.registerLanguage('book', bookLanguage);
}

// Export for CommonJS environments (Node.js)
if (typeof module !== 'undefined' && module.exports) {
module.exports = bookLanguage;
}
})();
28 changes: 28 additions & 0 deletions marp.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
module.exports = {
// Enable HTML in Markdown
htmlAsArray: true,

// Custom highlight.js configuration
highlightjs: {
// Register custom languages
registerLanguages: {
book: {
// Reference the book.js language definition
// This will be loaded from your custom script already included in the presentation
require: './book.js',
// Or you could use an inline definition if needed
// alias: ['promptbook', 'ptbk']
}
},
// This will enable auto-loading of languages
autoLanguage: true
},

// Other Marp configuration options
math: true,
markdown: {
breaks: true
},
allowLocalFiles: true,
themeSet: './themes'
};
1 change: 1 addition & 0 deletions syntaxes/TODO.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
TODO: Generate book.tmLanguage.json dynamically alongside documentation
Loading