update AI page
This commit is contained in:
20
app.js
20
app.js
@ -166,6 +166,26 @@ app.get('/about', (req, res) => {
|
||||
});
|
||||
});
|
||||
|
||||
// About Route (Load markdown and render using EJS)
|
||||
app.get('/about-rayai', (req, res) => {
|
||||
const aboutMarkdownFile = path.join(__dirname, 'me', 'about-rayai.md');
|
||||
|
||||
// Read the markdown file and convert to HTML
|
||||
fs.readFile(aboutMarkdownFile, 'utf-8', (err, data) => {
|
||||
if (err) {
|
||||
return res.status(500).send('Error loading About page');
|
||||
}
|
||||
|
||||
const aboutContentHtml = marked(data); // Convert markdown to HTML
|
||||
|
||||
res.render('about', {
|
||||
title: `About RayAI`,
|
||||
content: aboutContentHtml,
|
||||
menuItems // Pass the menu items to the view
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
// Contact Route (Render the contact form)
|
||||
app.get('/contact', (req, res) => {
|
||||
res.render('contact', {
|
||||
|
Reference in New Issue
Block a user