@mgks/docmd 0.2.5 → 0.2.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.
@@ -0,0 +1,38 @@
1
+ ---
2
+ title: "Recipe: Custom Favicon"
3
+ description: "How to add a custom favicon to your documentation site."
4
+ ---
5
+
6
+ # Adding a Custom Favicon
7
+
8
+ A favicon is the small icon that appears in the browser tab next to your page title. `docmd` makes it easy to add your own.
9
+
10
+ ## 1. Prepare your image
11
+ You can use `.ico`, `.png`, or `.svg` files. For the best compatibility, an `.ico` file is recommended.
12
+
13
+ ## 2. Add to Assets
14
+ Place your image file in your project's assets directory.
15
+
16
+ ```bash
17
+ # Example structure
18
+ my-project/
19
+ ├── assets/
20
+ │ └── my-icon.ico <-- Your file here
21
+ ├── docs/
22
+ └── docmd.config.js
23
+ ```
24
+
25
+ ## 3. Update Configuration
26
+ Open `docmd.config.js` and update the `favicon` property with the path relative to the output root.
27
+
28
+ ```javascript
29
+ module.exports = {
30
+ // ...
31
+ // Points to site/assets/my-icon.ico
32
+ favicon: '/assets/my-icon.ico',
33
+ // ...
34
+ };
35
+ ```
36
+
37
+ ## 4. Build
38
+ Run `docmd build` (or `docmd dev`). `docmd` will automatically copy your asset file to the site build and link it in the `<head>` of every page.
@@ -0,0 +1,12 @@
1
+ ---
2
+ title: "Recipes to cook best of docmd"
3
+ description: "Step-by-step guides for common docmd customizations."
4
+ ---
5
+
6
+ # Recipes
7
+
8
+ Common patterns and "how-to" guides for getting the most out of `docmd`.
9
+
10
+ * [**Custom Fonts**](./custom-fonts) - Give your docs a unique personality by loading Google Fonts or local font files.
11
+ * [**Landing Pages**](./landing-page) - How to create a beautiful, full-width marketing page using the `noStyle` feature.
12
+ * [**Custom Favicon**](./favicon) - Simple steps to adding your brand's icon.
@@ -0,0 +1,46 @@
1
+ ---
2
+ title: "Recipe: Marketing Landing Page"
3
+ description: "How to build a custom landing page using noStyle."
4
+ ---
5
+
6
+ # Creating a Landing Page
7
+
8
+ Sometimes you want your `index.html` (the home page) to look completely different from your documentation—like a product marketing page. `docmd` makes this easy with **No-Style Pages**.
9
+
10
+ ## The Concept
11
+ By adding `noStyle: true` to your frontmatter, `docmd` strips away the sidebar, header, and default CSS, giving you a blank canvas while still keeping helpful meta tags.
12
+
13
+ ## Implementation
14
+
15
+ Create or edit `docs/index.md`:
16
+
17
+ ```html
18
+ ---
19
+ title: "My Product"
20
+ description: " The best product ever."
21
+ noStyle: true
22
+ components:
23
+ meta: true # Keep SEO tags
24
+ favicon: true # Keep favicon
25
+ scripts: false # Disable default docmd scripts
26
+ customHead: |
27
+ <style>
28
+ body { font-family: sans-serif; margin: 0; }
29
+ .hero { background: #111; color: #fff; padding: 100px 20px; text-align: center; }
30
+ .btn { background: #3b82f6; color: white; padding: 10px 20px; text-decoration: none; border-radius: 5px; }
31
+ </style>
32
+ ---
33
+
34
+ <div class="hero">
35
+ <h1>Welcome to My Product</h1>
36
+ <p>The ultimate solution for X, Y, and Z.</p>
37
+ <br>
38
+ <a href="/getting-started/" class="btn">Read the Docs →</a>
39
+ </div>
40
+
41
+ <div class="features">
42
+ <!-- Your custom HTML features grid here -->
43
+ </div>
44
+ ```
45
+
46
+ This page will be built as `index.html` but will look exactly like your custom HTML, serving as a perfect entry point to your documentation.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mgks/docmd",
3
- "version": "0.2.5",
3
+ "version": "0.2.7",
4
4
  "description": "Generate beautiful, lightweight static documentation sites directly from your Markdown files. Zero clutter, just content.",
5
5
  "main": "src/index.js",
6
6
  "exports": {
@@ -15,6 +15,7 @@
15
15
  "scripts": {
16
16
  "start": "node ./bin/docmd.js dev",
17
17
  "build": "node ./bin/docmd.js build",
18
+ "postinstall": "node ./bin/postinstall.js",
18
19
  "lint": "eslint .",
19
20
  "format": "prettier --write .",
20
21
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -41,6 +42,8 @@
41
42
  },
42
43
  "homepage": "https://github.com/mgks/docmd#readme",
43
44
  "dependencies": {
45
+ "@mgks/docmd": "^0.2.5",
46
+ "chalk": "^4.1.2",
44
47
  "chokidar": "^4.0.3",
45
48
  "commander": "^14.0.0",
46
49
  "ejs": "^3.1.9",