├── .assets └── demo.gif ├── .gitignore ├── .vscode ├── extensions.json └── launch.json ├── README.md ├── astro.config.mjs ├── global.d.ts ├── package-lock.json ├── package.json ├── public ├── astro-vim.png └── favicon.svg ├── src ├── components │ ├── Footer.astro │ ├── Header.astro │ ├── KeyBindings.astro │ ├── SearchBar.astro │ ├── Sidebar.astro │ └── StatusBar.astro ├── content │ ├── blog │ │ ├── astro-vim-ai.md │ │ └── md-features.md │ └── config.ts ├── env.d.ts ├── layouts │ └── Layout.astro ├── pages │ ├── about.astro │ ├── api │ │ └── blog-posts.json.ts │ ├── blog.astro │ ├── blog │ │ └── [slug].astro │ ├── contact.astro │ ├── exited.astro │ ├── help.astro │ └── index.astro ├── scripts │ ├── navigation.ts │ └── search.ts └── styles │ └── global.css ├── tailwind.config.cjs └── tsconfig.json /.assets/demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/albertoperdomo2/astro-vim/e4040454798eb116b503933338a766195e1260d0/.assets/demo.gif -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # build output 2 | dist/ 3 | 4 | # generated types 5 | .astro/ 6 | 7 | # dependencies 8 | node_modules/ 9 | 10 | # logs 11 | npm-debug.log* 12 | yarn-debug.log* 13 | yarn-error.log* 14 | pnpm-debug.log* 15 | 16 | # environment variables 17 | .env 18 | .env.production 19 | 20 | # macOS-specific files 21 | .DS_Store 22 | 23 | # jetbrains setting folder 24 | .idea/ 25 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": ["astro-build.astro-vscode"], 3 | "unwantedRecommendations": [] 4 | } 5 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.0", 3 | "configurations": [ 4 | { 5 | "command": "./node_modules/.bin/astro dev", 6 | "name": "Development server", 7 | "request": "launch", 8 | "type": "node-terminal" 9 | } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # astro-vim 2 | 3 | > [!NOTE] 4 | > **DISCLAIMER**: Status bar rendering is ~~not~~ working ~~but~~ and commands work! 5 | 6 | Welcome to the astro-vim page template! This project combines the power of Astro with the efficiency of Vim key bindings to create a unique and fast navigation experience. 7 | 8 |
9 |
10 |
96 | ```javascript 97 | function helloWorld() { 98 | console.log("Hello, world!"); 99 | } 100 | ``` 101 |102 | 103 | ## Tables 104 | 105 | Create tables using pipes (`|`) and hyphens (`-`). 106 | 107 | ```markdown 108 | | Syntax | Description | 109 | |--------|-------------| 110 | | Header | Title | 111 | | Paragraph | Text | 112 | ``` 113 | 114 | ## Horizontal Rules 115 | 116 | Add horizontal rules using three or more hyphens (`---`), asterisks (`***`), or underscores (`___`). 117 | 118 | ```markdown 119 | --- 120 | ``` 121 | 122 | ## Task Lists 123 | 124 | Create task lists using `- [ ]` for incomplete tasks and `- [x]` for completed tasks. 125 | 126 | ```markdown 127 | - [x] Completed task 128 | - [ ] Incomplete task 129 | ``` 130 | 131 | ## Combining Elements 132 | 133 | You can combine different markdown elements to create more complex structures. For example, here is a blockquote with a heading and a list: 134 | 135 | ```markdown 136 | > ## Blockquote with Heading 137 | > 138 | > - Item 1 139 | > - Item 2 140 | ``` 141 | 142 | ## Conclusion 143 | 144 | Markdown is a versatile and easy-to-use language that allows you to format text with minimal effort. Whether you're writing a simple blog post or complex documentation, markdown can help you create well-structured and readable content. Experiment with these elements to see how they can enhance your writing! 145 | 146 | Thank you for reading! Stay tuned for more tips and tutorials on using markdown effectively in your blog posts. -------------------------------------------------------------------------------- /src/content/config.ts: -------------------------------------------------------------------------------- 1 | import { defineCollection, z } from 'astro:content'; 2 | 3 | const blogCollection = defineCollection({ 4 | schema: z.object({ 5 | title: z.string(), 6 | date: z.date(), 7 | author: z.string().optional(), 8 | summary: z.string().optional(), 9 | }), 10 | }); 11 | 12 | export const collections = { 13 | 'blog': blogCollection, 14 | }; -------------------------------------------------------------------------------- /src/env.d.ts: -------------------------------------------------------------------------------- 1 | ///
version 0.0.3
10 |12 | Welcome to our Astro template landing page, inspired by the legendary Vim console. 13 | This template is designed for developers who understand that Vim is not just a text editor, but a way of life. 14 |
15 |16 | Our landing page harnesses the power of Vim’s efficient and minimalist design, bringing the speed and functionality 17 | of the console to the web. With support for key bindings, you can navigate and interact with the page just as you 18 | would in your favorite editor. 19 |
20 |21 | Why Vim? 22 | Vim is renowned for its unparalleled efficiency and control, allowing developers to perform complex text manipulations 23 | with just a few keystrokes. It's a tool that, once mastered, transforms the coding experience, making it faster and 24 | more enjoyable. 25 |
26 |27 | Experience the future of landing pages with our Vim-inspired design, where every interaction is swift, intuitive, and 28 | satisfying. Whether you're a seasoned Vim user or new to this powerful editor, our template will enhance your web development 29 | process, making every moment on your site as productive as possible. 30 |
31 |32 | Join us on this journey to redefine web navigation and interaction with the timeless efficiency of Vim. Embrace the best text 33 | editor’s philosophy and see how it revolutionizes the way you build and use web pages. Welcome to a new era of web development 34 | with the Astro.build Vim-inspired landing page. 35 |
36 |17 | {post.data.summary} 18 |
19 | 22 |version 0.0.3
10 |If you have any questions or would like to get in touch, please use the contact information below:
11 |hi [at] albertoperdomo [dot] me
12 |Your web session has been successfully closed.
11 |You can now safely close this tab.
12 |version 0.0.3
10 |12 | This page contains basic instructions to use this page. Some Vim key bindings are enabled and can be used within the 13 | page itself, but some of them don't work in all the pages since I did not considered it necessary. 14 |
15 | 16 |u: Undo the last change, in this case, it navigates up one level.
18 |j: Move the cursor down one line.
19 |k: Move the cursor up one line.
20 |gg: Move the cursor to the first line of the file, in this case, page.
21 |G: Move the cursor to the last line of the file, in this case, page.
22 |:<command>: Executes a command.
23 |version 0.0.3
10 |astro-vim-landing is a free and opensource blog template for tech enthusiasts
11 | github.com/albertoperdomo2/astro-vim-landing 12 |type :about<Enter> to view about information
14 |type :blog<Enter> to view blog posts
15 |type :contact<Enter> to view contact details
16 |type /<Search term> to search posts
18 |type :h<Enter> to view the help page
20 |type :q<Enter> to exit
21 |${post.content.substring(0, 100)}...
25 | 26 | `).join(''); 27 | 28 | searchResults!.classList.remove('hidden'); 29 | } 30 | 31 | document.addEventListener('DOMContentLoaded', () => { 32 | fetchBlogPosts(); 33 | }); 34 | 35 | window.performSearch = performSearch; 36 | -------------------------------------------------------------------------------- /src/styles/global.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | 5 | body { 6 | @apply bg-nvim-bg text-nvim-fg font-mono; 7 | } 8 | 9 | ::-webkit-scrollbar { 10 | width: 8px; 11 | } 12 | 13 | ::-webkit-scrollbar-track { 14 | @apply bg-nvim-bg; 15 | } 16 | 17 | ::-webkit-scrollbar-thumb { 18 | @apply bg-nvim-gray rounded; 19 | } 20 | -------------------------------------------------------------------------------- /tailwind.config.cjs: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | module.exports = { 3 | content: ['./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}'], 4 | theme: { 5 | extend: { 6 | colors: { 7 | 'nvim-bg': '#1c1c1c', 8 | 'nvim-fg': '#d0d0d0', 9 | 'nvim-gray': '#4e4e4e', 10 | 'nvim-blue': '#5fafd7', 11 | 'nvim-green': '#87d787', 12 | 'nvim-statusline': '#303030', 13 | }, 14 | }, 15 | }, 16 | plugins: [ 17 | require('@tailwindcss/typography'), 18 | ], 19 | }; 20 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "astro/tsconfigs/strict", 3 | "include": ["global.d.ts", "src"] 4 | } 5 | --------------------------------------------------------------------------------