From 1a80385a4812c826d4d93df5a82b48635479abae Mon Sep 17 00:00:00 2001 From: Mahmoud Zalt Date: Fri, 10 Mar 2017 13:48:13 -0500 Subject: [PATCH] change some desgins in the docs site --- docs/_settings/config.toml | 12 +- docs/_settings/content/contributing/index.md | 4 +- .../exampleSite/config.toml | 78 ------ .../content/adding-content/index.md | 61 ----- .../content/getting-started/index.md | 240 ------------------ .../exampleSite/content/index.md | 55 ---- .../exampleSite/content/license/index.md | 27 -- .../exampleSite/content/roadmap/index.md | 27 -- .../exampleSite/static/.gitkeep | 0 .../hugo-material-docs/layouts/index.html | 4 +- .../layouts/partials/drawer.html | 50 ++-- .../layouts/partials/header.html | 7 +- docs/contributing/index.html | 69 ++--- docs/contributing/index.xml | 8 +- docs/documentation/index.html | 95 ++++--- docs/documentation/index.xml | 34 ++- docs/getting-started/index.html | 65 ++--- docs/getting-started/index.xml | 4 +- docs/help/index.html | 65 ++--- docs/help/index.xml | 4 +- docs/index.html | 108 ++++---- docs/index.xml | 39 ++- docs/introduction/index.html | 66 ++--- docs/introduction/index.xml | 5 +- docs/license/index.html | 65 ++--- docs/license/index.xml | 4 +- docs/related-projects/index.html | 65 ++--- docs/related-projects/index.xml | 4 +- 28 files changed, 377 insertions(+), 888 deletions(-) delete mode 100755 docs/_settings/themes/hugo-material-docs/exampleSite/config.toml delete mode 100644 docs/_settings/themes/hugo-material-docs/exampleSite/content/adding-content/index.md delete mode 100644 docs/_settings/themes/hugo-material-docs/exampleSite/content/getting-started/index.md delete mode 100644 docs/_settings/themes/hugo-material-docs/exampleSite/content/index.md delete mode 100644 docs/_settings/themes/hugo-material-docs/exampleSite/content/license/index.md delete mode 100644 docs/_settings/themes/hugo-material-docs/exampleSite/content/roadmap/index.md delete mode 100644 docs/_settings/themes/hugo-material-docs/exampleSite/static/.gitkeep diff --git a/docs/_settings/config.toml b/docs/_settings/config.toml index 67fda545..d204953d 100644 --- a/docs/_settings/config.toml +++ b/docs/_settings/config.toml @@ -1,7 +1,7 @@ baseurl = "http://laradock.io/" languageCode = "en-us" publishDir = "../" -title = "Laradock Docs" +title = "Laradock" theme = "hugo-material-docs" metadataformat = "yaml" canonifyurls = true @@ -15,8 +15,8 @@ googleAnalytics = "UA-37514928-9" copyright = "" # Repository - provider = "GitHub" - repo_url = "https://github.com/laradock/laradock" + provider = "" + repo_url = "" version = "" logo = "" @@ -32,8 +32,8 @@ googleAnalytics = "UA-37514928-9" highlight_css = "" [params.palette] - primary = "purple" - accent = "deep-purple" + primary = "deep-purple" + accent = "purple" [params.font] text = "Doctarine" @@ -41,7 +41,7 @@ googleAnalytics = "UA-37514928-9" [social] twitter = "" - github = "laradock" + github = "laradock/laradock" email = "" # ------- MENU START ----------------------------------------- diff --git a/docs/_settings/content/contributing/index.md b/docs/_settings/content/contributing/index.md index 7e8c8df2..4631aa7a 100644 --- a/docs/_settings/content/contributing/index.md +++ b/docs/_settings/content/contributing/index.md @@ -19,7 +19,7 @@ submitting an [Issue](https://github.com/laradock/laradock/issues). Even better You can request a new feature by submitting an [Issue](https://github.com/laradock/laradock/issues) (it will be labeled as Feature Suggestion). If you would like to implement a new feature then consider submitting a Pull Request. -## Edit the documentation +## Update Documentation (Site) Laradock uses [Hugo](https://gohugo.io/) as website generator tool, with the [Material Docs theme](http://themes.gohugo.io/theme/material-docs/). You might need to check their docs quickly. @@ -30,7 +30,7 @@ Laradock uses [Hugo](https://gohugo.io/) as website generator tool, with the [Ma 4. Delete everything except the `_settings` folder & the `CNAME` file. 5. Open `docs/_settings` from your terminal and run `hugo serve` to host the website locally. 6. Open the `docs/_settings/content` and search for the folder of the section you want to edit. -7. In each secion there's an `index.md` file, that's the file you need to edit. +7. In each section there's an `index.md` file, that's the file you need to edit. 8. To edit the sidebar (in case you are adding new section) go to `docs/_settings/config.toml` and add the section there. 9. After done editing, run the this command `hugo` to generate the updated site inside the `docs` folder. 10. Go back to the project root directory, commit and push.. diff --git a/docs/_settings/themes/hugo-material-docs/exampleSite/config.toml b/docs/_settings/themes/hugo-material-docs/exampleSite/config.toml deleted file mode 100755 index 85c63523..00000000 --- a/docs/_settings/themes/hugo-material-docs/exampleSite/config.toml +++ /dev/null @@ -1,78 +0,0 @@ -baseurl = "https://example.org/" -languageCode = "en-us" -title = "Material Docs" -theme = "hugo-material-docs" -metadataformat = "yaml" -canonifyurls = true -# Enable Google Analytics by entering your tracking id -googleAnalytics = "" - -[params] - # General information - author = "Digitalcraftsman" - description = "A material design theme for documentations." - copyright = "Released under the MIT license" - - # Repository - provider = "GitHub" - repo_url = "https://github.com/digitalcraftsman/hugo-material-docs" - - version = "1.0.0" - logo = "images/logo.png" - favicon = "" - - permalink = "#" - - # Custom assets - custom_css = [] - custom_js = [] - - # Syntax highlighting theme - highlight_css = "" - - [params.palette] - primary = "red" - accent = "teal" - - [params.font] - text = "Ubuntu" - code = "Ubuntu Mono" - - -[social] - twitter = "" - github = "digitalcraftsman" - email = "hello@email.com" - - -[[menu.main]] - name = "Material" - url = "/" - weight = 0 - -[[menu.main]] - name = "Getting started" - url = "getting-started/" - weight = 10 - -[[menu.main]] - name = "Adding content" - url = "adding-content/" - weight = 20 - -[[menu.main]] - name = "Roadmap" - url = "roadmap/" - weight = 30 - -[[menu.main]] - name = "License" - url = "license/" - weight = 40 - - -[blackfriday] - smartypants = true - fractions = true - smartDashes = true - plainIDAnchors = true diff --git a/docs/_settings/themes/hugo-material-docs/exampleSite/content/adding-content/index.md b/docs/_settings/themes/hugo-material-docs/exampleSite/content/adding-content/index.md deleted file mode 100644 index 2fce91e3..00000000 --- a/docs/_settings/themes/hugo-material-docs/exampleSite/content/adding-content/index.md +++ /dev/null @@ -1,61 +0,0 @@ ---- -date: 2016-03-09T19:56:50+01:00 -title: Adding content -weight: 20 ---- - -## Hello world - -Let's create our first content file for your documentation. Open a terminal and add the following command for each new file you want to add. Replace `` with a general term that describes your document in detail. - -```sh -hugo new /filename.md -``` - -Visitors of your website will find the final document under `www.example.com//filename/`. - -Since it's possible to have multiple content files in the same section I recommend to create at least one `index.md` file per section. This ensures that users will find an index page under `www.example.com/`. - -## Homepage - -To add content to the homepage you need to add a small indicator to the frontmatter of the content file: - -```toml -type: index -``` - -Otherwise the theme will not be able to find the corresponding content file. - -## Table of contents - -You maybe noticed that the menu on the left contains a small table of contents of the current page. All `

