mordoc 0.1.6 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,239 +2,4 @@
2
2
 
3
3
  A modern static site generator for documentation with SSG + SPA capabilities. Build fast, SEO-friendly documentation sites with smooth client-side navigation.
4
4
 
5
- ## Overview
6
-
7
- Mordoc combines the best of static site generation and single-page applications to deliver documentation sites that are:
8
- - **SEO-friendly** with pre-rendered HTML for every page
9
- - **Fast to navigate** with client-side routing after initial load
10
- - **Easy to write** using Markdown and Markdoc
11
- - **Customizable** with simple JSON configuration
12
- - **Multi-language ready** with built-in internationalization support
13
-
14
- ## Key Features
15
-
16
- - 📄 **Markdoc-powered** - Write content in Markdown with powerful custom components
17
- - 🚀 **Static + SPA** - Pre-rendered HTML with smooth client-side navigation
18
- - 🔍 **Built-in Search** - Instant full-text search powered by Pagefind
19
- - 🌍 **Multi-language** - First-class support for internationalization
20
- - 🎨 **Customizable Theming** - Configure colors and styles with simple JSON
21
- - ⚡ **React-based** - Modern React 19 for component rendering
22
- - 📱 **Responsive** - Mobile-friendly by default
23
-
24
- ## Installation
25
-
26
- Create a new Mordoc documentation site using `create-mordoc-app`:
27
-
28
- ```bash
29
- npm create mordoc-app my-docs
30
- ```
31
-
32
- > **Note:** The `create-mordoc-app` package is not yet published. Coming soon!
33
-
34
- Or with other package managers:
35
-
36
- ```bash
37
- # Using yarn
38
- yarn create mordoc-app my-docs
39
-
40
- # Using pnpm
41
- pnpm create mordoc-app my-docs
42
- ```
43
-
44
- ## Quick Start
45
-
46
- 1. **Create a new project:**
47
-
48
- ```bash
49
- npm create mordoc-app my-docs
50
- cd my-docs
51
- ```
52
-
53
- 2. **Build your documentation:**
54
-
55
- ```bash
56
- npm run build
57
- ```
58
-
59
- 3. **Start the development server:**
60
-
61
- ```bash
62
- npm run dev
63
- ```
64
-
65
- Your documentation site will be available at `http://localhost:3000`
66
-
67
- ## CLI Commands
68
-
69
- ### `mordoc build`
70
-
71
- Generate the static documentation site.
72
-
73
- ```bash
74
- mordoc build [options]
75
- ```
76
-
77
- **Options:**
78
-
79
- | Option | Alias | Description | Default |
80
- |--------|-------|-------------|---------|
81
- | `--output <dir>` | `-o` | Output directory | `dist` |
82
- | `--verbose` | `-v` | Enable verbose logging | `false` |
83
- | `--drafts` | `-d` | Include draft content in build | `false` |
84
- | `--no-clean` | | Don't clean output directory before build | `false` |
85
- | `--help` | `-h` | Show help message | |
86
-
87
- **Examples:**
88
-
89
- ```bash
90
- # Basic build
91
- mordoc build
92
-
93
- # Build to custom directory
94
- mordoc build --output build
95
-
96
- # Build with drafts and verbose output
97
- mordoc build --verbose --drafts
98
- ```
99
-
100
- ### `mordoc dev`
101
-
102
- Start the development server to preview your documentation.
103
-
104
- ```bash
105
- mordoc dev [options]
106
- ```
107
-
108
- **Options:**
109
-
110
- | Option | Alias | Description | Default |
111
- |--------|-------|-------------|---------|
112
- | `--port <number>` | `-p` | Port number | `3000` |
113
- | `--host <host>` | `-h` | Host address | `localhost` |
114
- | `--open` | `-o` | Open browser automatically | `false` |
115
- | `--help` | | Show help message | |
116
-
117
- **Examples:**
118
-
119
- ```bash
120
- # Start dev server on default port
121
- mordoc dev
122
-
123
- # Use custom port
124
- mordoc dev --port 8080
125
-
126
- # Make accessible on network
127
- mordoc dev --host 0.0.0.0
128
- ```
129
-
130
- > **Note:** The dev server serves the pre-built `dist/` folder. Run `mordoc build` first and rebuild manually after making changes.
131
-
132
- ## Project Structure
133
-
134
- After creating a new project, you'll have the following structure:
135
-
136
- ```
137
- my-docs/
138
- ├── content/ # Your markdown content files
139
- │ └── en/ # English content (default language)
140
- │ ├── index.md # Homepage
141
- │ ├── getting-started.md
142
- │ └── guides/
143
- │ └── first-steps.md
144
- ├── config/ # Configuration files
145
- │ ├── site.json # Site metadata and settings
146
- │ ├── sidenav.yaml # Sidebar navigation structure
147
- │ └── styles/ # Theme customization
148
- ├── public/ # Static assets (images, fonts, etc.)
149
- ├── dist/ # Generated site (after build)
150
- ├── package.json
151
- └── node_modules/
152
- ```
153
-
154
- ## Configuration
155
-
156
- Mordoc uses simple configuration files in the `config/` directory:
157
-
158
- - **`site.json`** - Site metadata (title, description, base URL)
159
- - **`sidenav.yaml`** - Sidebar navigation structure
160
- - **`styles/`** - Theme colors and customization
161
-
162
- For detailed configuration options and syntax, see the [Mordoc Documentation](#) *(coming soon)*.
163
-
164
- ## Content Writing
165
-
166
- Write your documentation using Markdown with Markdoc enhancements:
167
-
168
- ```markdown
169
- ---
170
- title: My Page Title
171
- description: Page description for SEO
172
- order: 1
173
- ---
174
-
175
- # My Page Title
176
-
177
- Your content here...
178
- ```
179
-
180
- ### Frontmatter
181
-
182
- Each markdown file supports frontmatter for metadata:
183
-
184
- - `title` - Page title
185
- - `description` - Page description (for SEO)
186
- - `order` - Sort order in navigation
187
- - `draft` - Mark as draft (excluded unless `--drafts` flag used)
188
-
189
- For complete documentation on content writing, Markdoc syntax, and custom components, visit the [Mordoc Documentation](#) *(coming soon)*.
190
-
191
- ## Development Workflow
192
-
193
- 1. **Write content** - Add or edit markdown files in `content/`
194
- 2. **Build** - Run `npm run build` to generate the static site
195
- 3. **Preview** - Run `npm run dev` to preview locally
196
- 4. **Iterate** - Make changes and rebuild
197
-
198
- ## Deployment
199
-
200
- Mordoc generates a fully static site in the `dist/` directory. Deploy it to any static hosting service:
201
-
202
- - **Netlify** - Drag and drop the `dist/` folder or connect your git repo
203
- - **Vercel** - Import your project and set build command to `npm run build`
204
- - **GitHub Pages** - Push the `dist/` folder to your gh-pages branch
205
- - **AWS S3** - Upload the `dist/` folder to an S3 bucket
206
- - **Any static host** - Upload the `dist/` folder contents
207
-
208
- Build command: `npm run build`
209
- Output directory: `dist`
210
-
211
- ## Requirements
212
-
213
- - **Node.js** >= 18.0.0
214
- - **npm** >= 9.0.0 (or yarn/pnpm equivalent)
215
-
216
- ## Technology Stack
217
-
218
- Mordoc is built with modern web technologies:
219
-
220
- - [Markdoc](https://markdoc.dev/) - Markdown authoring framework
221
- - [React 19](https://react.dev/) - UI rendering
222
- - [React Router](https://reactrouter.com/) - Client-side routing
223
- - [Pagefind](https://pagefind.app/) - Static search
224
- - [esbuild](https://esbuild.github.io/) - Fast bundling
225
- - [Prism.js](https://prismjs.com/) - Syntax highlighting
226
-
227
- ## Contributing
228
-
229
- Contributions are welcome! Please feel free to submit issues and pull requests.
230
-
231
- ## License
232
-
233
- MIT
234
-
235
- ---
236
-
237
- **Documentation:** [https://mordoc.dev](#) *(coming soon)*
238
- **Issues:** [GitHub Issues](#)
239
- **NPM:** [mordoc](#) *(not yet published)*
240
-
5
+ Read the full documentation [here](https://www.mordoc.dev/)
@@ -12,17 +12,17 @@ class SideNavStyleGenerator {
12
12
  }
13
13
  generate(userOverrides) {
14
14
  const defaults = {
15
- navHoverBackgroundLight: '#E5E5E5',
15
+ navHoverBackground: '#E5E5E5',
16
16
  navHoverBackgroundDark: '#1F1F1F',
17
- navActiveBackgroundLight: '#E5E5E5',
17
+ navActiveBackground: '#E5E5E5',
18
18
  navActiveBackgroundDark: '#1F1F1F',
19
- navActiveTextColorLight: '#171717',
19
+ navActiveTextColor: '#171717',
20
20
  navActiveTextColorDark: '#FAFAFA',
21
21
  };
22
22
  const vars = (0, utils_1.mergeOverrides)(defaults, userOverrides, [
23
- 'navHoverBackgroundLight', 'navHoverBackgroundDark',
24
- 'navActiveBackgroundLight', 'navActiveBackgroundDark',
25
- 'navActiveTextColorLight', 'navActiveTextColorDark'
23
+ 'navHoverBackground', 'navHoverBackgroundDark',
24
+ 'navActiveBackground', 'navActiveBackgroundDark',
25
+ 'navActiveTextColor', 'navActiveTextColorDark'
26
26
  ]);
27
27
  return `/* SideNav */
28
28
  .sidenav {
@@ -119,7 +119,7 @@ class SideNavStyleGenerator {
119
119
 
120
120
  .sidenav-link:hover {
121
121
  color: #1C1C1C;
122
- background-color: ${vars.navHoverBackgroundLight};
122
+ background-color: ${vars.navHoverBackground};
123
123
  }
124
124
 
125
125
  [data-theme="dark"] .sidenav-link:hover {
@@ -137,8 +137,8 @@ class SideNavStyleGenerator {
137
137
  }
138
138
 
139
139
  .sidenav-link.active {
140
- color: ${vars.navActiveTextColorLight};
141
- background-color: ${vars.navActiveBackgroundLight};
140
+ color: ${vars.navActiveTextColor};
141
+ background-color: ${vars.navActiveBackground};
142
142
  font-weight: ${this.globalVars.fontWeightMedium};
143
143
  }
144
144
 
@@ -1 +1 @@
1
- {"version":3,"file":"sidenav.js","sourceRoot":"","sources":["../../../src/styles/components/sidenav.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,oCAA0C;AAW1C,MAAa,qBAAqB;IAChC,YAAoB,UAA2B;QAA3B,eAAU,GAAV,UAAU,CAAiB;IAAG,CAAC;IAEnD,QAAQ,CAAC,aAAsC;QAC7C,MAAM,QAAQ,GAAqB;YACjC,uBAAuB,EAAE,SAAS;YAClC,sBAAsB,EAAE,SAAS;YACjC,wBAAwB,EAAE,SAAS;YACnC,uBAAuB,EAAE,SAAS;YAClC,uBAAuB,EAAE,SAAS;YAClC,sBAAsB,EAAE,SAAS;SAClC,CAAC;QAEF,MAAM,IAAI,GAAG,IAAA,sBAAc,EACzB,QAAQ,EACR,aAAa,EACb;YACE,yBAAyB,EAAE,wBAAwB;YACnD,0BAA0B,EAAE,yBAAyB;YACrD,yBAAyB,EAAE,wBAAwB;SACpD,CACF,CAAC;QAEF,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eA6EI,IAAI,CAAC,UAAU,CAAC,UAAU;;;;;;;;;;;;;;;;;;sBAkBnB,IAAI,CAAC,uBAAuB;;;;;sBAK5B,IAAI,CAAC,sBAAsB;;;;;;;;;;;;;WAatC,IAAI,CAAC,uBAAuB;sBACjB,IAAI,CAAC,wBAAwB;iBAClC,IAAI,CAAC,UAAU,CAAC,gBAAgB;;;;WAItC,IAAI,CAAC,sBAAsB;s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,UAAU,CAAC,UAAU;iBACxB,IAAI,CAAC,UAAU,CAAC,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuD/C,CAAC;IACD,CAAC;CACF;AA9MD,sDA8MC"}
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "type": "git",
5
5
  "url": "https://github.com/shiva-varanasi/mordoc.git"
6
6
  },
7
- "version": "0.1.6",
7
+ "version": "0.1.7",
8
8
  "description": "A static site generator for documentation with SSG + SPA capabilities",
9
9
  "bin": {
10
10
  "mordoc": "./bin/cli.js"
@@ -16,6 +16,6 @@
16
16
  "documentation"
17
17
  ],
18
18
  "dependencies": {
19
- "mordoc": "^0.1.6"
19
+ "mordoc": "^0.1.7"
20
20
  }
21
21
  }