Well... it's not finished yet but ready to use.
I will show you how to create a new page
open views/markdown
and create new file with format .md.
WARNING: do not use special characters when naming files.
Open a new file and fill it with markdown
Example:
---
title: Your Title
---
# Hello World
> Blockquote
[Link]()Now check by going to the url http://your-web.com/article/filename.
You can also custom css in public/style.css.
Check config.toml file for global configuration
and frontmatter for inpage configuration.
Example open https://markdownitapp.mioun.repl.co/example.
To run server use
bash main.shinstead of
npm startif it's the first time.
And then, you can add anything you want like navbar :)
The application includes several performance optimizations:
- File Caching: Markdown files are processed once and cached in memory, resulting in 86-95% faster response times on subsequent requests.
- Efficient Minification: CSS and JS files are minified using synchronous operations for faster build times.
The application now includes a fully functional dark mode feature:
- Toggle Button: Click the 🌑/☀️ button in the bottom-right corner to switch between light and dark modes
- Persistent Preference: Your dark mode preference is saved in localStorage and persists across page visits
- Dynamic Themes: Automatically switches highlight.js syntax highlighting theme to match the current mode
- Configuration: Set the default mode in
config.tomlwith thedarkmodeoption (users can still override this with the toggle)
Choose between custom CSS or Pico CSS (classless framework):
- Edit
config.tomland setcss_frameworkto:"custom"- Use custom styling (default)"pico"- Use Pico CSS for automatic semantic HTML styling
When developing and making changes to markdown files, you can disable caching by setting the CLEAR_CACHE environment variable:
CLEAR_CACHE=true npm startThis ensures you see file changes immediately without needing to restart the server.
This project supports static site generation for deployment to serverless platforms like Vercel, Netlify, or GitHub Pages.
npm install
npm run dev # Start development servernpm run build # Generates static site in /dist directorynpm install -g vercel
vercelOr connect your GitHub repo to Vercel for automatic deployments.
npm install -g netlify-cli
netlify deploy --prod- Build the site:
npm run build - Push
distfolder togh-pagesbranch - Enable GitHub Pages in repository settings
/views/markdown/*.md- Markdown content files/public/*- Static assets (CSS, JS, images)/dist/*- Built static site (generated)
That's all for now.
Footer
TODO:
- Create a routing system
- Reach 10★ on Github
CREDITS: