Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ enableGitInfo = true # N.B. .GitInfo does not currently function with submodule
[params]

# google_fonts = [
# ["Nunito Sans", "300, 400, 600, 700"],
# ["Comic Neue", "300, 400, 600, 700"],
# ["Source Code Pro", "500, 700"]
# ]

# sans_serif_font = "Nunito Sans" # Default is System font
# secondary_font = "Nunito Sans" # Default is System font
# sans_serif_font = "Comic Neue" # Default is System font
# secondary_font = "Comic Neue" # Default is System font
# mono_font = "Source Code Pro" # Default is System font

[params.footer]
Expand All @@ -46,6 +46,8 @@ enableGitInfo = true # N.B. .GitInfo does not currently function with submodule
[params.docs] # Parameters for the /docs 'template'
title = "Lotus Labs Documentation" # default html title for documentation pages/sections

darkMode = true # enable dark mode option? default false

ghrepo = "github.com/colinwilson/lotusdocs.vercel.app" # Git repository URL for your site
editPage = true # enable 'Edit this page' feature - default false
lastMod = true # enable 'Last modified' date on pages - default false
Expand All @@ -67,7 +69,7 @@ enableGitInfo = true # N.B. .GitInfo does not currently function with submodule

[params.docsearch] # Parameters for DocSearch
appID = "O2QIOCBDAK" # Algolia Application ID
apiKey = "fdc60eee76a72a35d739b54521498b77" # Algolia Search-Only API Key
apiKey = "fdc60eee76a72a35d739b54521498b77" # Algolia Search-Only API (Public) Key
indexName = "prod_lotusdocs.dev" # Index Name to perform search on (or set env variable HUGO_PARAM_DOCSEARCH_indexName)

[menu]
Expand Down
11 changes: 11 additions & 0 deletions content/docs/feature-guide/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
weight: 210
title: "Feature Guide"
description: "A Guide to Using Lotus Docs' Features."
icon: celebration
lead: ""
date: 2022-11-22T12:36:15+00:00
lastmod: 2022-11-22T12:36:15+00:00
draft: true
images: []
---
11 changes: 11 additions & 0 deletions content/docs/feature-guide/shortcodes/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
weight: 220
title: "Shortcodes"
description: "Lotus Docs Custom Shortcodes."
icon: code
lead: ""
date: 2022-11-22T12:40:15+00:00
lastmod: 2022-11-22T12:40:15+00:00
draft: true
images: []
---
102 changes: 102 additions & 0 deletions content/docs/feature-guide/shortcodes/alerts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
---
weight: 220
title: "Alerts"
icon: notification_important
description: "How to use Alert Shortcodes to render custom page alerts in markdown."
lead: "Alerts."
date: 2022-11-22T13:42:31+00:00
lastmod: 2022-11-22T13:42:31+00:00
draft: true
images: []
toc: true
---

## Adding a Page Alert

A page alert can be added to your markdown using the following Hugo shortcode:

```md
{{</* alert text="This is the default alert. It consists of a default theme colour and icon." /*/>}}
```

The above code results in the following alert:

{{< alert text="This is the default alert. It consists of a default theme colour and icon." />}}

## Alert with Context

Add context to an alert via the `context` parameter:

```md
{{</* alert context="info" text="This is an alert with an <strong>info</strong> context. It consists of the info theme colour and icon." /*/>}}
```

Here's what is rendered:

{{< alert context="info" text="This is an alert with an <strong>info</strong> context. It consists of the info theme colour and icon." />}}

Additional alert contexts include `success`, `danger`, `warning`, `primary`, `light` and `dark`:

{{< alert context="success" text="This is an alert with a <strong>success</strong> context. It consists of the success theme colour and icon." />}}

{{< alert context="danger" text="This is an alert with a <strong>danger</strong> context. It consists of the danger theme colour and icon." />}}

{{< alert context="warning" text="This is an alert with a <strong>warning</strong> context. It consists of the warning theme colour and icon." />}}

{{< alert context="primary" text="This is an alert with a <strong>primary</strong> context. Its theme and icon colors match those of the current primary theme colour." />}}

{{< alert context="light" text="This is an alert with a <strong>light</strong> context. It consists of the light theme colour. The light alert has no default icon." />}}

{{< alert context="dark" text="This is an alert with a <strong>dark</strong> context. It consists of the dark theme colour. The dark alert has no default icon." />}}

## Alert with Custom Emoji Icon

The default icon for an alert context can be substituted with an emoji using the `icon` parameter:

```md
{{</* alert icon="🍅" context="info" text="This is an <strong>info</strong> context alert with a tomato emoji replacing the default icon. The info theme colour remains unchanged." /*/>}}
```

{{< alert icon="🍅" context="info" text="This is an <strong>info</strong> context alert with a tomato emoji replacing the default icon. The info theme colour remains unchanged." />}}

## Alert with No Icon

An alert can be rendered without its default icon by setting the `icon` parameter to an empty space, `icon=" "`:

{{< alert context="warning" >}}
**N.B.** The icon parameter **must** contain a space. Setting it to `icon=""` will render the default icon.
{{< /alert >}}

```md
{{</* alert icon=" " context="info" text="This <strong>info</strong> context alert has no icon." /*/>}}
```

{{< alert icon=" " context="info" text="This <strong>info</strong> context alert has no icon." />}}

## Render Markdown & HTML inside an Alert

Using a [paired shortcode](https://gohugo.io/content-management/shortcodes/) allows Markdown and HTML to be rendered inside an alert:

```md
{{</* alert icon="🛒" context="success" >}}
This ***paired shortcode*** alert contains a **markdown** list and header:

#### My Shopping List:
1. Tomatoes
2. Bananas
3. Pineapples

and a sentence <em>styled</em> using <strong>HTML</strong> tags such as \<strong\> and \<em\>
{{< /alert /*/>}}
```

{{< alert icon="🛒" context="success" >}}
This ***paired shortcode*** alert contains a **markdown** list and header:

#### My Shopping List:
1. Tomatoes
2. Bananas
3. Pineapples

and a sentence <em>styled</em> using <strong>HTML</strong> tags such as \<strong\> and \<em\>
{{< /alert >}}
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
weight: 240
title: "Tables & Tabs"
icon: table_chart
description: "A demonstration of how Lotus Docs creates and renders table & tabs"
lead: "An example markdown page for testing purposes."
description: "How to use Lotus Docs tables & tabs shortcodes to render great looking markdown tables and tabs"
lead: "Using Hugo shortcodes to render tables and tabs."
date: 2022-11-05T04:41:15+00:00
lastmod: 2022-11-05T04:41:15+00:00
draft: true
images: []
weight: 10040
toc: true
---

Expand Down
2 changes: 1 addition & 1 deletion content/docs/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ categories = [""]
+++

{{< alert context="danger" >}}
Lotus Docs is currently in the very early stages of development and is, therefore, **not** ready for use in production. You're welcome to test the theme yourself, and contributions to [the project](https://github.com/colinwilson/lotusdocs) a very welcome.
Lotus Docs is currently in the very early stages of development and is, therefore, **not** recommended for use in production. You're welcome to test the theme yourself, and contributions to [the project](https://github.com/colinwilson/lotusdocs) a very welcome.
{{< /alert >}}

Welcome to the Lotus Docs user guide. This guide shows you how to start creating technical documentation sites using Lotus Docs, including site customisation and using Lotus Docs' features and templates.
Expand Down
2 changes: 1 addition & 1 deletion content/docs/test_markdown/unorthodox.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ This next sentence [demonstrates](https://colinwilson.uk) the colour of a link i

{{< alert context="danger" text="The Tutorial is intended for novice to intermediate users.<br> Hello World" />}}

{{< alert context="secondary" >}}
{{< alert context="light" >}}
The Tutorial is intended for novice to intermediate users.<br> Hello World
This next sentence [demonstrates](https://colinwilson.uk) the colour of a link inside an alert box.
{{< /alert >}}
Expand Down
2 changes: 1 addition & 1 deletion themes/lotusdocs
Submodule lotusdocs updated 35 files
+1 −1 assets/docs/js/app.js
+15 −0 assets/docs/js/darkmode-init.js
+23 −0 assets/docs/js/darkmode-switch.js
+1 −1 assets/docs/js/docsearch.min.js
+366 −1,618 assets/docs/scss/_variables.scss
+138 −51 assets/docs/scss/custom/components/_alerts.scss
+32 −14 assets/docs/scss/custom/components/_backgrounds.scss
+18 −0 assets/docs/scss/custom/components/_breadcrumb.scss
+100 −24 assets/docs/scss/custom/components/_buttons.scss
+2 −0 assets/docs/scss/custom/components/_card.scss
+2 −2 assets/docs/scss/custom/components/_forms.scss
+76 −188 assets/docs/scss/custom/pages/_features.scss
+20 −19 assets/docs/scss/custom/pages/_helper.scss
+1 −1 assets/docs/scss/custom/pages/_simplebar.scss
+39 −14 assets/docs/scss/custom/plugins/docsearch/_style.scss
+44 −10 assets/docs/scss/custom/structure/_content.scss
+19 −0 assets/docs/scss/custom/structure/_doc-nav.scss
+3 −3 assets/docs/scss/custom/structure/_footer.scss
+8 −3 assets/docs/scss/custom/structure/_general.scss
+37 −192 assets/docs/scss/custom/structure/_sidebar.scss
+5 −4 assets/docs/scss/custom/structure/_toc.scss
+5 −4 assets/docs/scss/style.scss
+1 −1 assets/images/social/github.svg
+1 −1 assets/images/social/instagram.svg
+1 −1 assets/images/social/rss.svg
+1 −1 assets/images/social/twitter.svg
+8 −2 layouts/docs/baseof.html
+2 −2 layouts/docs/list.html
+1 −1 layouts/partials/docs/breadcrumbs.html
+5 −3 layouts/partials/docs/doc-nav.html
+1 −1 layouts/partials/docs/footer.html
+5 −0 layouts/partials/docs/head.html
+7 −6 layouts/partials/docs/sidebar.html
+25 −109 layouts/partials/docs/top-header.html
+0 −1 layouts/shortcodes/alert.html