diff --git a/exampleSite/content/samples/_index.md b/exampleSite/content/samples/_index.md index fcce5fef..2d9820c9 100755 --- a/exampleSite/content/samples/_index.md +++ b/exampleSite/content/samples/_index.md @@ -11,9 +11,7 @@ cascade: Congo brings your content to life. :heart_eyes: {{< /lead >}} -This section contains some demo pages that show how Congo renders different types of content. These pages come from Hugo's official [hugoBasicExample](https://github.com/gohugoio/hugoBasicExample) repository. - -You can also see an example [taxonomy listing]({{< ref "tags" >}}) page. +This section contains some demo pages that show how Congo renders different types of content. You can also see an example [taxonomy listing]({{< ref "tags" >}}) page. _**Sidenote:** This page is just a standard Congo article listing and Hugo has been configured to generate a `samples` content type and display article summaries._ diff --git a/exampleSite/content/samples/diagrams-flowcharts.md b/exampleSite/content/samples/diagrams-flowcharts.md new file mode 100755 index 00000000..d815552d --- /dev/null +++ b/exampleSite/content/samples/diagrams-flowcharts.md @@ -0,0 +1,90 @@ +--- +title: "Diagrams and Flowcharts" +date: 2019-03-06 +description: "Guide to Mermaid usage in Congo" +summary: "It's easy to add diagrams and flowcharts to articles using Mermaid." +tags: ["mermaid", "sample", "diagram"] +--- + +Mermaid diagrams are supported in Congo using the `mermaid` shortcode. Simply wrap the diagram markup within the shortcode. Congo automatically themes Mermaid diagrams to match the configured `colorScheme` parameter. + +The examples below are a small selection taken from the [official Mermaid docs](https://mermaid-js.github.io/mermaid/). You can also [view the page source](https://raw.githubusercontent.com/jpanther/congo/dev/exampleSite/content/samples/diagrams-flowcharts.md) on GitHub to see the markup. + +## Flowchart + +{{< mermaid >}} +graph TD +A[Christmas] -->|Get money| B(Go shopping) +B --> C{Let me think} +B --> G[/Another/] +C ==>|One| D[Laptop] +C -->|Two| E[iPhone] +C -->|Three| F[Car] +subgraph Section +C +D +E +F +G +end +{{< /mermaid >}} + +## Sequence diagram + +{{< mermaid >}} +sequenceDiagram +autonumber +par Action 1 +Alice->>John: Hello John, how are you? +and Action 2 +Alice->>Bob: Hello Bob, how are you? +end +Alice->>+John: Hello John, how are you? +Alice->>+John: John, can you hear me? +John-->>-Alice: Hi Alice, I can hear you! +Note right of John: John is perceptive +John-->>-Alice: I feel great! +loop Every minute +John-->Alice: Great! +end +{{< /mermaid >}} + +## Class diagram + +{{< mermaid >}} +classDiagram +Animal "1" <|-- Duck +Animal <|-- Fish +Animal <--o Zebra +Animal : +int age +Animal : +String gender +Animal: +isMammal() +Animal: +mate() +class Duck{ ++String beakColor ++swim() ++quack() +} +class Fish{ +-int sizeInFeet +-canEat() +} +class Zebra{ ++bool is_wild ++run() +} +{{< /mermaid >}} + +## Entity relationship diagram + +{{< mermaid >}} +erDiagram +CUSTOMER }|..|{ DELIVERY-ADDRESS : has +CUSTOMER ||--o{ ORDER : places +CUSTOMER ||--o{ INVOICE : "liable for" +DELIVERY-ADDRESS ||--o{ ORDER : receives +INVOICE ||--|{ ORDER : covers +ORDER ||--|{ ORDER-ITEM : includes +PRODUCT-CATEGORY ||--|{ PRODUCT : contains +PRODUCT ||--o{ ORDER-ITEM : "ordered in" +{{< /mermaid >}} diff --git a/exampleSite/content/samples/emoji-support.md b/exampleSite/content/samples/emoji-support.md deleted file mode 100755 index e522e6d2..00000000 --- a/exampleSite/content/samples/emoji-support.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -title: "Emoji Support" -date: 2019-03-05 -description: "Guide to emoji usage in Hugo" -summary: "📖🏞️🧗🏽🪂🐉🧙🏽♂️🧚🏽👸" -tags: ["emoji", "sample"] ---- - -Emoji can be enabled in a Hugo project in a number of ways. - -The [`emojify`](https://gohugo.io/functions/emojify/) function can be called directly in templates or [Inline Shortcodes](https://gohugo.io/templates/shortcode-templates/#inline-shortcodes). - -To enable emoji globally, set `enableEmoji` to `true` in your site's [configuration](https://gohugo.io/getting-started/configuration/) and then you can type emoji shorthand codes directly in content files; e.g. - -
🙈 :see_no_evil:
🙉 :hear_no_evil:
🙊 :speak_no_evil: