|
| 1 | +# MongoDB Hugo Theme |
| 2 | + |
| 3 | +## Quick Start |
| 4 | + |
| 5 | + 1. Install hugo |
| 6 | + 2. Create your new site: `hugo new site <SITENAME>` |
| 7 | + 3. Copy this theme to: `<SITENAME>/themes/mongodb` |
| 8 | + 4. Add `theme = mongodb` to config.toml |
| 9 | + 5. Create `<SITENAME>/data/mongodb.toml` and configure |
| 10 | + 6. Create content |
| 11 | + |
| 12 | +## Requirements |
| 13 | +Hugo version 0.13 [download here](https://github.com/spf13/hugo/releases/tag/v0.13) |
| 14 | +<br> |
| 15 | +Check out the hugo [quickstart guide](http://gohugo.io/overview/quickstart/). |
| 16 | + |
| 17 | +## Running the server |
| 18 | +To run the server call the hugo command: |
| 19 | + |
| 20 | + hugo server --baseUrl=http://localhost/ --buildDrafts --watch |
| 21 | + |
| 22 | +| Options explained || |
| 23 | +| --------------------------- |--------------------------------------------------------------------------| |
| 24 | +| server | Hugo runs its own webserver to render the files | |
| 25 | +| --baseUrl=http://localhost/ | Normally the base url will be /mongo-java-driver for gh-pages | |
| 26 | +| --buildDrafts | Include draft posts in the output - these won't be published to gh-pages | |
| 27 | +| -- watch | Automatically reloads on file change | |
| 28 | + |
| 29 | + |
| 30 | +All generated content will appear in the `./public` folder, so you can also check the filesystem and browse it locally.<br> |
| 31 | +For more hugo server options run: `hugo --help` |
| 32 | + |
| 33 | +### Data |
| 34 | + |
| 35 | +You *should* create `./data/mongodb.toml` and copy the `themes/mongodb/data/mongodb.toml` file and set the values as needed. |
| 36 | + |
| 37 | +## Creating new content |
| 38 | + |
| 39 | +Handy [markdown cheat sheet](https://github.com/adam-p/markdown-here/wiki/Markdown-Here-Cheatsheet) will help with markdown issues and in markdown you can fall back to html if needed. |
| 40 | + |
| 41 | +To create new content run: `hugo new <contentFileName>.md` and the new file will created in the `./content` directory and marked as a `draft`. |
| 42 | + |
| 43 | +Its a good idea to group similar content together by placing it in a directory which can also be done by the `new` command eg: `hugo new tutorial/newTutorial.md` |
| 44 | + |
| 45 | +### Menus |
| 46 | +Menu configuration generally goes in the content |
| 47 | +[front matter](http://gohugo.io/content/front-matter/). See the hugo [menu](http://gohugo.io/extras/menus/) docs, menus can also be configured in the top level `config.toml`. |
| 48 | + |
| 49 | +The weight parameter relates to where it will appear in the menu starting with the lowest at the top and the highest at the bottom (heavy things sink). |
| 50 | + |
| 51 | +## MongoDB Theme |
| 52 | +**Do not delete / change anything in themes**.<br> |
| 53 | +Currently, `./themes/mongodb` provides all templates and configuration. You can override *anything* by providing a top level version in the top level directory (`data, layouts, static`), so feel free to copy or add your own layouts. |
| 54 | + |
| 55 | +You shouldn't edit the mongodb theme directly as it will be updated and any changes will be lost. |
0 commit comments