Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docma only creates README/guide #42

Closed
MarcTroll opened this issue Jul 28, 2018 · 2 comments
Closed

Docma only creates README/guide #42

MarcTroll opened this issue Jul 28, 2018 · 2 comments
Labels

Comments

@MarcTroll
Copy link

Hey, I'm trying to use Docma for my own CMS based on Node.js, but running Docma only generates a page for my README.md (so the guide). I started writing a script (docma.js) in my project's root with the following content:

"use strict";

const Docma = require("docma");

const buildConfig = {
	src: [
		{
			core: './index.js'
		},
		'./LICENSE.md',
		{
			guide: './README.md'
		}
	],
	dest: './output/docs',
	app: {
		title: 'WebSuite Documentation',
		routing: 'path',
		entrance: 'content:guide',
		base: '/docs'
	},
	template: {
		path: 'zebra',
		options: {
			title: {
				label: 'WebSuite Documentation',
				href: '/docs/?'
			},
			navbar: true,
			sidebar: {
				enabled: true,
				outline: 'tree',
				collapsed: true,
				toolbar: true
			}
		}
	},
	clean: "true"
};

Docma.create()
	.build(buildConfig)
	.catch(error => {
		console.log(error);
	});

Currently the app-entrance is the guide. When now visiting the docs I see my README.md. But changing now the app-entrance to my 'core', that currently has only one file to test it, then I get a 404-Error visiting my docs.

Following you'll find a screenshot from IntelliJ from the output-folder:
Screenshot from Gyazo

Did I do any mistakes writing my config? Thanks for helping me :)

Greetings from Germany
ilou

@onury
Copy link
Owner

onury commented Aug 24, 2018

Hi. Your output seems ok.
If you're changing entrance to a api route, you should set it to entrance: "api:core".
You can also play with the base option to see if it's set correctly, depending on your directory structure.

@onury
Copy link
Owner

onury commented Nov 13, 2018

Docma creates HTML files for parsed markdown.
JSDoc data is built into the docma-web.js (they are not parsed as static HTML files); but if you set routing method to path, a directory structure with index files (for redirection) are created.
In your screenshot, I see api/core paths are created. It seems nothing is wrong here. So closing this.

@onury onury closed this as completed Nov 13, 2018
@onury onury added the invalid label Nov 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants