bitovi / bitovi/documentjs

Better file structure for themes

Open
#201 1 comment 0 reactions 0 assignees View on GitHub
feature usability
Dominant language
JavaScript
Stars
598
Forks
371
PR merge metrics
No merged PRs in 30d

Description

I think we should reconsider the file structure for themes. Currently, it includes a `static` and a `templates` folder and both must be declared in `documentjs.json` for it to work.
### Suggestions
#### 1. Allow the `documentjs.json` to accept one parameter for the entire theme like:

```
"siteDefaults": {
"theme": "themes/my-awesome-theme"
},
```

This declaration would cause DocumentJS to get everything from this folder.
#### 2. Change the folder structure

The current folder structure with `static` doesn't make sense because `less` is not static and this folder also contains two mustache template files. Plus, it's messy having all the JS and other stuff in there.

I think it would be easier to manage if there were only 4 folders inside the theme folder:
- `templates` - all the mustache templates
- `css` or `less` - all the style files
- `images` - if any
- `js` - for the javascript

Any other files could also live in these folders and would be copied to the output directory.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.