` tags (`## Headline` in Markdown) will be added automatically. - -## Admonitions - -Admonition is a handy feature that adds block-styled side content to your documentation, for example hints, notes or warnings. It can be enabled by using the corresponding [shortcodes](http://gohugo.io/extras/shortcodes/) inside your content: - -```go -{{}} -Nothing to see here, move along. -{{}} -``` - -This will print the following block: - -{{< note title="Note" >}} -Nothing to see here, move along. -{{< /note >}} - -The shortcode adds a neutral color for the note class and a red color for the warning class. You can also add a custom title: - -```go -{{}} -Nothing to see here, move along. -{{}} -``` - -This will print the following block: - -{{< warning title="Don't try this at home" >}} -Nothing to see here, move along. -{{< /warning >}} diff --git a/docs/_settings/themes/hugo-material-docs/exampleSite/content/getting-started/index.md b/docs/_settings/themes/hugo-material-docs/exampleSite/content/getting-started/index.md deleted file mode 100644 index e501c04b..00000000 --- a/docs/_settings/themes/hugo-material-docs/exampleSite/content/getting-started/index.md +++ /dev/null @@ -1,240 +0,0 @@ ---- -date: 2016-03-09T00:11:02+01:00 -title: Getting started -weight: 10 ---- - -## Installation - -### Installing Hugo - -Hugo itself is just a single binary without dependencies on expensive runtimes like Ruby, Python or PHP and without dependencies on any databases. You just need to download the [latest version](https://github.com/spf13/hugo/releases). For more information read the official [installation guides](http://gohugo.io/overview/installing/). - -Let's make sure Hugo is set up as expected. You should see a similar version number in your terminal: - -```sh -hugo version -# Hugo Static Site Generator v0.15 BuildDate: 2016-01-03T12:47:47+01:00 -``` - -### Installing Material - -Next, assuming you have Hugo up and running the `hugo-material-docs` theme can be installed with `git`: - -```sh -# create a new Hugo website -hugo new site my-awesome-docs - -# move into the themes folder of your website -cd my-awesome-docs/themes/ - -# download the theme -git clone git@github.com:digitalcraftsman/hugo-material-docs.git -``` - -## Setup - -Next, take a look in the `exampleSite` folder at `themes/hugo-material-docs/`. This directory contains an example config file and the content that you are currently reading. It serves as an example setup for your documentation. - -Copy at least the `config.toml` in the root directory of your website. Overwrite the existing config file if necessary. - -Hugo includes a development server, so you can view your changes as you go - -very handy. Spin it up with the following command: - -``` sh -hugo server -``` - -Now you can go to [localhost:1313](http://localhost:1313) and the Material -theme should be visible. You can now start writing your documentation, or read -on and customize the theme through some options. - -## Configuration - -Before you are able to deploy your documentation you should take a few minute to adjust some information in the `config.toml`. Open the file in an editor: - -```toml -baseurl = "https://example.com/" -languageCode = "en-us" -title = "Material Docs" - -[params] - # General information - author = "Digitalcraftsman" - description = "A material design theme for documentations." - copyright = "Released under the MIT license" -``` - -## Options - -### Github integration - -If your project is hosted on GitHub, add the repository link to the -configuration. If the `provider` equals **GitHub**, the Material theme will -add a download and star button, and display the number of stars: - -```toml -[params] - # Repository - provider = "GitHub" - repo_url = "https://github.com/digitalcraftsman/hugo-material-docs" -``` - -### Adding a version - -In order to add the current version next to the project banner inside the -drawer, you can set the variable `version`: - -```toml -[params] - version = "1.0.0" -``` - -This will also change the link behind the download button to point to the -archive with the respective version on GitHub, assuming a release tagged with -this exact version identifier. - -### Adding a logo - -If your project has a logo, you can add it to the drawer/navigation by defining -the variable `logo`. Ideally, the image of your logo should have -rectangular shape with a minimum resolution of 128x128 and leave some room -towards the edges. The logo will also be used as a web application icon on iOS. -Either save your logo somewhere in the `static/` folder and reference the file relative to this location or use an external URL: - -```toml -[params] - logo = "images/logo.png" -``` - -### Adding a custom favicon - -Favicons are small small icons that are displayed in the tabs right next to the title of the current page. As with the logo above you need to save your favicon in `static/` and link it relative to this folder or use an external URL: - -```toml -[params] - favicon = "favicon.ico" -``` - -### Google Analytics - -You can enable Google Analytics by replacing `UA-XXXXXXXX-X` with your own tracking code. - -```toml -googleAnalytics = "UA-XXXXXXXX-X" -``` - -### Small tweaks - -This theme provides a simple way for making small adjustments, that is changing -some margins, centering text, etc. The `custom_css` and `custom_js` option allow you to add further CSS and JS files. They can either reside locally in the `/static` folder or on an external server, e.g. a CDN. In both cases use either the relative path to `/static` or the absolute URL to the external ressource. - - -```toml -[params] - # Custom assets - custom_css = [ - "foo.css", - "bar.css" - ] - - custom_js = ["buzz.js"] -``` - -### Changing the color palette - -Material defines a default hue for every primary and accent color on Google's -material design [color palette][]. This makes it very easy to change the overall look of the theme. Just set the variables `palette.primary` and `palette.accent` to one of the colors defined in the palette: - -```toml -[params.palette] - primary = "red" - accent = "light-green" -``` - -Color names can be written upper- or lowercase but must match the names of the -material design [color palette](http://www.materialui.co/colors). Valid values are: _red_, _pink_, _purple_, _deep purple_, _indigo_, _blue_, _light-blue_, _cyan_, _teal_, _green_, _light-green_, -_lime_, _yellow_, _amber_, _orange_, _deep-orange_, _brown_, _grey_ and -_blue-grey_. The last three colors can only be used as a primary color. - -![Color palette](/images/colors.png) - -If the color is set via this configuration, an additional CSS file called -`palettes.css` is included that defines the color palettes. - -### Changing the font family - -Material uses the [Ubuntu font family](http://font.ubuntu.com) by default, specifically the regular sans-serif type for text and the monospaced type for code. Both fonts are loaded from [Google Fonts](https://www.google.com/fonts) and can be easily changed to other fonts, like for example Google's own [Roboto font](https://www.google.com/fonts/specimen/Roboto): - -```toml -[params.font] - text = "Roboto" - code = "Roboto Mono" -``` - -The text font will be loaded in font-weights 400 and **700**, the monospaced -font in regular weight. - -### Syntax highlighting - -This theme uses the popular [Highlight.js](https://highlightjs.org/) library to colorize code examples. The default theme is called `Github` with a few small tweaks. You can link our own theme if you like. Again, store your stylesheet in the `static/` folder and set the relative path in the config file: - -```toml -[params] - # Syntax highlighting theme - highlight_css = "path/to/theme.css" -``` - -### Adding a GitHub and Twitter account - -If you have a GitHub and/or Twitter account, you can add links to your -accounts to the drawer by setting the variables `github` and -`twitter` respectively: - -``` toml -[social] - twitter = "" - github = "digitalcraftsman" -``` - -### Adding menu entries - -Once you created your first content files you can link them manually in the sidebar on the left. A menu entry has the following schema: - -```toml -[[menu.main]] - name = "Material" - url = "/" - weight = 0 - pre = "" -``` - -`name` is the title displayed in the menu and `url` the relative URL to the content. The `weight` attribute allows you to modify the order of the menu entries. A menu entry appears further down the more weight you add. The `pre` attribute is optional and allows you to *pre*pend elements to a menu link, e.g. an icon. - -Instead of just linking a single file you can enhance the sidebar by creating a nested menu. This way you can list all pages of a section instead of linking them one by one (without nesting). - -You need extend the frontmatter of each file content file in a section slightly. The snippet below registers this content file as 'child' of a menu entry that already exists. - -```yaml -menu: - main: - parent: Material - identifier: - weight: 0 -``` - -`main` specifies to which menu the content file should be added. `main` is the only menu in this theme by default. `parent` let's you register this content file to an existing menu entry, in this case the `Material` link. Note that the parent in the frontmatter needs to match the name in `config.toml`. - -`identifier` is the link that is shown in the menu. Ideally you choose the same name for the `identifier` and the `title` of the page. Again, `weight` allows you to change the order of the nested links in a section. - -### Markdown extensions - -Hugo uses [Blackfriday](https://github.com/russross/blackfriday) to process your content. For a detailed description of all options take a look at the [Blackfriday configuration](http://gohugo.io/overview/configuration/#configure-blackfriday-rendering) section in the Hugo documentation. - -```toml -[blackfriday] - smartypants = true - fractions = true - smartDashes = true - plainIDAnchors = true -``` diff --git a/docs/_settings/themes/hugo-material-docs/exampleSite/content/index.md b/docs/_settings/themes/hugo-material-docs/exampleSite/content/index.md deleted file mode 100644 index a48262ed..00000000 --- a/docs/_settings/themes/hugo-material-docs/exampleSite/content/index.md +++ /dev/null @@ -1,55 +0,0 @@ ---- -date: 2016-03-08T21:07:13+01:00 -title: Material for Hugo -type: index -weight: 0 ---- - -## Beautiful documentation - -Material is a theme for [Hugo](https://gohugo.io), a fast and flexible static site generator. It is built using Google's [material design](https://www.google.com/design/spec/material-design/introduction.html) -guidelines, fully responsive, optimized for touch and pointer devices as well -as all sorts of screen sizes. - -![Material Screenshot](/images/screen.png) - -Material is very lightweight – it is built from scratch using Javascript and -CSS that weighs less than 30kb (minified, gzipped and excluding Google Fonts -and Analytics). Yet, it is highly customizable and degrades gracefully in older -browsers. - -## Quick start - -Install with `git`: - -```sh -git clone git@github.com:digitalcraftsman/hugo-material-docs.git themes/hugo-material-docs -``` - -## Features - -- Beautiful, readable and very user-friendly design based on Google's material - design guidelines, packed in a full responsive template with a well-defined - and [easily customizable color palette]({{< relref "getting-started/index.md#changing-the-color-palette" >}}), great typography, as well as a - beautiful search interface and footer. - -- Well-tested and optimized Javascript and CSS including a cross-browser - fixed/sticky header, a drawer that even works without Javascript using - the [checkbox hack](http://tutorialzine.com/2015/08/quick-tip-css-only-dropdowns-with-the-checkbox-hack/) with fallbacks, responsive tables that scroll when - the screen is too small and well-defined print styles. - -- Extra configuration options like a [project logo]({{< relref "getting-started/index.md#adding-a-logo" >}}), links to the authors - [GitHub and Twitter accounts]({{< relref "getting-started/index.md#adding-a-github-and-twitter-account" >}}) and display of the amount of stars the - project has on GitHub. - -- Web application capability on iOS – when the page is saved to the homescreen, - it behaves and looks like a native application. - -See the [getting started guide]({{< relref "getting-started/index.md" >}}) for instructions how to get -it up and running. - -## Acknowledgements - -Last but not least a big thank you to [Martin Donath](https://github.com/squidfunk). He created the original [Material theme](https://github.com/squidfunk/mkdocs-material) for Hugo's companion [MkDocs](http://www.mkdocs.org/). This port wouldn't be possible without him. - -Furthermore, thanks to [Steve Francia](https://gihub.com/spf13) for creating Hugo and the [awesome community](https://github.com/spf13/hugo/graphs/contributors) around the project. diff --git a/docs/_settings/themes/hugo-material-docs/exampleSite/content/license/index.md b/docs/_settings/themes/hugo-material-docs/exampleSite/content/license/index.md deleted file mode 100644 index 2758c652..00000000 --- a/docs/_settings/themes/hugo-material-docs/exampleSite/content/license/index.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -date: 2016-03-09T20:10:46+01:00 -title: License -weight: 40 ---- - -Copyright (c) 2016 Digitalcraftsman
-Copyright (c) 2016 Martin Donath - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. - diff --git a/docs/_settings/themes/hugo-material-docs/exampleSite/content/roadmap/index.md b/docs/_settings/themes/hugo-material-docs/exampleSite/content/roadmap/index.md deleted file mode 100644 index ea6f2522..00000000 --- a/docs/_settings/themes/hugo-material-docs/exampleSite/content/roadmap/index.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -date: 2016-03-09T20:08:11+01:00 -title: Roadmap -weight: 30 ---- - -Quo vadis? The port of the original [Material theme](https://github.com/squidfunk/mkdocs-material) has replicated nearly all of its features. A few are still missing but I've good news: the Hugo community is actively working on this issues. Maybe with the next release of Hugo we can abandon this list. Stay tuned. - -## Localization - -Currently, it is possible to collect all strings in a single place for easy customization. However, this only enables you to define all strings in a single language. This approach is quite limiting in terms of localization support. Therefore, I decided to wait for a native integration. This way we can avoid a second setup of all strings in your website. - -Keep an eye on [#1734](https://github.com/spf13/hugo/issues/1734). - -## Search - -Beside third-party services, some hacky workarounds and Grunt-/Gulp-based scripts that only require unnecessary dependencies, future versions of Hugo will support the generation of a content index as a core feature. - -This approach plays well with this theme since MkDocs does the same. - -Keep an eye on [#1853](https://github.com/spf13/hugo/pull/1853). - -## Contributing - -Did you found an bug or you would like to suggest a new feature? I'm open for feedback. Please open a new [issue](https://github.com/digitalcraftsman/hugo-material-docs/issues) and let me know. - -You're also welcome to contribute with [pull requests](https://github.com/digitalcraftsman/hugo-material-docs/pulls). diff --git a/docs/_settings/themes/hugo-material-docs/exampleSite/static/.gitkeep b/docs/_settings/themes/hugo-material-docs/exampleSite/static/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/docs/_settings/themes/hugo-material-docs/layouts/index.html b/docs/_settings/themes/hugo-material-docs/layouts/index.html index cabbd580..703e7e8c 100644 --- a/docs/_settings/themes/hugo-material-docs/layouts/index.html +++ b/docs/_settings/themes/hugo-material-docs/layouts/index.html @@ -37,7 +37,9 @@ Documentation built with Hugo using the - Material theme. + Material theme, + by + Mahmoud Zalt.