### Generate Quick Start Button Source: https://github.com/hugo-fixit/docs/blob/main/layouts/_shortcodes/quick-start-btn.html Use this shortcode in your Hugo templates to create a button that links to the main quick start guide. It dynamically fetches the link title, permalink, and description from the specified quick start page. ```html {{- $quickStartPage := .Page.GetPage "/documentation/getting-started/quick-start" -}} npx fixit-cli new my-blog [{{ $quickStartPage.LinkTitle }}]({{ $quickStartPage.RelPermalink }} "{{ $quickStartPage.Description }}") ``` -------------------------------- ### Post Front Matter Example Source: https://github.com/hugo-fixit/docs/blob/main/content/en/documentation/getting-started/configuration/index.md Example of how to assign tags, categories, and collections to a post in its front matter. ```yaml --- title: Configure FixIt date: 2024-03-07T15:37:59+08:00 tags: - Configuration - Installation - Basics categories: - Documentation collections: - Getting Started --- ``` -------------------------------- ### Param Shortcode Example Source: https://github.com/hugo-fixit/docs/blob/main/content/en/documentation/content-management/shortcodes/built-in/index.md Illustrates the usage of the `param` shortcode to display a site parameter. The example shows how to retrieve and render the 'description' parameter. ```go-html-template {{}} ``` -------------------------------- ### Configure site.webmanifest Source: https://github.com/hugo-fixit/docs/blob/main/content/en/guides/pwa-support/index.md This JSON file provides essential information about your web app, such as its name, start URL, and icons. It's required for your app to be installable. ```json { "name": "FixIt Theme Documentation", "short_name": "FixIt Docs", "start_url": "/", "description": "A Clean, Elegant but Advanced Hugo Theme", "theme_color": "#ffffff", "background_color": "#ffffff", "display": "standalone", "icons": [ { "src": "/apple-touch-icon.png", "sizes": "180x180", "type": "image/png", "purpose": "any maskable" }, { "src": "/android-chrome-192x192.png", "sizes": "192x192", "type": "image/png" }, { "src": "/android-chrome-512x512.png", "sizes": "512x512", "type": "image/png" } ] } ``` -------------------------------- ### Install Development Dependencies Source: https://github.com/hugo-fixit/docs/blob/main/README.en.md Install the necessary development dependencies using pnpm. ```bash pnpm install ``` -------------------------------- ### Install Development Dependencies Source: https://github.com/hugo-fixit/docs/blob/main/content/en/contributing/documentation/index.md Install the necessary Node.js dependencies for development. This command should be run after cloning the repository. ```bash npm install ``` -------------------------------- ### Start Hugo Development Server Source: https://github.com/hugo-fixit/docs/blob/main/content/en/documentation/getting-started/quick-start/index.md Run this command to start Hugo's development server. Use `--buildDrafts` or `-D` to include draft content in the preview. It's recommended to add `--disableFastRender` when using features that rely on Hugo's `.Store`. ```bash hugo server --buildDrafts ``` ```bash hugo server -D ``` ```bash hugo server -D --disableFastRender ``` -------------------------------- ### Card Link Examples Source: https://github.com/hugo-fixit/docs/blob/main/content/en/documentation/content-management/shortcodes/extended/introduction/index.md Illustrates how to render links as cards using the 'card' parameter. Includes examples with a custom icon URL and a Font Awesome icon class. ```markdown {{}} {{}} {{}} ``` -------------------------------- ### Example Admonition Shortcode Source: https://github.com/hugo-fixit/docs/blob/main/content/en/documentation/content-management/shortcodes/extended/admonition/index.md Displays an admonition block of type 'example'. ```shortcode {{< admonition example "" false >}} The quick brown fox jumps over the lazy dog. {{< /admonition >}} ``` -------------------------------- ### Tree Diagram Example Source: https://github.com/hugo-fixit/docs/blob/main/content/en/documentation/content-management/diagrams-support/goat/index.md This example demonstrates how to create a tree structure using GoAT's syntax. The output is an SVG representation of the ASCII art. ```goat . . . .--- 1 .-- 1 / 1 / \ | | .---+ .-+ + / \ .---+---. .--+--. | '--- 2 | '-- 2 / \ 2 + + | | | | ---+ ---+ + / \ / \ .-+-. .-+-. .+. .+. | .--- 3 | .-- 3 \ / 3 / \ / \ | | | | | | | | '---+ '-+ + 1 2 3 4 1 2 3 4 1 2 3 4 '--- 4 '-- 4 \ 4 ``` -------------------------------- ### Example Front Matter Configuration Source: https://github.com/hugo-fixit/docs/blob/main/content/en/documentation/content-management/introduction/index.md A comprehensive example of front matter configuration for a post, including general metadata, page style options, and feature toggles for various functionalities like table of contents, math rendering, and comments. ```yaml --- title: My First Post subtitle: '' date: 2020-03-04T15:58:26+08:00 lastmod: 2020-03-04T15:58:26+08:00 draft: true author: '' authorLink: '' authorEmail: '' description: '' keywords: '' license: '' images: [] tags: [] categories: [] featuredImage: '' featuredImagePreview: '' hiddenFromHomePage: false hiddenFromSearch: false twemoji: false lightgallery: true ruby: true fraction: true fontawesome: true linkToMarkdown: true pageStyle: normal toc: enable: true auto: true expirationReminder: enable: false # ... edit: enable: false # ... math: enable: true # ... mapbox: accessToken: '' # ... share: enable: true # ... comment: enable: true # ... library: css: # someCSS = "some.css" # located in "assets/" # Or # someCSS = "https://cdn.example.com/some.css" js: # someJS = "some.js" # located in "assets/" # Or # someJS = "https://cdn.example.com/some.js" seo: images: [] # ... --- ``` -------------------------------- ### APlayer and Audio Shortcode Example Source: https://github.com/hugo-fixit/docs/blob/main/content/en/documentation/content-management/shortcodes/extended/aplayer/index.md This example demonstrates the combined usage of the aplayer and audio shortcodes to create a music player with a custom playlist. Named parameters are required for both shortcodes. The LRC content can be embedded directly within the audio shortcode when lrcType is set to 1. ```markdown {{ {{ {{ [00:00.00]APlayer audio2 [00:04.01]is [00:08.02]amazing {{ {{ }} ``` -------------------------------- ### Mermaid State Diagram Example Source: https://github.com/hugo-fixit/docs/blob/main/content/en/documentation/content-management/shortcodes/extended/mermaid/index.md Example of creating a state diagram using the mermaid shortcode. This illustrates states and transitions. ```markdown {{ stateDiagram-v2 [*] --> Still Still --> [*] Still --> Moving Moving --> Still Moving --> Crash Crash --> [*] {{}} ``` -------------------------------- ### Mermaid Flowchart Example Source: https://github.com/hugo-fixit/docs/blob/main/content/en/documentation/content-management/shortcodes/extended/mermaid/index.md Example of creating a flowchart using the mermaid shortcode. This demonstrates basic node and edge definitions. ```markdown {{ graph LR; A[Hard edge] -->|Link text| B(Round edge) B --> C{Decision} C -->|One| D[Result one] C -->|Two| E[Result two] {{}} ``` -------------------------------- ### Highlight Shortcode Example Source: https://github.com/hugo-fixit/docs/blob/main/content/en/documentation/content-management/shortcodes/built-in/index.md Demonstrates the `highlight` shortcode for rendering syntax-highlighted code blocks. It's recommended to use Markdown code fences for better features. ```go-html-template {{}}

{{ .Title }}

{{ range .Pages }} {{ .Render "summary"}} {{ end }}
{{}} ``` -------------------------------- ### Post Front Matter Example Source: https://github.com/hugo-fixit/docs/blob/main/content/en/documentation/getting-started/quick-start/index.md Example of the front matter for a new post, including title, date, and draft status. Content added to the body will be rendered if 'draft' is set to false. ```markdown --- title: My First Post date: 2024-03-01T17:10:04+08:00 draft: true --- ``` -------------------------------- ### Example Usage of Env and Youtube Shortcodes Source: https://github.com/hugo-fixit/docs/blob/main/content/en/documentation/content-management/shortcodes/built-in/index.md Demonstrates how to use the `env` shortcode to conditionally render content and the `youtube` shortcode to embed a YouTube video. ```go-html-template {{< env "production" >}} {{< youtube 2xkNJL4gJ9E >}} {{< /env >}} ``` -------------------------------- ### Install Algolia Atomic Source: https://github.com/hugo-fixit/docs/blob/main/content/en/guides/algolia-atomic/index.md Install the `atomic-algolia` package using npm. This tool helps in uploading your generated `search.json` file to Algolia. ```bash npm install atomic-algolia ``` -------------------------------- ### Initialize npm Project Source: https://github.com/hugo-fixit/docs/blob/main/content/en/guides/algolia-atomic/index.md Run this command in your project's root directory to create a `package.json` file if one does not already exist. This is necessary for installing Node.js dependencies. ```bash npm init ``` -------------------------------- ### Line Decorations Diagram Example Source: https://github.com/hugo-fixit/docs/blob/main/content/en/documentation/content-management/diagrams-support/goat/index.md This GoAT example showcases the use of various line decorations, arrows, and symbols to create intricate diagrams. The output is an SVG. ```goat ________ o * * .--------------. *---+--. | | o o | ^ \ / | .----------. | | | '--* -+- | | v / \ / | | <------. | | | '-----> .---(---' --->*<--- / .+->*<--o----' | | | | | <--' ^ ^ | | | | | ^ \ | '--------' | | \/ *-----' o |<----->| '-----' |__| v '------------' | /\ *---------------' ``` -------------------------------- ### Link with Download Attribute Source: https://github.com/hugo-fixit/docs/blob/main/content/en/documentation/content-management/shortcodes/extended/introduction/index.md Demonstrates using the 'download' attribute with the 'link' shortcode to enable file downloads. Shows examples with and without the 'card' parameter. ```markdown {{}} {{}} ``` -------------------------------- ### Archetype Example Source: https://github.com/hugo-fixit/docs/blob/main/content/en/documentation/content-management/introduction/index.md Demonstrates how to use Hugo's 'new' command with an archetype to create new content, automatically including front matter. ```bash hugo new posts/foo.md ``` -------------------------------- ### MathJax Physics Package Example Source: https://github.com/hugo-fixit/docs/blob/main/content/en/documentation/content-management/mathjax-support/index.md Demonstrates the usage of the 'physics' extension for typesetting quantum mechanics notation. ```tex $$ \mqty(a & b \\ c & d) = \begin{pmatrix} a & b \\ c & d end{pmatrix} $$ ``` -------------------------------- ### Mermaid Sequence Diagram Example Source: https://github.com/hugo-fixit/docs/blob/main/content/en/documentation/content-management/shortcodes/extended/mermaid/index.md Example of creating a sequence diagram using the mermaid shortcode. This illustrates participant interactions and notes. ```markdown {{ sequenceDiagram participant Alice participant Bob Alice->>John: Hello John, how are you? loop Healthcheck John->John: Fight against hypochondria end Note right of John: Rational thoughts
prevail... John-->Alice: Great! John->Bob: How about you? Bob-->John: Jolly good! {{}} ``` -------------------------------- ### Task List Syntax Source: https://github.com/hugo-fixit/docs/blob/main/content/en/documentation/content-management/markdown-syntax/extended/index.md Create task lists by starting each item with a hyphen and space, followed by `[ ]` for incomplete or `[x]` for completed tasks. ```markdown - [x] This is a completed task. - [ ] This is an incomplete task. ``` -------------------------------- ### Mermaid Sankey Diagram Example Source: https://github.com/hugo-fixit/docs/blob/main/content/en/documentation/content-management/diagrams-support/mermaid/index.md This example demonstrates the syntax for creating a Sankey diagram in Mermaid. It includes configuration options and data representing energy flows. ```mermaid --- config: sankey: showValues: false --- sankey-beta Agricultural 'waste',Bio-conversion,124.729 Bio-conversion,Liquid,0.597 Bio-conversion,Losses,26.862 Bio-conversion,Solid,280.322 Bio-conversion,Gas,81.144 Biofuel imports,Liquid,35 Biomass imports,Solid,35 Coal imports,Coal,11.606 Coal reserves,Coal,63.965 Coal,Solid,75.571 District heating,Industry,10.639 District heating,Heating and cooling - commercial,22.505 District heating,Heating and cooling - homes,46.184 Electricity grid,Over generation / exports,104.453 Electricity grid,Heating and cooling - homes,113.726 Electricity grid,H2 conversion,27.14 Electricity grid,Industry,342.165 Electricity grid,Road transport,37.797 Electricity grid,Agriculture,4.412 Electricity grid,Heating and cooling - commercial,40.858 Electricity grid,Losses,56.691 Electricity grid,Rail transport,7.863 Electricity grid,Lighting & appliances - commercial,90.008 Electricity grid,Lighting & appliances - homes,93.494 Gas imports,Ngas,40.719 Gas reserves,Ngas,82.233 Gas,Heating and cooling - commercial,0.129 Gas,Losses,1.401 Gas,Thermal generation,151.891 Gas,Agriculture,2.096 Gas,Industry,48.58 Geothermal,Electricity grid,7.013 H2 conversion,H2,20.897 H2 conversion,Losses,6.242 H2,Road transport,20.897 Hydro,Electricity grid,6.995 Liquid,Industry,121.066 Liquid,International shipping,128.69 Liquid,Road transport,135.835 Liquid,Domestic aviation,14.458 Liquid,International aviation,206.267 Liquid,Agriculture,3.64 Liquid,National navigation,33.218 Liquid,Rail transport,4.413 Marine algae,Bio-conversion,4.375 Ngas,Gas,122.952 Nuclear,Thermal generation,839.978 Oil imports,Oil,504.287 Oil reserves,Oil,107.703 Oil,Liquid,611.99 Other waste,Solid,56.587 Other waste,Bio-conversion,77.81 Pumped heat,Heating and cooling - homes,193.026 Pumped heat,Heating and cooling - commercial,70.672 Solar PV,Electricity grid,59.901 Solar Thermal,Heating and cooling - homes,19.263 Solar,Solar Thermal,19.263 Solar,Solar PV,59.901 Solid,Agriculture,0.882 Solid,Thermal generation,400.12 Solid,Industry,46.477 Thermal generation,Electricity grid,525.531 Thermal generation,Losses,787.129 Thermal generation,District heating,79.329 Tidal,Electricity grid,9.452 UK land based bioenergy,Bio-conversion,182.01 Wave,Electricity grid,19.013 Wind,Electricity grid,289.366 ``` -------------------------------- ### MathJax XyPic Package Example Source: https://github.com/hugo-fixit/docs/blob/main/content/en/documentation/content-management/mathjax-support/index.md Illustrates the use of the 'xypic' extension for drawing commutative diagrams. ```tex $$ \begin{xy} \xymatrix { U \ar@/_/[ddr]_y \ar@{.>}[dr]|{\langle x,y rangle} \ar@/^/[drr]^x \\ & X \times_Z Y \ar[d]^q [r]_p & X \ar[d]_f \\ & Y \ar[r]^g & Z } \end{xy} $$ ``` -------------------------------- ### Simple Mapbox Shortcode Example Source: https://github.com/hugo-fixit/docs/blob/main/content/en/documentation/content-management/shortcodes/extended/mapbox/index.md Demonstrates the basic usage of the mapbox shortcode with positional parameters for longitude, latitude, and zoom. Alternatively, named parameters can be used for the same configuration. ```markdown {{}} Or {{}} ``` -------------------------------- ### Subscript Example Source: https://github.com/hugo-fixit/docs/blob/main/content/en/documentation/content-management/markdown-syntax/extended/index.md Use the '~text~' syntax to render subscript text. ```markdown The chemical formula of water is H~2~O. ``` -------------------------------- ### Mermaid State Diagram Example Source: https://github.com/hugo-fixit/docs/blob/main/content/en/documentation/content-management/diagrams-support/mermaid/index.md Visualizes the different states an object can be in and the transitions between them. Syntax is similar to PlantUML. ```mermaid stateDiagram-v2 [*] --> Still Still --> [*] Still --> Moving Moving --> Still Moving --> Crash Crash --> [*] ``` -------------------------------- ### Mermaid Pie Chart Example Source: https://github.com/hugo-fixit/docs/blob/main/content/en/documentation/content-management/diagrams-support/mermaid/index.md Renders a simple pie chart with labels and their corresponding values. ```mermaid pie "Dogs" : 386 "Cats" : 85 "Rats" : 15 ``` -------------------------------- ### Create Custom Profile Template Source: https://github.com/hugo-fixit/docs/blob/main/content/en/references/blocks/index.md Create a custom HTML file for a block, such as `profile.html`, in the `layouts/_partials/custom/` directory. This example shows a simple text content. ```go-html-template The quick brown fox jumps over the lazy dog. ``` -------------------------------- ### Image Shortcode Examples Source: https://context7.com/hugo-fixit/docs/llms.txt Display images with lightgallery integration, captions, lazy loading, and remote image caching. The `image` shortcode offers several customization options. ```markdown {{}} {{}} ``` -------------------------------- ### Mermaid User Journey Diagram Example Source: https://github.com/hugo-fixit/docs/blob/main/content/en/documentation/content-management/diagrams-support/mermaid/index.md Maps out the steps users take to complete tasks, highlighting current workflows and areas for improvement. ```mermaid journey title My working day section Go to work Make tea: 5: Me Go upstairs: 3: Me Do work: 1: Me, Cat section Go home Go downstairs: 5: Me Sit down: 5: Me ``` -------------------------------- ### Figure Shortcode Example Source: https://github.com/hugo-fixit/docs/blob/main/content/en/documentation/content-management/shortcodes/built-in/index.md Shows how to use the `figure` shortcode to embed an image with a caption. The HTML output is also provided for reference. ```go-html-template {{}} ``` ```html

Lighthouse (figure)

``` -------------------------------- ### Details Shortcode Examples Source: https://context7.com/hugo-fixit/docs/llms.txt Insert an HTML5 `
/` collapsible section using the `details` shortcode. Content can be expanded or collapsed by the user. ```markdown {{}} 1. Install Hugo (extended edition) 2. Clone FixIt theme 3. Run `hugo server` {{}} {{}} **Q: What Hugo version is required?** A: Hugo extended edition v0.156.0 or later. {{}} ``` -------------------------------- ### Install Component via Hugo Modules Source: https://github.com/hugo-fixit/docs/blob/main/content/en/ecosystem/dev-component/index.md Add the shortcode-caniuse component to your project's Hugo Modules configuration. This is the standard method for integrating external components. ```diff [module] [[module.imports]] path = "github.com/hugo-fixit/FixIt" + [[module.imports]] + path = "github.com/hugo-fixit/shortcode-caniuse" ``` -------------------------------- ### Link Shortcode Examples Source: https://context7.com/hugo-fixit/docs/llms.txt Render links as inline text, card previews, or downloadable file links using the link shortcode. Various parameters control the appearance and behavior. ```markdown {{}} {{}} {{}} {{}} {{}} {{}} ``` -------------------------------- ### Tabs and Tab Shortcode Examples Source: https://context7.com/hugo-fixit/docs/llms.txt Create tabbed sections with named tabs and customizable default selection using the `tabs` and `tab` shortcodes. Ideal for organizing related content. ```markdown {{}} {{% tab title="Bash" %}} ```bash hugo new site my-blog ``` {{% /tab %}} {{% tab title="PowerShell" %}} ```powershell New-HugoSite my-blog ``` {{% /tab %}} {{% tab title="Notes" %}} Make sure Hugo extended edition is installed. {{% /tab %}} {{}} ``` -------------------------------- ### Instagram Shortcode Example Source: https://github.com/hugo-fixit/docs/blob/main/content/en/documentation/content-management/shortcodes/built-in/index.md Shows how to embed an Instagram post using the `instagram` shortcode by providing the post's media ID. ```go-html-template {{}} ``` -------------------------------- ### TypeIt Shortcode Examples Source: https://context7.com/hugo-fixit/docs/llms.txt Animate text using the TypeIt library with the `typeit` shortcode. Supports code blocks, grouping, and looping for dynamic text effects. ```markdown {{}} This is a *paragraph* with **typing animation** based on [TypeIt](https://typeitjs.com/)... {{}} {{}} Welcome to my blog! {{}} {{}} print("Hello, FixIt!") {{}} {{}} First line types... {{}} {{}} Second line types after the first! {{}} ``` -------------------------------- ### Install Theme via Git Clone Source: https://github.com/hugo-fixit/docs/blob/main/content/en/documentation/installation/index.md Clone the FixIt theme into your project's themes directory. To upgrade, navigate to the theme directory and pull the latest changes. ```bash git clone https://github.com/hugo-fixit/FixIt.git themes/FixIt ``` ```bash cd themes/FixIt git pull ``` -------------------------------- ### Example Admonition Source: https://github.com/hugo-fixit/docs/blob/main/content/en/documentation/content-management/markdown-syntax/extended/index.md Use the example admonition type to provide code examples or illustrative cases. ```markdown > [!example]- > The quick brown fox jumps over the lazy dog. ``` -------------------------------- ### Use CanIUse Shortcode Source: https://github.com/hugo-fixit/docs/blob/main/content/en/ecosystem/dev-component/index.md Examples of how to use the `caniuse` shortcode with named parameters and positional parameters. The `feature` parameter is required, while `past` and `future` are optional. ```markdown {{}} or {{}} ``` -------------------------------- ### Initialize Git Repository and Go Module Source: https://github.com/hugo-fixit/docs/blob/main/content/en/ecosystem/dev-component/index.md Initialize a Git repository and a Go module for the theme component to ensure compatibility with Git submodules and Hugo Modules. ```bash git init git remote add origin git@github.com:hugo-fixit/shortcode-caniuse.git go mod init github.com/hugo-fixit/shortcode-caniuse ``` -------------------------------- ### Timeline TOML Data Example Source: https://github.com/hugo-fixit/docs/blob/main/content/en/documentation/content-management/timeline-support/index.md Example of Timeline data structured in TOML format. Ensure the content is valid TOML. ```toml [[events]] timestamp = "2024-07-11" content = "Success" [[events]] timestamp = "2024-07-13" content = "Approved" [[events]] timestamp = "2024-07-15" content = "Event start" ``` -------------------------------- ### Create New Hugo Site and Add FixIt Theme Source: https://github.com/hugo-fixit/docs/blob/main/content/en/documentation/getting-started/quick-start/index.md These commands create a new Hugo site, navigate into its directory, initialize Git, add the FixIt theme as a submodule, set the theme in the configuration file, and start the development server. ```bash hugo new site my-blog ``` ```bash cd my-blog ``` ```bash git init ``` ```bash git submodule add https://github.com/hugo-fixit/FixIt.git themes/FixIt ``` ```bash echo "theme = 'FixIt'" >> hugo.toml ``` ```bash hugo server ``` -------------------------------- ### Timeline JSON Data Example Source: https://github.com/hugo-fixit/docs/blob/main/content/en/documentation/content-management/timeline-support/index.md Example of Timeline data structured in JSON format. Ensure the content is valid JSON. ```json { "events": [ { "timestamp": "2024-07-11", "content": "Success" }, { "timestamp": "2024-07-13", "content": "Approved" }, { "timestamp": "2024-07-15", "content": "Event start" } ] } ``` -------------------------------- ### Configure Git Information Source: https://github.com/hugo-fixit/docs/blob/main/content/en/documentation/getting-started/configuration/index.md Set up Git repository details like the repository URL, branch, content directory, and issue template. This requires `enableGitInfo` to be true. ```toml [params] [params.gitInfo] repo = "" branch = "main" dir = "content" issueTpl = "title=[BUG]%20{title}&body=|Field|Value|%0A|-|-|%0A|Title|{title}|%0A|URL|{URL}|%0A|Filename|{sourceURL}|" ``` -------------------------------- ### Mermaid Entity Relationship Diagram Example Source: https://github.com/hugo-fixit/docs/blob/main/content/en/documentation/content-management/shortcodes/extended/mermaid/index.md Example of creating an entity-relationship diagram using the mermaid shortcode. This shows entities and their relationships. ```markdown {{ erDiagram CUSTOMER ||--o{ ORDER : places ORDER ||--|{ LINE-ITEM : contains CUSTOMER }|..|{ DELIVERY-ADDRESS : uses {{}} ``` -------------------------------- ### Mermaid Class Diagram Example Source: https://github.com/hugo-fixit/docs/blob/main/content/en/documentation/content-management/shortcodes/extended/mermaid/index.md Example of creating a class diagram using the mermaid shortcode. This shows class inheritance, attributes, and methods. ```markdown {{ classDiagram Animal <|-- Duck Animal <|-- Fish Animal <|-- 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() } {{}} ``` -------------------------------- ### QR Code Shortcode Examples Source: https://github.com/hugo-fixit/docs/blob/main/content/en/documentation/content-management/shortcodes/built-in/index.md Demonstrates two ways to use the `qr` shortcode to generate a QR code: using the self-closing syntax with a text argument, and by providing text between the opening and closing tags. ```go-html-template {{}} ``` ```go-html-template {{}} https://lruihao.cn {{}} ``` -------------------------------- ### Install FixIt Theme via Git Submodule Source: https://context7.com/hugo-fixit/docs/llms.txt Installs the FixIt theme as a Git submodule. Ensure you are in your Hugo project's root directory. ```bash # Create a new Hugo site hugo new site my-blog cd my-blog git init # Add FixIt as a submodule git submodule add https://github.com/hugo-fixit/FixIt.git themes/FixIt # Enable the theme echo "theme = 'FixIt'" >> hugo.toml # Run the dev server hugo server -D --disableFastRender ``` -------------------------------- ### Overlapping Shapes Diagram Example Source: https://github.com/hugo-fixit/docs/blob/main/content/en/documentation/content-management/diagrams-support/goat/index.md This GoAT example illustrates how to draw overlapping shapes, creating a more complex visual structure. The generated SVG will reflect these overlaps. ```goat .-. .-. .-. .-. .-. .-. | | | | | | | | | | | | .---------. .--+---+--. .--+---+--. .--| |--. .--+ +--. .------|--. | | | | | | | | | | | | | | | | | | '---------' '--+---+--' '--+---+--' '--| |--' '--+ +--' '--|------' | | | | | | | | | | | | '-' '-' '-' '-' '-' '-' ``` -------------------------------- ### Create a Custom Post Call-to-Action Partial Source: https://context7.com/hugo-fixit/docs/llms.txt Create custom HTML partials, such as a call-to-action for posts, and place them in the appropriate directory (e.g., `layouts/_partials/custom/`). This partial can then be injected using `params.customPartials`. ```go-html-template {{/* layouts/_partials/custom/post-cta.html */}}
Subscribe to my newsletter →
``` -------------------------------- ### Mermaid Treemap Diagram Example Source: https://github.com/hugo-fixit/docs/blob/main/content/en/documentation/content-management/diagrams-support/mermaid/index.md Example of a treemap diagram using Mermaid syntax. This is useful for visualizing hierarchical data. Note that treemap is a new diagram type and its syntax may evolve. ```mermaid --- config: treemap: valueFormat: '$0,0' --- treemap-beta "Budget" "Operations" "Salaries": 700000 "Equipment": 200000 "Supplies": 100000 "Marketing" "Advertising": 400000 "Events": 100000 ``` -------------------------------- ### Install Theme Component as Git Submodule Source: https://github.com/hugo-fixit/docs/blob/main/content/en/documentation/advanced/index.md Clone the theme component into your themes directory and add it as a Git submodule. Update your project's configuration to include the new theme. ```bash git submodule add https://github.com/hugo-fixit/component-projects.git themes/component-projects ``` ```toml theme = [ "FixIt", "component-projects", ] ``` -------------------------------- ### Base Site Configuration (`hugo.toml`) Source: https://context7.com/hugo-fixit/docs/llms.txt Sets up mandatory Hugo globals and enables FixIt's default output formats and taxonomies. The `_merge = "shallow"` directive is crucial for inheriting defaults. ```toml # hugo.toml baseURL = "https://example.org/" languageCode = "en" title = "My Blog" theme = ["FixIt"] # Inherit FixIt's output/markup/taxonomy defaults [markup] _merge = "shallow" [outputs] _merge = "shallow" # Optionally expand: # home = ["html", "rss", "archives", "offline", "search"] # page = ["html", "markdown"] [taxonomies] _merge = "shallow" # Built-in: categories, tags, collections [markup.highlight] codeFences = true lineNos = true lineNumbersInTable = true noClasses = false ``` -------------------------------- ### Enable Developer Options Configuration Source: https://github.com/hugo-fixit/docs/blob/main/content/en/documentation/getting-started/configuration/index.md Configure developer options, including enabling them and checking for updates. Environment variables can also be used for token configuration. ```toml [params] [params.dev] enable = false c4u = false ``` -------------------------------- ### Superscript Example Source: https://github.com/hugo-fixit/docs/blob/main/content/en/documentation/content-management/markdown-syntax/extended/index.md Use the '^text^' syntax to render superscript text. ```markdown 2^10^ equals 1024. ``` -------------------------------- ### Configure Home Page Profile Source: https://github.com/hugo-fixit/docs/blob/main/content/en/documentation/getting-started/configuration/index.md Set up the profile section on the home page, including avatar, title, subtitle, and social links. ```toml [params.home.profile] enable = false onlyFirstPage = false gravatarEmail = "" avatarURL = "" avatarMenu = "" title = "" subtitle = "" typeit = true social = true disclaimer = "" ``` -------------------------------- ### Inserted Text Example Source: https://github.com/hugo-fixit/docs/blob/main/content/en/documentation/content-management/markdown-syntax/extended/index.md Use the '++text++' syntax to render inserted text. ```markdown The author of FixIt theme is ++Lruihao++. ``` -------------------------------- ### Check Hugo Version Source: https://github.com/hugo-fixit/docs/blob/main/content/en/documentation/getting-started/quick-start/index.md Verify that Hugo v0.121.0 or later is installed before proceeding. ```bash hugo version ``` -------------------------------- ### Marked Text Example Source: https://github.com/hugo-fixit/docs/blob/main/content/en/documentation/content-management/markdown-syntax/extended/index.md Use the '==text==' syntax to render marked (highlighted) text. ```markdown ==FixIt== is an awesome Hugo theme! ``` -------------------------------- ### Fraction Syntax Source: https://github.com/hugo-fixit/docs/blob/main/content/en/documentation/content-management/markdown-syntax/extended/index.md Use the extended Markdown syntax [Numerator]{?/}[Denominator] to create fractions. ```markdown [Light]{?/}[Dark] ``` ```markdown [99]{?/}[100] ``` -------------------------------- ### Create New Hugo FixIt Site with CLI Source: https://github.com/hugo-fixit/docs/blob/main/content/en/documentation/installation/index.md Scaffold a new Hugo FixIt site using the official CLI. This command initializes a new project with a default structure. ```bash npx fixit-cli create my-blog ``` -------------------------------- ### Configure Social Links (Simple) Source: https://github.com/hugo-fixit/docs/blob/main/content/en/documentation/getting-started/configuration/index.md Set a simple social link by providing your ID for a predefined platform like Mastodon. ```toml [params.social] Mastodon = "@xxxx" ``` -------------------------------- ### Mermaid Sequence Diagram Example Source: https://github.com/hugo-fixit/docs/blob/main/content/en/documentation/content-management/diagrams-support/mermaid/index.md Illustrates interactions between participants over time. Useful for visualizing communication flows. ```mermaid sequenceDiagram participant Alice participant Bob Alice->>John: Hello John, how are you? loop Healthcheck John->>John: Fight against hypochondria end Note right of John: Rational thoughts
prevail! John-->>Alice: Great! John->>Bob: How about you? Bob-->>John: Jolly good! ``` -------------------------------- ### Configure Repository Version Display Source: https://github.com/hugo-fixit/docs/blob/main/content/en/documentation/getting-started/configuration/index.md Set the URL prefix and project name for displaying repository version information. ```toml [params.repoVersion] url = "https://github.com/hugo-fixit/FixIt/releases/tag/v" name = "FixIt" ``` -------------------------------- ### Define PWA Manifest Source: https://context7.com/hugo-fixit/docs/llms.txt Define the PWA manifest file (`static/site.webmanifest`) with essential information such as the site name, start URL, description, theme color, and icons. Ensure icon paths are correct. ```json // static/site.webmanifest { "name": "My FixIt Blog", "short_name": "My Blog", "start_url": "/", "description": "A personal blog built with Hugo and FixIt", "theme_color": "#ffffff", "background_color": "#ffffff", "display": "standalone", "icons": [ { "src": "/android-chrome-192x192.png", "sizes": "192x192", "type": "image/png" }, { "src": "/android-chrome-512x512.png", "sizes": "512x512", "type": "image/png" } ] } ``` -------------------------------- ### MathJax Syntax Error Example Source: https://github.com/hugo-fixit/docs/blob/main/content/en/documentation/content-management/mathjax-support/index.md Compares correct and incorrect MathJax syntax to illustrate how errors are displayed. ```tex Correct syntax ($c = \pm\sqrt{a^2 + b^2}$) and incorrect syntax ($c = \pm\sqrt{a\^2 + b^2}$) Correct syntax: $$ egin{CD} A @>a>> B \\ @VbVV @AAcA \\ C @= D end{CD} $$ Incorrect syntax: $$ egin{cd} A @>a>> B \\ @VbVV @AAcA \\ C @= D end{cd} $$ ``` -------------------------------- ### Import Theme Components via Hugo Modules Source: https://context7.com/hugo-fixit/docs/llms.txt Extend your FixIt site with community components like `component-projects` by importing them as Hugo Modules in your `hugo.toml`. Inject component initialization partials using `params.customPartials`. ```toml # hugo.toml — import multiple components [module] [[module.imports]] path = "github.com/hugo-fixit/FixIt" [[module.imports]] path = "github.com/hugo-fixit/component-projects" # Inject component initialization partial [params.customPartials] assets = ["inject/component-projects.html"] ``` -------------------------------- ### Use Custom Macros in Article Source: https://github.com/hugo-fixit/docs/blob/main/content/en/documentation/content-management/mathjax-support/index.md Example of using custom-defined macros within an article's content. ```tex $\bold{Custom}$ macro $\KaTeX$ in $\text{MathJax}$ ``` -------------------------------- ### Mermaid Requirement Diagram Example Source: https://github.com/hugo-fixit/docs/blob/main/content/en/documentation/content-management/diagrams-support/mermaid/index.md Visualizes requirements and their relationships using SysML specifications. Defines requirements and elements. ```mermaid requirementDiagram requirement test_req { id: 1 text: the test text. risk: high verifymethod: test } element test_entity { type: simulation } test_entity - satisfies -> test_req ``` -------------------------------- ### Mermaid Gantt Chart Example Source: https://github.com/hugo-fixit/docs/blob/main/content/en/documentation/content-management/diagrams-support/mermaid/index.md Defines a Gantt chart with tasks, their statuses, and durations. Excludes specific weekdays. ```mermaid gantt dateFormat YYYY-MM-DD title Adding GANTT diagram to mermaid excludes weekdays 2014-01-10 section A section Completed task :done, des1, 2014-01-06,2014-01-08 Active task :active, des2, 2014-01-09, 3d Future task : des3, after des2, 5d Future task2 : des4, after des3, 5d ``` -------------------------------- ### Mermaid Flowchart Example Source: https://github.com/hugo-fixit/docs/blob/main/content/en/documentation/content-management/diagrams-support/mermaid/index.md Defines a basic flowchart with nodes and directed edges. Use for illustrating processes or workflows. ```mermaid graph TD; A-->B; A-->C; B-->D; C-->D; ``` -------------------------------- ### Mermaid Diagram with Forest Theme Source: https://github.com/hugo-fixit/docs/blob/main/content/en/documentation/content-management/diagrams-support/mermaid/index.md An example of a Mermaid diagram configured to use the 'forest' theme via its frontmatter. ```mermaid --- config: theme: 'forest' --- graph TD a --> b ``` -------------------------------- ### Default Filesystem Mode Shortcode Source: https://github.com/hugo-fixit/docs/blob/main/content/en/documentation/content-management/shortcodes/extended/file-tree/index.md The default behavior of the file-tree shortcode is to scan the project directory starting from the root (`/`). ```markdown {{}} ``` -------------------------------- ### Mermaid Timeline Diagram Source: https://github.com/hugo-fixit/docs/blob/main/content/en/documentation/content-management/diagrams-support/mermaid/index.md Example of a Timeline diagram using Mermaid syntax. This is an experimental feature, and its syntax may evolve. ```mermaid timeline title History of Social Media Platform 2002 : LinkedIn 2004 : Facebook : Google 2005 : Youtube 2006 : Twitter ``` -------------------------------- ### Mermaid Quadrant Chart Example Source: https://github.com/hugo-fixit/docs/blob/main/content/en/documentation/content-management/diagrams-support/mermaid/index.md Illustrates a quadrant chart for analyzing campaign reach and engagement. Defines axes and quadrants. ```mermaid quadrantChart title Reach and engagement of campaigns x-axis Low Reach --> High Reach y-axis Low Engagement --> High Engagement quadrant-1 We should expand quadrant-2 Need to promote quadrant-3 Re-evaluate quadrant-4 May be improved Campaign A: [0.3, 0.6] Campaign B: [0.45, 0.23] Campaign C: [0.57, 0.69] Campaign D: [0.78, 0.34] Campaign E: [0.40, 0.34] Campaign F: [0.35, 0.78] ```