├── .github ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── pull-request_template.md └── workflows │ ├── agolia-update.yaml │ ├── aws-deploy.yaml │ └── cleanup.yaml ├── .gitignore ├── CODE_OF_CONDUCT.md ├── LICENSE ├── README.md ├── assets ├── js │ ├── code.js │ ├── custom.js │ ├── functions.js │ ├── index.js │ ├── mode.js │ ├── search │ │ ├── algolia.js │ │ ├── fuse.js │ │ ├── index.js │ │ └── variables.js │ └── variables.js └── sass │ ├── _base.sass │ ├── _blog.sass │ ├── _chart.sass │ ├── _components.sass │ ├── _custom.sass │ ├── _fonts.sass │ ├── _mermaid.sass │ ├── _nav.sass │ ├── _syntax.sass │ ├── _utils.sass │ ├── _variables.sass │ └── main.sass ├── dist └── .gitkeep ├── exampleSite ├── .github │ └── workflows │ │ ├── agolia-update.yaml │ │ └── aws-deploy.yaml ├── LICENSE ├── README.md ├── config │ ├── .gitkeep │ └── _default │ │ ├── languages.toml │ │ ├── markup.toml │ │ ├── menus │ │ └── menu.en.toml │ │ └── params.toml ├── content │ ├── _index.md │ ├── blog │ │ ├── _index.md │ │ ├── creating-a-new-theme.md │ │ ├── emoji-support.md │ │ ├── goisforlovers.md │ │ ├── hugoisforlovers.md │ │ └── migrate-from-jekyll.md │ ├── docs │ │ ├── _index.md │ │ ├── clarity │ │ │ ├── _index.md │ │ │ ├── blogging.md │ │ │ ├── customize.md │ │ │ ├── features.md │ │ │ ├── getting-started.md │ │ │ ├── images.md │ │ │ ├── syntax-highlighting.md │ │ │ └── theme-overrides.md │ │ └── compose │ │ │ ├── _index.md │ │ │ ├── customize.md │ │ │ ├── github-actions.md │ │ │ ├── graphs-charts-tables.md │ │ │ ├── install-theme.md │ │ │ ├── mermaid.md │ │ │ ├── organize-content.md │ │ │ ├── search.md │ │ │ ├── shortcodes-example.md │ │ │ ├── shortcodes.md │ │ │ └── use-tina-cms.md │ ├── projects.csv │ ├── search.md │ ├── themes.csv │ └── tutorials │ │ ├── _index.md │ │ └── example │ │ ├── _index.md │ │ └── mermaid.md ├── dist │ └── .gitkeep ├── go.mod ├── go.sum ├── hugo.toml ├── netlify.toml ├── package.json ├── resources │ └── _gen │ │ └── assets │ │ └── sass │ │ ├── main.sass_ad0d8311f7d21d831066e97916b5dca2.content │ │ ├── main.sass_ad0d8311f7d21d831066e97916b5dca2.json │ │ ├── main.sass_ae9eb86df8175869edaecf50caadd93b.content │ │ ├── main.sass_ae9eb86df8175869edaecf50caadd93b.json │ │ └── sass │ │ ├── main.sass_ae9eb86df8175869edaecf50caadd93b.content │ │ ├── main.sass_ae9eb86df8175869edaecf50caadd93b.json │ │ ├── main.sass_ca26857cefa9076967ab300682271513.content │ │ └── main.sass_ca26857cefa9076967ab300682271513.json ├── static │ ├── admin │ │ └── .gitignore │ └── images │ │ ├── GitHubMarkDark.svg │ │ ├── GitHubMarkLight.svg │ │ ├── artist.jpg │ │ ├── boy.jpg │ │ ├── clarity │ │ ├── article-toc.png │ │ ├── image-figure.png │ │ ├── image-inline.png │ │ ├── screenshot-darkmode.png │ │ ├── screenshot-mobile-darkmode.png │ │ ├── screenshot-mobile.png │ │ ├── screenshot.png │ │ ├── syntax-block.gif │ │ ├── tags.png │ │ ├── tn-darkmode.png │ │ └── tn.png │ │ ├── compose-light.svg │ │ ├── compose.svg │ │ ├── frustrated.jpg │ │ ├── painting.jpg │ │ ├── scribble.jpg │ │ ├── speakers.jpg │ │ ├── street.jpg │ │ └── stuck.jpg └── tina │ ├── config.js │ └── tina-lock.json ├── go.mod ├── i18n ├── de.toml ├── en.toml ├── eo.toml ├── es.toml └── tr.toml ├── images ├── screenshot.png └── tn.png ├── layouts ├── 404.html ├── _default │ ├── _markup │ │ └── render-heading.html │ ├── baseof.html │ ├── index.json │ ├── list.html │ ├── single.html │ └── term.html ├── blog │ ├── list.html │ └── single.html ├── index.html ├── partials │ ├── document.html │ ├── footer.html │ ├── functions │ │ ├── getAlgoliaConfig.html │ │ ├── getCodeConfig.html │ │ ├── getIconPath.html │ │ ├── getScript.html │ │ └── getSearchConfig.html │ ├── head │ │ ├── index.html │ │ └── liteyoutube.html │ ├── hooks │ │ ├── head.html │ │ └── scripts.html │ ├── mode.html │ ├── nav.html │ ├── pager.html │ ├── scripts │ │ ├── bundle.html │ │ ├── getJsBundle.html │ │ ├── mermaid.html │ │ ├── search.html │ │ └── translations.html │ ├── search.html │ ├── share.html │ ├── sidebar.html │ ├── sprite.html │ └── sprites.html ├── search │ └── single.html └── shortcodes │ ├── block.html │ ├── button.html │ ├── chart.html │ ├── column.html │ ├── gallery.html │ ├── grid.html │ ├── icon.html │ ├── image.html │ ├── liteyoutube.html │ ├── mermaid.html │ ├── partial.html │ ├── picture.html │ ├── tab.html │ ├── tabs.html │ ├── tip.html │ └── youtube.html ├── static ├── css │ └── lite-yt-embed.css ├── favicons │ ├── android-chrome-192x192.png │ ├── android-chrome-512x512.png │ ├── apple-touch-icon.png │ ├── favicon-16x16.png │ ├── favicon-32x32.png │ ├── favicon.ico │ └── site.webmanifest ├── fonts │ ├── Metropolis-Black.woff │ ├── Metropolis-Black.woff2 │ ├── Metropolis-BlackItalic.woff │ ├── Metropolis-BlackItalic.woff2 │ ├── Metropolis-Bold.woff │ ├── Metropolis-Bold.woff2 │ ├── Metropolis-BoldItalic.woff │ ├── Metropolis-BoldItalic.woff2 │ ├── Metropolis-ExtraBold.woff │ ├── Metropolis-ExtraBold.woff2 │ ├── Metropolis-ExtraBoldItalic.woff │ ├── Metropolis-ExtraBoldItalic.woff2 │ ├── Metropolis-ExtraLight.woff │ ├── Metropolis-ExtraLight.woff2 │ ├── Metropolis-ExtraLightItalic.woff │ ├── Metropolis-ExtraLightItalic.woff2 │ ├── Metropolis-Light.woff │ ├── Metropolis-Light.woff2 │ ├── Metropolis-LightItalic.woff │ ├── Metropolis-LightItalic.woff2 │ ├── Metropolis-Medium.woff │ ├── Metropolis-Medium.woff2 │ ├── Metropolis-MediumItalic.woff │ ├── Metropolis-MediumItalic.woff2 │ ├── Metropolis-Regular.woff │ ├── Metropolis-Regular.woff2 │ ├── Metropolis-RegularItalic.woff │ ├── Metropolis-RegularItalic.woff2 │ ├── Metropolis-SemiBold.woff │ ├── Metropolis-SemiBold.woff2 │ ├── Metropolis-SemiBoldItalic.woff │ ├── Metropolis-SemiBoldItalic.woff2 │ ├── Metropolis-Thin.woff │ ├── Metropolis-Thin.woff2 │ ├── Metropolis-ThinItalic.woff │ └── Metropolis-ThinItalic.woff2 ├── icons │ ├── carly.svg │ ├── check.svg │ ├── copy.svg │ ├── expand.svg │ ├── info.svg │ ├── link.svg │ ├── moon.svg │ ├── next.svg │ ├── order.svg │ └── sun.svg ├── images │ ├── github.svg │ ├── next.svg │ └── search.svg └── js │ ├── chart.min.js │ ├── lite-yt-embed.js │ └── w3.js └── theme.toml /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Report an issue to help us improve the theme 4 | title: '[BUG]' 5 | labels: 'bug' 6 | assignees: '' 7 | --- 8 | 9 | **I have checked all the prerequisites below and I'm yet experiencing a problem** 10 | 11 | - [] Read the README.md 12 | - [] Have the extended version of Hugo installed 13 | - [] Used the exampleSite's hugo.toml as a reference 14 | - [] If and when requested, I'll link my repo to make it easier to debug. 15 | 16 | __⚠️ NOTE:__ If the issue isn't easy to reproduce and its author(s) decline to provide reasonable accommodation to debug, the issue will be closed. 17 | 18 | **Describe the bug** 19 | 20 | A clear and concise description of what the bug is. [REPLACE] 21 | 22 | **Desktop (please complete the following information):** 23 | - OS: [e.g. iOS 14, Windows 10] 24 | - Browser: [e.g. chrome 76, safari 13] 25 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature Request 3 | about: Request a feature to Compose. 4 | title: '[FEATURE]' 5 | labels: 'enhancement' 6 | assignees: '' 7 | --- 8 | 9 | **I have checked all the prerequisites below and I don't see this is available** 10 | 11 | - [ ] Read the README.md 12 | - [ ] Have the extended version of Hugo installed 13 | - [ ] Used the exampleSite's hugo.toml as a reference 14 | 15 | **Describe the feature** 16 | 17 | A clear and concise description of what the feature is. [REPLACE] 18 | 19 | **Desktop (please complete the following information):** 20 | - OS: [e.g. iOS 14, Windows 10] 21 | - Browser: [e.g. chrome 76, safari 13] 22 | -------------------------------------------------------------------------------- /.github/pull-request_template.md: -------------------------------------------------------------------------------- 1 | This PR... 2 | 3 | ## Changes / fixes 4 | 5 | - 6 | 7 | ## Screenshots (if applicable) 8 | 9 | (prefer animated gif) 10 | 11 | ## Checklist 12 | 13 | _Ensure you have checked off the following before submitting your PR._ 14 | 15 | - [ ] tested locally with the [latest release of Hugo](https://github.com/gohugoio/hugo/releases). This requirement is [a standard](https://github.com/gohugoio/hugoThemes#theme-maintenance) 16 | - [ ] added new dependencies 17 | - [ ] updated the [docs]() ⚠️ 18 | -------------------------------------------------------------------------------- /.github/workflows/agolia-update.yaml: -------------------------------------------------------------------------------- 1 | name: UPDATE ALGOLIA INDEX 2 | 3 | on: 4 | workflow_dispatch: 5 | branches: 6 | - production 7 | push: 8 | paths: 9 | - content/**/* 10 | # - hugo.toml 11 | 12 | env: 13 | # Name of the branch in your repository which will store your generated site. 14 | SITE-BRANCH: master 15 | 16 | jobs: 17 | build: 18 | # In this phase, the code is pulled from main and the site rendered in Hugo. The built site is stored as an artifact for other stages. # deploy: 19 | runs-on: ubuntu-20.04 20 | concurrency: 21 | group: ${{ github.workflow }}-${{ github.ref }} 22 | steps: 23 | - uses: actions/checkout@v3 24 | with: 25 | submodules: true # Fetch Hugo themes (true OR recursive) 26 | fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod 27 | 28 | - name: Setup Hugo 29 | uses: peaceiris/actions-hugo@v2 30 | with: 31 | hugo-version: 'latest' 32 | extended: true 33 | 34 | - name: Build 35 | run: hugo -e "production" -s "exampleSite" -d "dist" --minify 36 | # If build succeeds, store the dist/ dir as an artifact to be used in subsequent phases. 37 | - name: Upload output dist dir as artifact 38 | uses: actions/upload-artifact@v1 39 | with: 40 | name: dist 41 | path: dist/ 42 | publish: 43 | # In the publish phase, the site is pushed up to a different branch which only stores the dist/ folder ("site" branch) and is also delta synchronized to the S3 bucket. CloudFront invalidation happens last. 44 | runs-on: ubuntu-20.04 45 | needs: build 46 | steps: 47 | # Check out the site branch this time since we have to ultimately commit those changes there. 48 | - name: Checkout site branch 49 | uses: actions/checkout@v3 50 | with: 51 | submodules: true 52 | fetch-depth: 0 53 | ref: ${{ env.SITE-BRANCH }} 54 | # Download the artifact containing the newly built site. This overwrites the dist/ dir from the check out above. 55 | - name: Download artifact from build stage 56 | uses: actions/download-artifact@v1 57 | with: 58 | name: dist 59 | # Add all the files/changes in dist/ that were pulled down from the build stage and then commit them. 60 | # The final line sets a GitHub Action output value that can be read by other steps. 61 | # This function cannot store mult-line values so newline chars must be stripped. 62 | - name: Commit files 63 | id: can_commit 64 | run: | 65 | git config --local user.email "action@github.com" 66 | git config --local user.name "GitHub Action" 67 | cp dist/index.json index.json 68 | git add -A index.json 69 | commit_message=$(git commit -m "Build search index." -a | tr -d '\n' || true) 70 | echo "commit_message=$commxit_message >> $GITHUB_OUTPUT" 71 | # Checks if previous stage had any valid commit. 72 | - name: Nothing to commit 73 | id: nothing_committed 74 | if: contains(steps.can_commit.outputs.commit_message, 'nothing to commit') 75 | run: echo "Saw that no changes were made to Hugo site." 76 | # Push those changes back to the site branch. 77 | - name: Push to site branch 78 | if: steps.nothing_committed.conclusion == 'skipped' 79 | uses: ad-m/github-push-action@master 80 | with: 81 | github_token: ${{ secrets.GITHUB_TOKEN }} 82 | branch: ${{ env.SITE-BRANCH }} 83 | index: 84 | runs-on: ubuntu-latest 85 | needs: publish 86 | name: Upload Algolia Index 87 | steps: 88 | - uses: algolia/setup-algolia-cli@master 89 | with: 90 | version: 91 | 1.2.0 92 | - name: clean index 93 | id: clean_up_index 94 | env: 95 | ALGOLIA_APPLICATION_ID: ${{ secrets.ALGOLIA_APP_ID }} 96 | ALGOLIA_ADMIN_API_KEY: ${{ secrets.ALGOLIA_ADMIN_KEY }} 97 | run: | 98 | algolia index clear dimi_site --confirm 99 | - uses: actions/checkout@v2 100 | with: 101 | fetch-depth: 0 102 | - uses: wangchucheng/algolia-uploader@master 103 | with: 104 | # Such as `Z0U0ACGBN8` 105 | app_id: EG0M7UVCD9 106 | # Go to https://github.com/dimi365/website/settings/secrets/actions and set an ALGOLIA_ADMIN_KEY secret key 107 | admin_key: ${{ secrets.ALGOLIA_ADMIN_KEY }} 108 | # The index name. 109 | index_name: ${{ secrets.ALGOLIA_APP_NAME }} 110 | # The index file path relative to repo root. no leading forward slash 111 | index_file_path: index.json -------------------------------------------------------------------------------- /.github/workflows/aws-deploy.yaml: -------------------------------------------------------------------------------- 1 | # PREREQUISITES: 2 | # The following secrets must be stored in your repository where this Action runs: 3 | # AWS_ACCESS_KEY_ID 4 | # AWS_CLOUDFRONT_DISTRO_ID 5 | # AWS_S3_BUCKET_NAME 6 | # AWS_SECRET_ACCESS_KEY 7 | 8 | name: AWS DEPLOY CI 9 | on: # change to `on:` to turn on 10 | workflow_dispatch: 11 | branches: 12 | - production # change to 'main' to automate 13 | push: 14 | paths: 15 | # - exampleSite/content/**/* 16 | - exampleSite/hugo.toml 17 | # pull_request: 18 | # branches: 19 | # - production 20 | env: 21 | # Default AWS region where S3 pushes and CloudFront invalidations will occur. 22 | AWS-DEFAULT-REGION: us-east-2 23 | # Name of the branch in your repository which will store your generated site. 24 | SITE-BRANCH: site 25 | 26 | jobs: 27 | build: 28 | # In this phase, the code is pulled from main and the site rendered in Hugo. The built site is stored as an artifact for other stages. # deploy: 29 | runs-on: ubuntu-20.04 30 | concurrency: 31 | group: ${{ github.workflow }}-${{ github.ref }} 32 | steps: 33 | - uses: actions/checkout@v3 34 | with: 35 | submodules: true # Fetch Hugo themes (true OR recursive) 36 | fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod 37 | 38 | - name: Setup Hugo 39 | uses: peaceiris/actions-hugo@v2 40 | with: 41 | hugo-version: 'latest' 42 | extended: true 43 | 44 | - name: Build 45 | run: hugo -e "production" -d "dist" -s "exampleSite" --minify 46 | # If build succeeds, store the dist/ dir as an artifact to be used in subsequent phases. 47 | - name: Upload output public dir as artifact 48 | uses: actions/upload-artifact@v1 49 | with: 50 | name: public 51 | path: dist/ 52 | publish: 53 | # In the publish phase, the site is pushed up to a different branch which only stores the dist/ folder ("site" branch) and is also delta synchronized to the S3 bucket. CloudFront invalidation happens last. 54 | runs-on: ubuntu-20.04 55 | needs: build 56 | steps: 57 | # Check out the site branch this time since we have to ultimately commit those changes there. 58 | - name: Checkout site branch 59 | uses: actions/checkout@v3 60 | with: 61 | submodules: true 62 | fetch-depth: 0 63 | ref: ${{ env.SITE-BRANCH }} 64 | # Download the artifact containing the newly built site. This overwrites the dist/ dir from the check out above. 65 | - name: Download artifact from build stage 66 | uses: actions/download-artifact@v1 67 | with: 68 | name: public 69 | # Add all the files/changes in dist/ that were pulled down from the build stage and then commit them. 70 | # The final line sets a GitHub Action output value that can be read by other steps. 71 | # This function cannot store mult-line values so newline chars must be stripped. 72 | - name: Commit files 73 | id: can_commit 74 | run: | 75 | git config --local user.email "action@github.com" 76 | git config --local user.name "GitHub Action" 77 | git add -A dist/ 78 | commit_message=$(git commit -m "Publish generated Hugo site." -a | tr -d '\n' || true) 79 | echo "commit_message=$commit_message >> $GITHUB_OUTPUT" 80 | # Checks if previous stage had any valid commit. 81 | - name: Nothing to commit 82 | id: nothing_committed 83 | if: contains(steps.can_commit.outputs.commit_message, 'nothing to commit') 84 | run: echo "Saw that no changes were made to Hugo site." 85 | # Push those changes back to the site branch. 86 | - name: Push to site branch 87 | if: steps.nothing_committed.conclusion == 'skipped' 88 | uses: ad-m/github-push-action@master 89 | with: 90 | github_token: ${{ secrets.GITHUB_TOKEN }} 91 | branch: ${{ env.SITE-BRANCH }} 92 | # Store the AWS credentials on the runner. 93 | - name: Configure AWS credentials 94 | if: steps.nothing_committed.conclusion == 'skipped' 95 | uses: aws-actions/configure-aws-credentials@v1-node16 96 | with: 97 | aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} 98 | aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} 99 | aws-region: ${{ env.AWS-DEFAULT-REGION }} 100 | - name: Delta sync site to S3 with aws cli 101 | if: steps.nothing_committed.conclusion == 'skipped' 102 | run: aws s3 sync --size-only --delete --exclude "/authors/*/page/*" --cache-control max-age=2592000 dist/ s3://${{ secrets.AWS_S3_BUCKET_NAME }} 103 | # Use s5cmd to perform only a delta sync to the destination S3 bucket. This minimizes transfer traffic since it only uploads changed files. 104 | # - name: Delta sync site to S3 bucket 105 | # if: steps.nothing_committed.conclusion == 'skipped' 106 | # run: | 107 | # curl -sLO https://github.com/peak/s5cmd/releases/download/v1.0.0/s5cmd_1.0.0_Linux-64bit.tar.gz 108 | # tar -xzf s5cmd_1.0.0_Linux-64bit.tar.gz 109 | # chmod +x s5cmd 110 | # sudo mv s5cmd /usr/local/bin/ 111 | # echo "****Showing working dir and listing files.****" 112 | # pwd && ls -lah 113 | # echo "****Running delta sync against S3.****" 114 | # s5cmd cp -s -n -u dist/ s3://${{ secrets.AWS_S3_BUCKET_NAME }} 115 | # Use the aws cli tool to perform a glob invalidation of the entire site against CloudFront. 116 | - name: Invalidate cache on CloudFront 117 | if: steps.nothing_committed.conclusion == 'skipped' 118 | run: aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_CLOUDFRONT_DISTRO_ID }} --paths "/*" -------------------------------------------------------------------------------- /.github/workflows/cleanup.yaml: -------------------------------------------------------------------------------- 1 | name: Delete old workflow runs 2 | on: 3 | workflow_dispatch: 4 | inputs: 5 | days: 6 | description: 'Number of days.' 7 | required: true 8 | default: 30 9 | minimum_runs: 10 | description: 'The minimum runs to keep for each workflow.' 11 | required: true 12 | default: 6 13 | delete_workflow_pattern: 14 | description: 'The name or filename of the workflow. if not set then it will target all workflows.' 15 | required: false 16 | delete_workflow_by_state_pattern: 17 | description: 'Remove workflow by state: active, deleted, disabled_fork, disabled_inactivity, disabled_manually' 18 | required: true 19 | default: "All" 20 | type: choice 21 | options: 22 | - "All" 23 | - active 24 | - deleted 25 | - disabled_inactivity 26 | - disabled_manually 27 | delete_run_by_conclusion_pattern: 28 | description: 'Remove workflow by conclusion: action_required, cancelled, failure, skipped, success' 29 | required: true 30 | default: "All" 31 | type: choice 32 | options: 33 | - "All" 34 | - action_required 35 | - cancelled 36 | - failure 37 | - skipped 38 | - success 39 | dry_run: 40 | description: 'Only log actions, do not perform any delete operations.' 41 | required: false 42 | 43 | jobs: 44 | del_runs: 45 | runs-on: ubuntu-latest 46 | permissions: 47 | actions: write 48 | steps: 49 | - name: Delete workflow runs 50 | uses: Mattraks/delete-workflow-runs@v2 51 | with: 52 | token: ${{ github.token }} 53 | repository: ${{ github.repository }} 54 | retain_days: ${{ github.event.inputs.days }} 55 | keep_minimum_runs: ${{ github.event.inputs.minimum_runs }} 56 | delete_workflow_pattern: ${{ github.event.inputs.delete_workflow_pattern }} 57 | delete_workflow_by_state_pattern: ${{ github.event.inputs.delete_workflow_by_state_pattern }} 58 | delete_run_by_conclusion_pattern: ${{ github.event.inputs.delete_run_by_conclusion_pattern }} 59 | dry_run: ${{ github.event.inputs.dry_run }} -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | public/ 2 | node_modules/ 3 | .DS_Store 4 | package-lock.json 5 | yarn.lock 6 | __generated__ 7 | .hugo_build.lock 8 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Our Standards 2 | 3 | Examples of behavior that contributes to creating a positive environment 4 | include: 5 | 6 | * Will be civil 7 | * Focusing on what is best for the community 8 | 9 | Examples of unacceptable behavior by participants include: 10 | 11 | * Trolling, insulting/derogatory comments, and personal or political attacks 12 | * Publishing others' private information, such as a physical or electronic 13 | address, without explicit permission 14 | 15 | ## Our Responsibilities 16 | 17 | Project maintainers are responsible for clarifying the standards of acceptable 18 | behavior. They also have the right to proceed as they wish. Usually on a __good-faith__ basis. 19 | 20 | ## Enforcement 21 | 22 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 23 | reported by contacting the project team at . All 24 | complaints will be neither be reviewed nor investigated. Instigators will simply be ignored or blocked. 25 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Weru 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Compose 2 | 3 | Compose is a [Hugo](https://gohugo.io/) theme for documentation websites. The theme provides a simple navigation & structure. 4 | 5 |  6 | 7 | ## Features 8 | 9 | 1. Documentation 10 | 2. Gallery Support 11 | 3. Native lazy loading of images 12 | 4. Live search 13 | 5. Flowcharts, Piecharts, doughnut & bar charts support 14 | 6. Searchable & Sortable tables 15 | 7. Syntax highlighting 16 | 8. Mermaid Support 17 | 18 | ## Documentation 19 | 20 | - [Install Compose theme](https://composedocs.netlify.app/docs/compose/install-theme/) 21 | - [Use Tina CMS](https://composedocs.netlify.app/docs/compose/use-tina-cms/) 22 | - [Customize your site](https://composedocs.netlify.app/docs/compose/customize/) 23 | - [Configure search](https://composedocs.netlify.app/docs/compose/search/) 24 | - [Shortcodes](https://composedocs.netlify.app/docs/compose/shortcodes/) 25 | - [Mermaid](https://composedocs.netlify.app/docs/compose/mermaid/) 26 | 27 | ## ExampleSite 28 | 29 | The [exampleSite](https://github.com/onweru/compose/tree/master/exampleSite) serves as this theme's [user guide](https://composedocs.netlify.app/docs/compose/install-theme/) . 30 | 31 | This guide covers the necessary bits. As the project evolves, the user-guide will get more comprehensive 32 | 33 | You can use Hugo to generate and serve a local copy of the guide (also useful for testing local theme changes). 34 | 35 | ``` 36 | git clone --recurse-submodules --depth 1 https://github.com/onweru/compose.git 37 | cd compose/exampleSite/ 38 | hugo server --themesDir ../.. 39 | ``` 40 | 41 | ### Also built by Weru 42 | 43 | 1. [Clarity Theme](https://github.com/chipzoller/hugo-clarity) 44 | 2. [Newsroom Theme](https://github.com/onweru/newsroom) 45 | 3. [Swift Theme](https://github.com/onweru/hugo-swift-theme) 46 | 4. [Browse Theme](https://github.com/onweru/browse) 47 | 48 | ## License 49 | 50 | This theme is available under the [MIT license](https://github.com/onweru/compose/blob/master/LICENSE). 51 | -------------------------------------------------------------------------------- /assets/js/custom.js: -------------------------------------------------------------------------------- 1 | // add custom js in this file -------------------------------------------------------------------------------- /assets/js/functions.js: -------------------------------------------------------------------------------- 1 | function isObj(obj) { 2 | return (obj && typeof obj === 'object' && obj !== null) ? true : false; 3 | } 4 | 5 | function createEl(element = 'div') { 6 | return document.createElement(element); 7 | } 8 | 9 | function emptyEl(el) { 10 | while(el.firstChild) 11 | el.removeChild(el.firstChild); 12 | } 13 | 14 | function elem(selector, parent = document){ 15 | let elem = isObj(parent) ? parent.querySelector(selector) : false; 16 | return elem ? elem : false; 17 | } 18 | 19 | function elems(selector, parent = document) { 20 | return isObj(parent) ? parent.querySelectorAll(selector) : []; 21 | } 22 | 23 | function pushClass(el, targetClass) { 24 | if (isObj(el) && targetClass) { 25 | let elClass = el.classList; 26 | elClass.contains(targetClass) ? false : elClass.add(targetClass); 27 | } 28 | } 29 | 30 | function deleteClass(el, targetClass) { 31 | if (isObj(el) && targetClass) { 32 | let elClass = el.classList; 33 | elClass.contains(targetClass) ? elClass.remove(targetClass) : false; 34 | } 35 | } 36 | 37 | function modifyClass(el, targetClass) { 38 | if (isObj(el) && targetClass) { 39 | const elClass = el.classList; 40 | elClass.contains(targetClass) ? elClass.remove(targetClass) : elClass.add(targetClass); 41 | } 42 | } 43 | 44 | function containsClass(el, targetClass) { 45 | if (isObj(el) && targetClass && el !== document ) { 46 | return el.classList.contains(targetClass) ? true : false; 47 | } 48 | } 49 | 50 | function isChild(node, parentClass) { 51 | let objectsAreValid = isObj(node) && parentClass && typeof parentClass == 'string'; 52 | return (objectsAreValid && node.closest(parentClass)) ? true : false; 53 | } 54 | 55 | function elemAttribute(elem, attr, value = null) { 56 | if (value) { 57 | elem.setAttribute(attr, value); 58 | } else { 59 | value = elem.getAttribute(attr); 60 | return value ? value : false; 61 | } 62 | } 63 | 64 | function deleteChars(str, subs) { 65 | let newStr = str; 66 | if (Array.isArray(subs)) { 67 | for (let i = 0; i < subs.length; i++) { 68 | newStr = newStr.replace(subs[i], ''); 69 | } 70 | } else { 71 | newStr = newStr.replace(subs, ''); 72 | } 73 | return newStr; 74 | } 75 | 76 | function isBlank(str) { 77 | return (!str || str.trim().length === 0); 78 | } 79 | 80 | function isMatch(element, selectors) { 81 | if(isObj(element)) { 82 | if(selectors.isArray) { 83 | let matching = selectors.map(function(selector){ 84 | return element.matches(selector) 85 | }) 86 | return matching.includes(true); 87 | } 88 | return element.matches(selectors) 89 | } 90 | } 91 | 92 | function closestInt(goal, collection) { 93 | return collection.reduce(function (prev, curr) { 94 | return (Math.abs(curr - goal) < Math.abs(prev - goal) ? curr : prev); 95 | }); 96 | } 97 | 98 | function hasClasses(el) { 99 | if(isObj(el)) { 100 | const classes = el.classList; 101 | return classes.length 102 | } 103 | } 104 | 105 | function wrapEl(el, wrapper) { 106 | el.parentNode.insertBefore(wrapper, el); 107 | wrapper.appendChild(el); 108 | } 109 | 110 | function wrapText(text, context, wrapper = 'mark') { 111 | let open = `<${wrapper}>`; 112 | let close = `${wrapper}>`; 113 | let escapedOpen = `%3C${wrapper}%3E`; 114 | let escapedClose = `%3C/${wrapper}%3E`; 115 | function wrap(context) { 116 | let c = context.innerHTML; 117 | let pattern = new RegExp(text, "gi"); 118 | let matches = text.length ? c.match(pattern) : null; 119 | 120 | if(matches) { 121 | matches.forEach(function(matchStr){ 122 | c = c.replaceAll(matchStr, `${open}${matchStr}${close}`); 123 | context.innerHTML = c; 124 | }); 125 | 126 | const images = elems('img', context); 127 | 128 | if(images) { 129 | images.forEach(image => { 130 | image.src = image.src.replaceAll(open, '').replaceAll(close, '').replaceAll(escapedOpen, '').replaceAll(escapedClose, ''); 131 | }); 132 | } 133 | } 134 | } 135 | 136 | const contents = ["h1", "h2", "h3", "h4", "h5", "h6", "p", "code", "td"]; 137 | 138 | contents.forEach(function(c){ 139 | const cs = elems(c, context); 140 | if(cs.length) { 141 | cs.forEach(function(cx, index){ 142 | if(cx.children.length >= 1) { 143 | Array.from(cx.children).forEach(function(child){ 144 | wrap(child); 145 | }) 146 | wrap(cx); 147 | } else { 148 | wrap(cx); 149 | } 150 | // sanitize urls and ids 151 | }); 152 | } 153 | }); 154 | 155 | const hyperLinks = elems('a'); 156 | if(hyperLinks) { 157 | hyperLinks.forEach(function(link){ 158 | link.href = link.href.replaceAll(encodeURI(open), "").replaceAll(encodeURI(close), ""); 159 | }); 160 | } 161 | } 162 | 163 | function parseBoolean(string = "") { 164 | string = string.trim().toLowerCase(); 165 | switch (string) { 166 | case 'true': 167 | return true; 168 | case 'false': 169 | return false; 170 | default: 171 | return undefined; 172 | } 173 | } 174 | 175 | function loadSvg(icon, parent) { 176 | parent.innerHTML = ` 177 | `; 180 | } 181 | 182 | function copyToClipboard(str) { 183 | let copy, selection, selected; 184 | copy = createEl('textarea'); 185 | copy.value = str; 186 | copy.setAttribute('readonly', ''); 187 | copy.style.position = 'absolute'; 188 | copy.style.left = '-9999px'; 189 | selection = document.getSelection(); 190 | doc.appendChild(copy); 191 | // check if there is any selected content 192 | selected = selection.rangeCount > 0 ? selection.getRangeAt(0) : false; 193 | copy.select(); 194 | document.execCommand('copy'); 195 | doc.removeChild(copy); 196 | if (selected) { // if a selection existed before copying 197 | selection.removeAllRanges(); // unselect existing selection 198 | selection.addRange(selected); // restore the original selection 199 | } 200 | } -------------------------------------------------------------------------------- /assets/js/mode.js: -------------------------------------------------------------------------------- 1 | function prefersColor(mode){ 2 | return `(prefers-color-scheme: ${mode})`; 3 | } 4 | 5 | function systemMode() { 6 | if (window.matchMedia) { 7 | return window.matchMedia(prefersColor(dark)).matches ? dark : light; 8 | } 9 | return light; 10 | } 11 | 12 | function currentMode() { 13 | let acceptable_chars = light + dark; 14 | acceptable_chars = [...acceptable_chars]; 15 | let mode = getComputedStyle(doc).getPropertyValue(key).replace(/\"/g, '').trim(); 16 | 17 | return [...mode] 18 | .filter(letter => acceptable_chars.includes(letter)) 19 | .join(''); 20 | } 21 | 22 | function changeMode(is_dark_mode) { 23 | if(is_dark_mode) { 24 | bank.setItem(storageKey, light) 25 | elemAttribute(doc, mode_data, light); 26 | } else { 27 | bank.setItem(storageKey, dark); 28 | elemAttribute(doc, mode_data, dark); 29 | } 30 | } 31 | 32 | 33 | function pickModePicture(mode) { 34 | elems('picture').forEach(function(picture){ 35 | let source = picture.firstElementChild; 36 | const picture_data = picture.dataset; 37 | const images = [picture_data.lit, picture_data.dark]; 38 | source.src = mode == 'dark' ? images[1] : images[0]; 39 | }); 40 | } 41 | 42 | function setMermaidTheme(mode) { 43 | bank.setItem(mermaidThemeKey, mode); 44 | let theme_input = elem('.color_choice'); 45 | theme_input.value = mode; 46 | } 47 | 48 | function setUserColorMode(mode = false) { 49 | const is_dark_mode = currentMode() == dark; 50 | const stored_mode = bank.getItem(storageKey); 51 | const sys_mode = systemMode(); 52 | if(stored_mode) { 53 | mode ? changeMode(is_dark_mode) : elemAttribute(doc, mode_data, stored_mode); 54 | } else { 55 | mode === true ? changeMode(is_dark_mode) : changeMode(sys_mode!==dark); 56 | } 57 | const user_mode = doc.dataset.mode; 58 | doc.dataset.systemmode = sys_mode; 59 | user_mode ? pickModePicture(user_mode) : false; 60 | 61 | setMermaidTheme(user_mode); 62 | } 63 | 64 | setUserColorMode(); -------------------------------------------------------------------------------- /assets/js/search/variables.js: -------------------------------------------------------------------------------- 1 | const search_result_class = 'search_result'; 2 | const empty_string = ''; 3 | const search_field_class = '.search_field'; 4 | const search_class = '.search'; 5 | let search_term = empty_string; 6 | const search_field = elem(search_field_class); 7 | 8 | // values defined under config/_default/params.toml 9 | let other_searchable_fields = '{{ delimit (default slice site.Params.otherSearchableFields) ", " }}' 10 | 11 | if(other_searchable_fields.length > 2) { 12 | other_searchable_fields = other_searchable_fields 13 | .split(",") 14 | .map(search_value => search_value.toLowerCase().trim()); 15 | } else { 16 | other_searchable_fields = []; 17 | } 18 | 19 | const search_page_element = elem('#searchpage'); 20 | let search_scope_global = `{{ trim site.Params.search.global " " }}`; 21 | search_scope_global = search_scope_global == 'true' ? true : false; 22 | 23 | // Fuse specific 24 | let search_keys = ['body', 'title', 'link', 'section', 'id',]; 25 | search_keys = search_keys.concat(other_searchable_fields); 26 | 27 | const search_options = { 28 | ignoreLocation: true, 29 | findAllMatches: true, 30 | includeScore: true, 31 | shouldSort: true, 32 | keys: search_keys, 33 | threshold: 0.1 34 | }; 35 | 36 | // Algolia specific 37 | const algolia_config = JSON.parse(`{{ partialCached "functions/getAlgoliaConfig" . }}`); 38 | -------------------------------------------------------------------------------- /assets/js/variables.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const doc = document.documentElement; 4 | const toggle_id = 'toggle'; 5 | const show_id = 'show'; 6 | const menu = 'menu'; 7 | const active = 'active'; 8 | let site_title = `{{ replace (lower site.Title) " " "-" }}`; 9 | let root_url = '{{ strings.TrimSuffix "/" .Site.BaseURL }}/'; 10 | root_url = root_url.startsWith('http') ? root_url : window.location.origin; 11 | 12 | const go_back_class = 'button_back'; 13 | const line_class = '.line'; 14 | 15 | // config defined values 16 | const code_block_config = JSON.parse('{{ partial "functions/getCodeConfig" . }}'); 17 | const iconsPath = `{{ partialCached "functions/getIconPath" . }}`; 18 | 19 | const shell_based = ['sh', 'shell', 'zsh', 'bash']; 20 | 21 | const body = elem('body'); 22 | const max_lines = code_block_config.maximum; 23 | const show_lines = code_block_config.show; 24 | const copy_id = 'panel_copy'; 25 | const wrap_id = 'panel_wrap'; 26 | const lines_id = 'panel_lines'; 27 | const panel_expand = 'panel_expand'; 28 | const panel_expanded = 'panel_expanded'; 29 | const panel_box = 'panel_box'; 30 | const panel_hide = 'panel_hide'; 31 | const panel_from = 'panel_from'; 32 | const full_height = 'initial'; 33 | const highlight = 'highlight'; 34 | const highlight_wrap = 'highlight_wrap' 35 | const hash = '#'; 36 | 37 | const light = 'light'; 38 | const dark = 'dark'; 39 | const storageKey = `${site_title}-color-mode`; 40 | const mermaidThemeKey = `${site_title}-mermaid`; 41 | const key = '--color-mode'; 42 | const mode_data = 'data-mode'; 43 | const bank = window.localStorage; 44 | -------------------------------------------------------------------------------- /assets/sass/_base.sass: -------------------------------------------------------------------------------- 1 | * 2 | box-sizing: border-box 3 | margin: 0 4 | padding: 0 5 | scrollbar-color: var(--scroll-thumb) transparent 6 | scrollbar-width: thin 7 | 8 | ::-webkit-scrollbar 9 | width: .5rem 10 | 11 | ::-webkit-scrollbar-thumb 12 | background: var(--scroll-thumb) 13 | border-radius: .25rem 14 | 15 | body, html 16 | scroll-behavior: smooth 17 | scroll-padding-top: 1rem 18 | font-kerning: normal 19 | -webkit-text-size-adjust: 100% 20 | font-size: 18px 21 | 22 | @keyframes flash 23 | 0% 24 | opacity: 0 25 | 75% 26 | opacity: 0 27 | 100% 28 | opacity: 1 29 | 30 | body 31 | font-family: var(--font) 32 | background-color: var(--bg) 33 | color: var(--text) 34 | line-height: 1.5 35 | margin: 0 auto 36 | position: relative 37 | font-kerning: normal 38 | display: flex 39 | min-width: 0 40 | flex-direction: column 41 | justify-content: space-between 42 | min-height: 100vh 43 | -webkit-font-smoothing: antialiased 44 | -moz-osx-font-smoothing: grayscale 45 | -webkit-overflow-scrolling: touch 46 | max-width: 1440px 47 | animation: 0.67s flash ease-in 48 | 49 | @media screen and (min-width: 1640px) 50 | max-width: 1600px 51 | 52 | a 53 | text-decoration: none 54 | color: inherit 55 | p 56 | padding: 0.75rem 0 57 | // opacity: 0.9 58 | &:empty 59 | display: none 60 | li 61 | &, p 62 | padding: 0.25rem 0 63 | blockquote 64 | opacity: 0.8 65 | padding: 1rem 66 | position: relative 67 | quotes: '\201C''\201D''\2018''\2019' 68 | margin: 0.75rem 0 69 | display: flex 70 | flex-flow: row wrap 71 | background-repeat: no-repeat 72 | background-size: 5rem 73 | background-position: 50% 50% 74 | position: relative 75 | background-color: var(--accent) 76 | border-radius: 0.25rem 77 | overflow: hidden 78 | &::before 79 | content: "" 80 | padding: 2px 81 | position: absolute 82 | top: 0 83 | bottom: 0 84 | left: 0 85 | background: var(--theme) 86 | 87 | p 88 | padding-left: 0.5rem !important 89 | font-size: 1.1rem !important 90 | width: 100% 91 | font-style: italic 92 | 93 | h1,h2,h3,h4,h5 94 | font-family: inherit 95 | font-weight: 500 96 | padding: 0.33rem 0 97 | color: inherit 98 | line-height: 1.35 99 | 100 | h1 101 | font-size: 200% 102 | h2 103 | font-size: 175% 104 | h3 105 | font-size: 150% 106 | h4 107 | font-size: 125% 108 | h5 109 | font-size: 120% 110 | h6 111 | font-size: 100% 112 | 113 | img, svg, figure 114 | max-width: 100% 115 | vertical-align: middle 116 | img 117 | height: auto 118 | margin: 1rem auto 119 | padding: 0 120 | 121 | main 122 | flex: 1 123 | @media screen and (min-width: 42rem) 124 | padding-bottom: 45px 125 | 126 | ol, ul 127 | list-style: none 128 | 129 | b, strong 130 | font-weight: 500 131 | 132 | hr 133 | border: none 134 | padding: 1px 135 | background: var(--border-color) 136 | margin: 1rem 0 137 | 138 | .aside 139 | overflow-y: auto 140 | background: var(--bg) 141 | border-radius: 0.25rem 142 | align-self: start 143 | max-height: 80vh 144 | position: sticky 145 | z-index: 9999 146 | top: 0 147 | padding: 1rem 0 148 | @media screen and (min-width: 42rem) 149 | padding: 1rem 1.5rem 150 | top: 2.5rem 151 | margin-top: 1rem 152 | padding-top: 0 153 | &_inner 154 | height: 0 155 | overflow: hidden 156 | @media screen and (min-width: 42rem) 157 | height: initial 158 | &.show &_inner 159 | height: initial 160 | overflow: visible 161 | &_toggle 162 | padding: 0.5rem 1.5rem 163 | border-radius: 0.5rem 164 | background: var(--accent) 165 | transform: translateY(-1rem) 166 | display: flex 167 | justify-content: space-between 168 | @media screen and (min-width: 42rem) 169 | display: none 170 | h3 171 | position: relative 172 | ul 173 | padding: 0 174 | list-style: none 175 | 176 | th, td 177 | padding: 0.5rem 178 | font-weight: 400 !important 179 | &:not(:first-child) 180 | padding-left: 1.5rem 181 | 182 | thead 183 | background: var(--theme) 184 | color: var(--light) 185 | font-weight: 400 186 | text-align: left 187 | 188 | tbody 189 | tr 190 | &:nth-child(even) 191 | background-color: var(--accent) !important 192 | box-shadow: 0 1rem 0.75rem -0.75rem rgba(0,0,0,0.07) 193 | 194 | table 195 | margin: 1.5rem 0 196 | width: 100% 197 | 198 | .main 199 | flex: 1 200 | > .grid-auto 201 | @media screen and (max-width: 667px) 202 | grid-gap: 0 203 | 204 | .page 205 | &-home 206 | h1 207 | font-weight: 300 208 | 209 | .content 210 | ul, ol 211 | padding-left: 1.1rem 212 | ul 213 | list-style: initial 214 | ol 215 | list-style: decimal 216 | a:not(.button) 217 | color: var(--theme) 218 | 219 | ::placeholder 220 | font-size: 1rem 221 | 222 | svg 223 | &.icon_sort 224 | fill: var(--light) 225 | height: 0.7rem 226 | width: 0.7rem 227 | display: inline-block 228 | margin-left: auto 229 | vertical-align: middle 230 | 231 | canvas 232 | margin: 2.5rem auto 0 auto 233 | max-width: 450px !important 234 | max-height: 450px !important 235 | 236 | footer 237 | min-height: 150px 238 | 239 | del 240 | opacity: 0.5 241 | 242 | #toTop 243 | background: transparent 244 | outline: 0.5rem solid transparent 245 | height: 2rem 246 | width: 2rem 247 | cursor: pointer 248 | padding: 0.5rem 249 | display: flex 250 | align-items: center 251 | justify-content: center 252 | position: fixed 253 | right: 0 254 | bottom: 2.25rem 255 | transform: rotate(45deg) translate(5rem) 256 | opacity: 0 257 | transition: opacity 0.5s var(--ease), transform 0.25s var(--ease) 258 | z-index: 5 259 | &.active 260 | right: 1.5rem 261 | opacity: 1 262 | transform: rotate(45deg) translate(0) 263 | &::after, &::before 264 | position: absolute 265 | display: block 266 | width: 1rem 267 | height: 1rem 268 | content: "" 269 | border-left: 1px solid var(--text) 270 | border-top: 1px solid var(--text) 271 | &::after 272 | width: 0.67rem 273 | height: 0.67rem 274 | transform: translate(0.1rem, 0.1rem) 275 | 276 | #searchpage 277 | padding-top: 5rem 278 | -------------------------------------------------------------------------------- /assets/sass/_chart.sass: -------------------------------------------------------------------------------- 1 | @keyframes chartjs-render-animation 2 | 0% 3 | opacity: .99 4 | 100% 5 | opacity: 1 6 | 7 | .chartjs 8 | &-render-monitor 9 | animation: chartjs-render-animation 1ms 10 | 11 | &-size-monitor 12 | &, &-expand, &-shrink 13 | position: absolute 14 | direction: ltr 15 | left: 0 16 | top: 0 17 | right: 0 18 | bottom: 0 19 | overflow: hidden 20 | pointer-events: none 21 | visibility: hidden 22 | z-index: -1 23 | 24 | &-expand 25 | > div 26 | position: absolute 27 | width: 1000000px 28 | height: 1000000px 29 | left: 0 30 | top: 0 31 | 32 | &-shrink 33 | > div 34 | position: absolute 35 | width: 200% 36 | height: 200% 37 | left: 0 38 | top: 0 39 | -------------------------------------------------------------------------------- /assets/sass/_custom.sass: -------------------------------------------------------------------------------- 1 | // add customs styles and general overrides here 2 | // due to the cascading nature of css, if you try to override theme css variables in this file, those changes will not apply. Instead, override css variables in the `override.sass` file 3 | // we recommend not editing this file directly. Instead, create an `assets/sass/_custom.sass` file at the root level of your site. 4 | // if you edit this file directly, you will have to resolve git conflicts when and if you decide to pull changes we make on the theme 5 | -------------------------------------------------------------------------------- /assets/sass/_fonts.sass: -------------------------------------------------------------------------------- 1 | $font-path: "../fonts" 2 | @font-face 3 | font-family: 'Metropolis' 4 | font-style: normal 5 | font-weight: 400 6 | src: local('Metropolis Regular'), local('Metropolis-Regular'), url('#{$font-path}/Metropolis-Regular.woff2') format('woff2'), url('#{$font-path}/Metropolis-Regular.woff') format('woff') 7 | font-display: swap 8 | 9 | @font-face 10 | font-family: 'Metropolis' 11 | font-style: normal 12 | font-weight: 300 13 | src: local('Metropolis Light'), local('Metropolis-Light'), url('#{$font-path}/Metropolis-Light.woff2') format('woff2'), url('#{$font-path}/Metropolis-Light.woff') format('woff') 14 | font-display: swap 15 | 16 | @font-face 17 | font-family: 'Metropolis' 18 | font-style: italic 19 | font-weight: 300 20 | src: local('Metropolis Light Italic'), local('Metropolis-LightItalic'), url('#{$font-path}/Metropolis-LightItalic.woff2') format('woff2'), url('#{$font-path}/Metropolis-LightItalic.woff') format('woff') 21 | font-display: swap 22 | 23 | @font-face 24 | font-family: 'Metropolis' 25 | font-style: normal 26 | font-weight: 500 27 | src: local('Metropolis Medium'), local('Metropolis-Medium'), url('#{$font-path}/Metropolis-Medium.woff2') format('woff2'), url('#{$font-path}/Metropolis-Medium.woff') format('woff') 28 | font-display: swap 29 | 30 | @font-face 31 | font-family: 'Metropolis' 32 | font-style: italic 33 | font-weight: 500 34 | src: local('Metropolis Medium Italic'), local('Metropolis-MediumItalic'), url('#{$font-path}/Metropolis-MediumItalic.woff2') format('woff2'), url('#{$font-path}/Metropolis-MediumItalic.woff') format('woff') 35 | font-display: swap 36 | 37 | @font-face 38 | font-family: 'Cookie' 39 | font-style: normal 40 | font-weight: 400 41 | src: local('Cookie-Regular'), url('#{$font-path}/cookie-v10-latin-regular.woff2') format('woff2'), url('#{$font-path}/cookie-v10-latin-regular.woff') format('woff') 42 | font-display: swap 43 | -------------------------------------------------------------------------------- /assets/sass/_mermaid.sass: -------------------------------------------------------------------------------- 1 | html[data-mode="dark"] .mermaid 2 | --theme: darkgoldenrod 3 | background-color: transparent !important 4 | margin-bottom: 2.5rem 5 | svg 6 | margin: 0 auto 7 | display: block -------------------------------------------------------------------------------- /assets/sass/_nav.sass: -------------------------------------------------------------------------------- 1 | .nav 2 | display: grid 3 | grid-gap: 1rem 4 | padding: 0 1.5rem !important 5 | align-items: center 6 | background-color: var(--bg) 7 | @media screen and (min-width: 992px) 8 | grid-template-columns: 10rem 1fr 9 | &_brand 10 | position: relative 11 | picture, img 12 | max-width: 10rem 13 | &_header 14 | position: absolute 15 | top: 0 16 | left: 0 17 | width: 100% 18 | background-color: var(--bg) 19 | z-index: 999999 20 | &_toggle 21 | position: absolute 22 | top: 0 23 | bottom: 0 24 | width: 3rem 25 | display: flex 26 | align-items: center 27 | justify-content: flex-end 28 | text-align: center 29 | right: 0 30 | color: var(--text) 31 | @media screen and (min-width: 992px) 32 | display: none 33 | &_body 34 | display: flex 35 | flex-direction: column 36 | background: var(--accent) 37 | position: fixed 38 | left: 0 39 | top: 0 40 | bottom: 0 41 | height: 100vh 42 | transition: transform 0.25s var(--ease) 43 | transform: translateX(-101vw) 44 | @media screen and (min-width: 992px) 45 | transform: translateX(0) 46 | position: relative 47 | height: initial 48 | justify-content: flex-end 49 | background: transparent 50 | flex-direction: row 51 | &.show &_body 52 | transform: translateX(0) 53 | box-shadow: 0 1rem 4rem rgba(0,0,0,0.1) 54 | background: var(--bg) 55 | li:first-child 56 | margin: 1.5rem 1rem 0.5rem 1rem 57 | overflow-y: auto 58 | // input 59 | // background: var(--accent) 60 | &-link 61 | display: inline-flex 62 | padding: 0.5rem 1rem 63 | &-item 64 | display: grid 65 | align-items: center 66 | .search 67 | @media screen and (min-width: 992px) 68 | margin-right: 1.5rem 69 | &_repo 70 | picture, img 71 | max-width: 1.25rem 72 | -------------------------------------------------------------------------------- /assets/sass/_syntax.sass: -------------------------------------------------------------------------------- 1 | @keyframes pulse 2 | 0% 3 | opacity: 1 4 | 75% 5 | opacity: 0.1 6 | 100% 7 | opacity: 1 8 | 9 | code 10 | font-size: 15px 11 | font-weight: 400 12 | overflow-y: hidden 13 | display: block 14 | font-family: 'Monaco', monospace 15 | word-break: break-all 16 | &.noClass 17 | color: var(--inline-color) 18 | display: inline 19 | line-break: anywhere 20 | .windows .highlight 21 | overflow-x: hidden 22 | &:hover 23 | overflow-x: auto 24 | 25 | .highlight 26 | display: grid 27 | width: 100% 28 | border-radius: 0 0.2rem 0.2rem 0 29 | overflow-x: auto 30 | position: relative 31 | &_wrap 32 | display: grid 33 | background: var(--code-bg) !important 34 | border-radius: 0.5rem 35 | position: relative 36 | padding: 0 1rem 37 | margin: 1.5rem auto 1rem auto 38 | & & 39 | margin: 0 40 | padding: 0 41 | & + & 42 | margin-top: 2.25rem 43 | &:hover > div 44 | opacity: 1 45 | .lang 46 | position: absolute 47 | top: 0 48 | right: 0 49 | text-align: right 50 | width: 7.5rem 51 | padding: 0.5rem 1rem 52 | font-style: italic 53 | text-transform: uppercase 54 | font-size: 67% 55 | opacity: 0.5 56 | color: var(--text) 57 | &:hover .lang 58 | opacity: 0.1 59 | & & 60 | margin: 0 61 | pre 62 | color: var(--text) !important 63 | border-radius: 4px 64 | font-family: 'Monaco', monospace 65 | padding-top: 1.5rem 66 | padding-bottom: 2rem 67 | 68 | table 69 | display: grid 70 | max-width: 100% 71 | margin-bottom: 0 72 | background: transparent 73 | td, th 74 | padding: 0 75 | 76 | .lntd 77 | width: 100% 78 | border: none 79 | &:first-child 80 | &, pre 81 | width: 2.5rem !important 82 | padding-left: 0 83 | padding-right: 0 84 | color: rgba(255,255,255,0.5) 85 | user-select: none 86 | 87 | pre 88 | width: 100% 89 | display: flex 90 | min-width: 0 91 | align-items: center 92 | flex-direction: column 93 | 94 | .err 95 | color: #a61717 96 | .hl 97 | width: 100% 98 | background: var(--inline-color) 99 | .ln, .lnt 100 | margin-right: 0.75rem 101 | padding: 0 102 | transition: opacity 0.3s var(--ease) 103 | &, span 104 | color: var(--text) 105 | opacity: 0.5 106 | user-select: none 107 | 108 | .k, .kc, .kd, .kn, .kp, .kr, .kt, .nt 109 | color: #6ab825 110 | font-weight: 500 111 | 112 | .kn, .kp 113 | font-weight: 400 114 | 115 | .nb, .no, .nv 116 | color: #24909d 117 | 118 | .nc, .nf, .nn 119 | color: #447fcf 120 | 121 | .s, .sa, .sb, .sc, .dl, .sd, .s2, .se, .sh, .si, .sx, .sr, .s1, .ss 122 | color: #ed9d13 123 | 124 | .m, .mb, .mf, .mh, .mi, .il, .mo 125 | color: #3677a9 126 | 127 | .ow 128 | color: #6ab825 129 | font-weight: 500 130 | 131 | .c, .ch, .cm, .c1 132 | color: #999 133 | font-style: italic 134 | 135 | .cs 136 | color: #e50808 137 | background-color: #520000 138 | font-weight: 500 139 | 140 | .cp, .cpf 141 | color: #cd2828 142 | font-weight: 500 143 | 144 | .gd, .gr 145 | color: #d22323 146 | 147 | .ge 148 | font-style: italic 149 | 150 | .gh, .gu, .nd, .na, .ne 151 | color: #ffa500 152 | font-weight: 500 153 | 154 | .gi 155 | color: #589819 156 | 157 | .go 158 | color: #ccc 159 | 160 | .gp 161 | color: #aaa 162 | 163 | .gs 164 | font-weight: 500 165 | 166 | .gt 167 | color: #d22323 168 | .w 169 | color: #666 170 | 171 | .hljs 172 | &-string 173 | color: #6ab825 174 | &-attr 175 | color: #ed9d13 176 | .p &-attr 177 | color: var(--light) 178 | 179 | .pre 180 | &_wrap 181 | white-space: pre-wrap 182 | white-space: -moz-pre-wrap 183 | white-space: -pre-wrap 184 | white-space: -o-pre-wrap 185 | word-wrap: break-word 186 | 187 | &_nolines.ln 188 | display: none 189 | 190 | // crayon-like widget styles 191 | .panel 192 | &_box 193 | display: inline-flex 194 | perspective: 300px 195 | grid-gap: 1rem 196 | transition: opacity 0.3s var(--easing) 197 | background: var(--code-bg) 198 | padding: 0.5rem 1.5rem 199 | border-radius: 2rem 200 | align-items: center 201 | position: absolute 202 | right: 0rem 203 | top: -2.1rem 204 | opacity: 0 205 | min-width: 0 206 | &_icon 207 | display: inline-flex 208 | align-items: center 209 | justify-content: center 210 | cursor: pointer 211 | padding: 0.1rem 212 | transform-origin: 50% 50% 213 | margin: 0 214 | min-width: 0 215 | &.active 216 | animation: pulse 0.1s linear 217 | svg 218 | fill: var(--text) 219 | width: 1.5rem 220 | height: 1.5rem 221 | &_hide 222 | // hide icon if not needed 223 | display: none 224 | &_from 225 | position: absolute 226 | color: var(--theme) 227 | bottom: 0 228 | font-size: 1.5rem 229 | font-weight: 500 230 | padding: 0.5rem 0 231 | cursor: pointer 232 | letter-spacing: 0.1px 233 | z-index: 19 234 | &_expanded &_from 235 | display: none 236 | 237 | .shell 238 | position: relative 239 | // display: flex 240 | // align-items: center 241 | // gap: 0.5rem 242 | &::before 243 | content: "$" 244 | position: relative 245 | margin-right: 0.36rem 246 | 247 | .line 248 | &-flex 249 | display: flex 250 | min-width: 0 251 | -------------------------------------------------------------------------------- /assets/sass/_utils.sass: -------------------------------------------------------------------------------- 1 | .wrap 2 | max-width: 1240px 3 | @media screen and (min-width: 1640px) 4 | max-width: 1600px 5 | &, & 6 | width: 100% 7 | padding: 0 25px 8 | margin: 0 auto 9 | 10 | @for $i from 1 through 8 11 | $size: $i * 1.5rem 12 | $x-size: $size * 0.5 13 | .pt-#{$i} 14 | padding-top: $size 15 | 16 | .pb-#{$i} 17 | padding-bottom: $size 18 | 19 | .mt-#{$i} 20 | margin-top: $size 21 | 22 | .mb-#{$i} 23 | margin-bottom: $size 24 | 25 | %grid 26 | display: grid 27 | grid-template-columns: 1fr 28 | 29 | [class*='grid-'] 30 | grid-gap: 2rem 31 | 32 | .grid-2, .grid-3, .grid-4, .grid-auto, .grid-reverse 33 | @extend %grid 34 | 35 | @media screen and (min-width: 42rem) 36 | .grid-auto 37 | grid-template-columns: 2fr 5fr 38 | 39 | .grid-reverse 40 | grid-template-columns: 3fr 1fr 41 | 42 | .grid-2 43 | grid-template-columns: repeat(2, 1fr) 44 | 45 | .grid-3 46 | grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)) 47 | 48 | .grid-4 49 | grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)) 50 | 51 | .active 52 | color: var(--theme) 53 | 54 | .is 55 | background: var(--theme) 56 | color: var(--light) 57 | 58 | .toggle 59 | svg 60 | fill: var(--text) 61 | display: inline-block 62 | transform-origin: 50% 50% 63 | transform: scale(1.2) 64 | cursor: pointer 65 | margin: 0 66 | 67 | .scrollable 68 | width: 100% 69 | overflow-x: hidden 70 | max-width: calc(100vw - 48px) 71 | @media screen and (min-width: 768px) 72 | max-width: 100% 73 | &:hover 74 | overflow-x: auto 75 | 76 | .chart 77 | display: grid 78 | grid-gap: 1.5rem 79 | min-width: 0 80 | max-width: 98vw !important 81 | max-height: 98vw !important 82 | 83 | 84 | .link 85 | display: inline-flex 86 | align-items: center 87 | width: 2.5rem 88 | margin: 0 0.25rem 0 0 89 | padding: 0 0.25rem 90 | opacity: 0 91 | transform: translate(-0.33rem, 0.33rem) 92 | transition: opacity 0.3s cubic-bezier(0.39, 0.575, 0.565, 1) 93 | svg, img 94 | width: 1.5rem 95 | height: 1.5rem 96 | fill: var(--theme) 97 | &_owner:hover & 98 | opacity: 1 99 | 100 | .copy 101 | cursor: pointer 102 | 103 | .standardize-input 104 | appearance: none 105 | -webkit-appearance: none 106 | -------------------------------------------------------------------------------- /assets/sass/_variables.sass: -------------------------------------------------------------------------------- 1 | 2 | html 3 | --color-mode: "light" 4 | --light: #fff 5 | --dark: rgb(28,28,30) 6 | --haze: #f2f5f7 7 | --bubble: rgb(36,36,38) 8 | --accent: var(--haze) 9 | --bg: var(--light) 10 | --code-bg: var(--accent) 11 | --overlay: var(--light) 12 | //--text: #111 13 | --text: #141010 14 | --font: 'Metropolis', sans-serif 15 | --border-color: #eee 16 | --inline-color: darkgoldenrod 17 | --theme: rgb(52,199,89) 18 | --ease: ease 19 | --scroll-thumb: rgba(0,0,0,.06) 20 | --search-border-color: transparent 21 | --next-icon-path: url(../images/icons/double-arrow.svg) 22 | --never-icon-path: url(../images/sitting.svg) 23 | 24 | @mixin darkmode 25 | --color-mode: "dark" 26 | --theme: rgb(48,209,88) 27 | --bg: var(--dark) 28 | --text: #eee 29 | --text-light: #fff 30 | --accent: var(--bubble) 31 | --overlay: var(--bubble) 32 | --border-color: transparent 33 | --scroll-thumb: rgba(255,255,255,.06) 34 | --search-bg: var(--accent) 35 | --search-border-color: var(--accent) 36 | * 37 | box-shadow: none !important 38 | 39 | &[data-mode="dark"] 40 | @include darkmode 41 | .color 42 | &_choice 43 | &::after 44 | background-image: var(--moon-icon) 45 | 46 | &[data-mode="auto"] 47 | @media (prefers-color-scheme: dark) 48 | @include darkmode 49 | 50 | %narrow 51 | max-width: 750px 52 | margin: 0 auto 53 | 54 | blockquote 55 | + .highlight_wrap 56 | margin-top: 2.25rem -------------------------------------------------------------------------------- /assets/sass/main.sass: -------------------------------------------------------------------------------- 1 | {{ $iconsPath := partialCached "functions/getIconPath" . }} 2 | html 3 | --info-icon: url('{{ absURL $iconsPath }}info.svg') 4 | --sun-icon: url('{{ absURL $iconsPath }}sun.svg') 5 | --moon-icon: url('{{ absURL $iconsPath }}moon.svg') 6 | --next-icon: url('{{ absURL $iconsPath }}next.svg') 7 | @import "variables" 8 | @import "base" 9 | @import "nav" 10 | @import "components" 11 | @import "mermaid" 12 | @import "blog" 13 | @import "utils" 14 | @import "syntax" 15 | @import "fonts" 16 | @import "chart" 17 | @import "custom" 18 | @import "mermaid" 19 | -------------------------------------------------------------------------------- /dist/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onweru/compose/053f7d2f6f523fc804d159fd8cebe737a4c90759/dist/.gitkeep -------------------------------------------------------------------------------- /exampleSite/.github/workflows/agolia-update.yaml: -------------------------------------------------------------------------------- 1 | name: Update Algolia Search Index 2 | 3 | off: # change to `on:` to turn on 4 | workflow_dispatch: 5 | branches: 6 | - production 7 | push: 8 | paths: 9 | - content/**/* 10 | - hugo.toml 11 | 12 | env: 13 | # Name of the branch in your repository which will store your generated site. 14 | SITE-BRANCH: master 15 | 16 | jobs: 17 | build: 18 | # In this phase, the code is pulled from main and the site rendered in Hugo. The built site is stored as an artifact for other stages. # deploy: 19 | runs-on: ubuntu-20.04 20 | concurrency: 21 | group: ${{ github.workflow }}-${{ github.ref }} 22 | steps: 23 | - uses: actions/checkout@v3 24 | with: 25 | submodules: true # Fetch Hugo themes (true OR recursive) 26 | fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod 27 | 28 | - name: Setup Hugo 29 | uses: peaceiris/actions-hugo@v2 30 | with: 31 | hugo-version: 'latest' 32 | extended: true 33 | 34 | - name: Build 35 | run: hugo -e "production" -d "dist" --minify 36 | # If build succeeds, store the dist/ dir as an artifact to be used in subsequent phases. 37 | - name: Upload output dist dir as artifact 38 | uses: actions/upload-artifact@v1 39 | with: 40 | name: dist 41 | path: dist/ 42 | publish: 43 | # In the publish phase, the site is pushed up to a different branch which only stores the dist/ folder ("site" branch) and is also delta synchronized to the S3 bucket. CloudFront invalidation happens last. 44 | runs-on: ubuntu-20.04 45 | needs: build 46 | steps: 47 | # Check out the site branch this time since we have to ultimately commit those changes there. 48 | - name: Checkout site branch 49 | uses: actions/checkout@v3 50 | with: 51 | submodules: true 52 | fetch-depth: 0 53 | ref: ${{ env.SITE-BRANCH }} 54 | # Download the artifact containing the newly built site. This overwrites the dist/ dir from the check out above. 55 | - name: Download artifact from build stage 56 | uses: actions/download-artifact@v1 57 | with: 58 | name: dist 59 | # Add all the files/changes in dist/ that were pulled down from the build stage and then commit them. 60 | # The final line sets a GitHub Action output value that can be read by other steps. 61 | # This function cannot store mult-line values so newline chars must be stripped. 62 | - name: Commit files 63 | id: can_commit 64 | run: | 65 | git config --local user.email "action@github.com" 66 | git config --local user.name "GitHub Action" 67 | cp dist/index.json index.json 68 | git add -A index.json 69 | commit_message=$(git commit -m "Build search index." -a | tr -d '\n' || true) 70 | echo "commit_message=$commxit_message >> $GITHUB_OUTPUT" 71 | 72 | # Checks if previous stage had any valid commit. 73 | - name: Nothing to commit 74 | id: nothing_committed 75 | if: contains(steps.can_commit.outputs.commit_message, 'nothing to commit') 76 | run: echo "Saw that no changes were made to Hugo site." 77 | # Push those changes back to the site branch. 78 | - name: Push to site branch 79 | if: steps.nothing_committed.conclusion == 'skipped' 80 | uses: ad-m/github-push-action@master 81 | with: 82 | github_token: ${{ secrets.GITHUB_TOKEN }} 83 | branch: ${{ env.SITE-BRANCH }} 84 | index: 85 | runs-on: ubuntu-latest 86 | needs: publish 87 | name: Upload Algolia Index 88 | steps: 89 | - uses: actions/checkout@v2 90 | with: 91 | fetch-depth: 0 92 | - uses: wangchucheng/algolia-uploader@master 93 | with: 94 | # Such as `Z0U0ACGBN8` 95 | app_id: ${{ secrets.AGOLIA_INDEX_ID }} 96 | # Go to https://github.com/dimi365/website/settings/secrets/actions and set an AGOLIA_ADMIN_KEY secret key 97 | admin_key: ${{ secrets.AGOLIA_ADMIN_KEY }} 98 | # The algolia search index name. 99 | index_name: compose # edit appropriately 100 | # The index file path relative to repo root. no leading forward slash 101 | index_file_path: index.json -------------------------------------------------------------------------------- /exampleSite/.github/workflows/aws-deploy.yaml: -------------------------------------------------------------------------------- 1 | # PREREQUISITES: 2 | # The following secrets must be stored in your repository where this Action runs: 3 | # AWS_ACCESS_KEY_ID 4 | # AWS_CLOUDFRONT_DISTRO_ID 5 | # AWS_S3_BUCKET_NAME 6 | # AWS_SECRET_ACCESS_KEY 7 | 8 | name: AWS DEPLOY CI 9 | off: # change to `on:` to turn on 10 | workflow_dispatch: 11 | branches: 12 | - main 13 | push: 14 | paths: 15 | - content/**/* 16 | - hugo.toml 17 | # pull_request: 18 | # branches: 19 | # - production 20 | env: 21 | # Default AWS region where S3 pushes and CloudFront invalidations will occur. 22 | AWS-DEFAULT-REGION: us-east-2 23 | # Name of the branch in your repository which will store your generated site. 24 | SITE-BRANCH: site 25 | 26 | jobs: 27 | build: 28 | # In this phase, the code is pulled from main and the site rendered in Hugo. The built site is stored as an artifact for other stages. # deploy: 29 | runs-on: ubuntu-20.04 30 | concurrency: 31 | group: ${{ github.workflow }}-${{ github.ref }} 32 | steps: 33 | - uses: actions/checkout@v3 34 | with: 35 | submodules: true # Fetch Hugo themes (true OR recursive) 36 | fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod 37 | 38 | - name: Setup Hugo 39 | uses: peaceiris/actions-hugo@v2 40 | with: 41 | hugo-version: 'latest' 42 | extended: true 43 | 44 | - name: Build 45 | run: hugo -e "production" -d "dist" --minify 46 | # If build succeeds, store the dist/ dir as an artifact to be used in subsequent phases. 47 | - name: Upload output public dir as artifact 48 | uses: actions/upload-artifact@v1 49 | with: 50 | name: dist 51 | path: dist/ 52 | publish: 53 | # In the publish phase, the site is pushed up to a different branch which only stores the dist/ folder ("site" branch) and is also delta synchronized to the S3 bucket. CloudFront invalidation happens last. 54 | runs-on: ubuntu-20.04 55 | needs: build 56 | steps: 57 | # Check out the site branch this time since we have to ultimately commit those changes there. 58 | - name: Checkout site branch 59 | uses: actions/checkout@v3 60 | with: 61 | submodules: true 62 | fetch-depth: 0 63 | ref: ${{ env.SITE-BRANCH }} 64 | # Download the artifact containing the newly built site. This overwrites the dist/ dir from the check out above. 65 | - name: Download artifact from build stage 66 | uses: actions/download-artifact@v1 67 | with: 68 | name: public 69 | # Add all the files/changes in dist/ that were pulled down from the build stage and then commit them. 70 | # The final line sets a GitHub Action output value that can be read by other steps. 71 | # This function cannot store mult-line values so newline chars must be stripped. 72 | - name: Commit files 73 | id: can_commit 74 | run: | 75 | git config --local user.email "action@github.com" 76 | git config --local user.name "GitHub Action" 77 | git add -A dist/ 78 | commit_message=$(git commit -m "Publish generated Hugo site." -a | tr -d '\n' || true) 79 | echo "commit_message=$commit_message >> $GITHUB_OUTPUT" 80 | # Checks if previous stage had any valid commit. 81 | - name: Nothing to commit 82 | id: nothing_committed 83 | if: contains(steps.can_commit.outputs.commit_message, 'nothing to commit') 84 | run: echo "Saw that no changes were made to Hugo site." 85 | # Push those changes back to the site branch. 86 | - name: Push to site branch 87 | if: steps.nothing_committed.conclusion == 'skipped' 88 | uses: ad-m/github-push-action@master 89 | with: 90 | github_token: ${{ secrets.GITHUB_TOKEN }} 91 | branch: ${{ env.SITE-BRANCH }} 92 | # Store the AWS credentials on the runner. 93 | - name: Configure AWS credentials 94 | if: steps.nothing_committed.conclusion == 'skipped' 95 | uses: aws-actions/configure-aws-credentials@v1-node16 96 | with: 97 | aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} 98 | aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} 99 | aws-region: ${{ env.AWS-DEFAULT-REGION }} 100 | - name: Delta sync site to S3 with aws cli 101 | if: steps.nothing_committed.conclusion == 'skipped' 102 | run: aws s3 sync --size-only --delete --exclude "/authors/*/page/*" --cache-control max-age=2592000 dist/ s3://${{ secrets.AWS_S3_BUCKET_NAME }} 103 | # Use s5cmd to perform only a delta sync to the destination S3 bucket. This minimizes transfer traffic since it only uploads changed files. 104 | # - name: Delta sync site to S3 bucket 105 | # if: steps.nothing_committed.conclusion == 'skipped' 106 | # run: | 107 | # curl -sLO https://github.com/peak/s5cmd/releases/download/v1.0.0/s5cmd_1.0.0_Linux-64bit.tar.gz 108 | # tar -xzf s5cmd_1.0.0_Linux-64bit.tar.gz 109 | # chmod +x s5cmd 110 | # sudo mv s5cmd /usr/local/bin/ 111 | # echo "****Showing working dir and listing files.****" 112 | # pwd && ls -lah 113 | # echo "****Running delta sync against S3.****" 114 | # s5cmd cp -s -n -u dist/ s3://${{ secrets.AWS_S3_BUCKET_NAME }} 115 | # Use the aws cli tool to perform a glob invalidation of the entire site against CloudFront. 116 | - name: Invalidate cache on CloudFront 117 | if: steps.nothing_committed.conclusion == 'skipped' 118 | run: aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_CLOUDFRONT_DISTRO_ID }} --paths "/*" -------------------------------------------------------------------------------- /exampleSite/README.md: -------------------------------------------------------------------------------- 1 | ## Guide 2 | 3 | This guide covers the necessary bits. As the project evolves, it will only become more comprehensive 4 | -------------------------------------------------------------------------------- /exampleSite/config/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onweru/compose/053f7d2f6f523fc804d159fd8cebe737a4c90759/exampleSite/config/.gitkeep -------------------------------------------------------------------------------- /exampleSite/config/_default/languages.toml: -------------------------------------------------------------------------------- 1 | [en] 2 | LanguageName = "English" 3 | weight = 2 4 | # [tr] 5 | # LanguageName = "Turkish" 6 | # weight = 1 7 | -------------------------------------------------------------------------------- /exampleSite/config/_default/markup.toml: -------------------------------------------------------------------------------- 1 | [goldmark] 2 | [goldmark.renderer] 3 | unsafe = true 4 | [goldmark.extensions] 5 | typographer = false 6 | [highlight] 7 | codeFences = true 8 | guessSyntax = false 9 | hl_Lines = "" 10 | lineNoStart = 1 11 | lineNos = true 12 | lineNumbersInTable = false 13 | noClasses = false 14 | style = "monokai" 15 | tabWidth = 2 16 | [tableOfContents] 17 | endLevel = 4 18 | ordered = false 19 | startLevel = 2 -------------------------------------------------------------------------------- /exampleSite/config/_default/menus/menu.en.toml: -------------------------------------------------------------------------------- 1 | # menu items 2 | [[main]] 3 | name = "Blog" 4 | weight = 5 5 | url = "blog/" 6 | 7 | [[main]] 8 | name = "Docs" 9 | weight = 2 10 | url = "docs/" 11 | 12 | [[main]] 13 | name = "Tutorials" 14 | weight = 2 15 | url = "tutorials/" 16 | 17 | [[main]] 18 | name = "Example" 19 | weight = 3 20 | url = "https://docs.neuralvibes.com" 21 | 22 | # [[main]] 23 | # name = "Blog" 24 | # weight = 4 25 | # url = "blog/" -------------------------------------------------------------------------------- /exampleSite/config/_default/params.toml: -------------------------------------------------------------------------------- 1 | # use the setting below to set multiple docs directories. 2 | # docSections = ["docs", "tutorials"] 3 | 4 | uniqueHomePage = true # change to false to add sidebar to homepage 5 | 6 | blogDir = "blog" # can be posts, blog e.t.c 7 | 8 | repo = "https://github.com/onweru/compose" 9 | 10 | time_format_blog = "Monday, January 02, 2006" 11 | time_format_default = "January 2, 2006" 12 | enableDarkMode = false # set to false to disable darkmode by default # user will still have the option to use dark mode 13 | defaultLightingMode = "auto" # other possible values: "dark", "light" 14 | 15 | # sets the maximum number of lines per codeblock. The codeblock will however be scrollable and expandable. 16 | codeMaxLines = 10 17 | 18 | # show/hide line numbers by default. Switch to `true` if you'd rather have them on. 19 | showLineNumbers = false 20 | 21 | # By default the template will look for icons under the icons directory. In some situations you might wanna change that. edit the line below 22 | # iconsPath = 'icons/' 23 | 24 | otherSearchableFields = [ 25 | "Tags", 26 | "Categories", 27 | "CustomField", 28 | ] # As they appear in frontmatter 29 | 30 | # Defaults to true if not set 31 | # Enable copyRight Footer Stamp. Takes in attribution 32 | enableCopyright = false 33 | 34 | # search 35 | [search] 36 | on = true 37 | global = false # turn to `true` to enable global search 38 | [search.algolia] 39 | enable = false # if false search will default to fusejs 40 | id = "Q40WQQX84U" # Application ID 41 | index = "compose" # Index name 42 | key = "da87401a458102ec6bbd6cc5e5cf8d95" # Search-Only API Key 43 | 44 | # Site logo 45 | [logo] 46 | lightMode = "images/compose.svg" 47 | darkMode = "images/compose-light.svg" 48 | 49 | [source] 50 | name = "GitHub" 51 | iconLight = "images/GitHubMarkLight.svg" 52 | iconDark = "images/GitHubMarkDark.svg" 53 | url = "https://github.com/onweru/compose/" 54 | 55 | # optional 56 | # attribution. Feel free to delete this 57 | [author] 58 | name = "Weru" 59 | url = "https://neuralvibes.com/author/" 60 | -------------------------------------------------------------------------------- /exampleSite/content/_index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Compose" 3 | [data] 4 | baseChartOn = 3 5 | colors = ["#627c62", "#11819b", "#ef7f1a", "#4e1154"] 6 | columnTitles = ["Section", "Status", "Author"] 7 | fileLink = "content/projects.csv" 8 | title = "Projects" 9 | +++ 10 | 11 | {{< block "grid-2" >}} 12 | {{< column >}} 13 | 14 | # Compose your Docs with **Ease**. 15 | 16 | Compose is a lean `Hugo` documentation theme, inspired by [forestry.io](https://forestry.io/docs/welcome/). 17 | 18 | {{< tip "warning" >}} 19 | Feel free to open a [PR](https://github.com/onweru/compose/pulls), raise an [issue](https://github.com/onweru/compose/issues/new/choose "Open a Github Issue")(s) or request new feature(s). {{< /tip >}} 20 | 21 | {{< tip >}} 22 | You can generate diagrams, flowcharts, and piecharts from text in a similar manner as markdown using [mermaid](./docs/compose/mermaid/). 23 | 24 | Or, [generate graphs, charts](docs/compose/graphs-charts-tables/#show-a-pie-doughnut--bar-chart-at-once) and tables from a csv, ~~or a json~~ file. 25 | {{< /tip >}} 26 | 27 | {{< button "docs/compose/" "Read the Docs" >}}{{< button "https://github.com/onweru/compose" "Download Theme" >}} 28 | {{< /column >}} 29 | 30 | {{< column >}} 31 |  32 | {{< /column >}} 33 | {{< /block >}} 34 | -------------------------------------------------------------------------------- /exampleSite/content/blog/_index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Blog" 3 | +++ -------------------------------------------------------------------------------- /exampleSite/content/blog/emoji-support.md: -------------------------------------------------------------------------------- 1 | +++ 2 | author = "Hugo Authors" 3 | title = "Emoji Support" 4 | date = "2019-03-05" 5 | description = "Guide to emoji usage in Hugo" 6 | tags = ["emoji"] 7 | image = "/images/artist.jpg" 8 | +++ 9 | 10 | Emoji can be enabled in a Hugo project in a number of ways. 11 | 12 | 13 | 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). 14 | 15 | {{< youtube "https://www.youtube.com/watch?v=eW7Twd85m2g" >}} 16 | 17 | 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. 18 | 19 |
🙈 :see_no_evil:
🙉 :hear_no_evil:
🙊 :speak_no_evil:
` tag.
71 |
72 | Alternatively, if you want to use the `hugo.toml` to track your custom styles or scripts, declare them as slices under `[params]` like so:
73 |
74 | ```toml
75 | ...
76 | [params]
77 | customCSS = [styleURL1, styleURL2 ...]
78 | customJS = [scriptURL1, scriptURL2 ... ]
79 | ...
80 | ```
81 |
82 | ### I want to add custom SASS or JS
83 |
84 | Add custom SASS and JS via [this custom SASS file](https://github.com/onweru/compose/blob/master/assets/sass/_custom.sass) and [this custom JavaScript file](https://github.com/onweru/compose/hugo-compose/blob/master/assets/js/custom.js).
85 |
86 | ### How to change site favicon
87 |
88 | Your favicons should be stored inside `static/favicons` directory.
89 |
90 | Here are some of the favicon files that you should have in that folder:
91 |
92 | ```
93 | .
94 | ├── android-chrome-192x192.png
95 | ├── android-chrome-512x512.png
96 | ├── apple-touch-icon.png
97 | ├── favicon-16x16.png
98 | ├── favicon-32x32.png
99 | ├── favicon.ico
100 | └── site.webmanifest
101 | ```
102 |
103 | We recommend you consider using this [tool](https://realfavicongenerator.net/) while generating your favicons.
--------------------------------------------------------------------------------
/exampleSite/content/docs/compose/github-actions.md:
--------------------------------------------------------------------------------
1 | +++
2 | description = "Use github actions with compose theme"
3 | title = "Leverage Github actions"
4 | weight = 11
5 | +++
6 |
7 | This theme ships with 2 github actions inside the exampleSite folder:
8 |
9 | 1. AWS CI
10 | 2. Algolia CI
11 |
12 | ## AWS CI
13 |
14 | This helps you to autodeploy your hugo website from github to an AWS s3 bucket. Set the secrets in the action accordingly and voila.
15 |
16 | ## Algolia CI
17 |
18 | This action will automatically update your algolia search index. No extra npm manual setup will be needed.
19 |
20 | These actions are customizable to fire off under your specified set of circumstances.
21 |
22 | By default, the actions will be off, so be sure to turn them on, and set the github actions secrets appropriately.
23 |
24 | ```shell
25 | name: Update Algolia Search Index
26 |
27 | off: # change to `on:` to turn on
28 | ```
--------------------------------------------------------------------------------
/exampleSite/content/docs/compose/graphs-charts-tables.md:
--------------------------------------------------------------------------------
1 | +++
2 | title = "Graphs, charts & dynamic tables"
3 | weight = 9
4 | [dataset1]
5 | fileLink = "content/projects.csv" # path to where csv is stored
6 | colors = ["#ef7f1a", "#627c62", "#11819b", "#4e1154"] # chart colors
7 | columnTitles = ["Section", "Status", "Author"] # optional if not table will be displayed from dataset
8 | baseChartOn = 3 # number of column the chart(s) and graph should be drawn from # can be overridden directly via shortcode parameter # it's therefore optional
9 | title = "Projects"
10 |
11 | [dataset2]
12 | fileLink = "content/themes.csv" # path to where csv is stored
13 | colors = ["#ef7f1a", "#627c62", "#11819b", "#4e1154"] # chart colors
14 | columnTitles = ["Theme", "Latest Version", "Repo Owner"] # Optional if no table will be displayed from dataset
15 | baseChartOn = 2 # number of column the chart(s) and graph should be drawn from # can be overridden directly via shortcode parameter # it's therefore optional
16 | title = "Hugo Themes"
17 | +++
18 |
19 | Using [chart js library](https://www.chartjs.org/) you can display data you have stored in a `csv` file as a pie chart, bar graph or doughnut chart.
20 |
21 | At this point if you want to display data from a json or yaml file, you would need to [convert it into csv](http://convertcsv.com/json-to-csv.htm) first. Else the template will error out.
22 |
23 | Once you have a csv file, you display the charts as follows:
24 |
25 | #### Show a pie, doughnut & bar chart at once
26 |
27 | Firstly define the data you want to display from the front matter:
28 |
29 | ```markdown
30 | # from front matter
31 | ...
32 | [dataset1] # this key will in the chart shortcode
33 | fileLink = "content/projects.csv" # path to where csv is stored
34 | colors = ["#627c62", "#11819b", "#ef7f1a", "#4e1154"] # chart colors
35 | columnTitles = ["Section", "Status", "Author"]
36 | charts = ["bar", "doughnut", "pie", "table"]
37 | baseChartOn = 3 # number of column the chart(s) and graph should be drawn from
38 | piechart = true
39 | doughnutchart = true
40 | bargraph = true
41 | title = "Projects"
42 | table = true # show table listing the chart data
43 |
44 | // from page content
45 | ...
46 | {{* grid " mt-2" */>}}
47 | {{* chart "dataset1" */>}}
48 | {{* /grid */>}}
49 | ...
50 | ```
51 |
52 | {{< grid "3 mt-2 mb-2" >}}
53 | {{< chart "dataset1" "pie,doughnut,bar" >}}
54 | {{< /grid >}}
55 |
56 | #### __Show Table at once__
57 |
58 | {{< block >}}
59 | {{< chart "dataset1" "table" >}}
60 | {{< /block >}}
61 |
62 | Firstly define the data you want to display from the front matter:
63 |
64 | ```toml
65 | # from page front matter
66 | [dataset2]
67 | fileLink = "content/themes.csv" # path to where csv is stored # this key will in the chart shortcode
68 | colors = ["#627c62", "#11819b", "#ef7f1a", "#4e1154"] # chart colors
69 | columnTitles = ["Theme", "Latest Version", "Owner"]
70 | title = "Hugo Themes"
71 | baseChartOn = 2 # number of column the chart(s) and graph should be drawn from
72 | piechart = false
73 | doughnutchart = true
74 | bargraph = true
75 | table = false # show table listing the chart data
76 | ```
77 |
78 | #### Show only a pie and a doughnut chart
79 |
80 | ```markdown
81 | // from page content
82 | ...
83 | {{* grid " mt-2" */>}}
84 | {{* chart "dataset2" */>}}
85 | {{* /grid */>}}
86 | ...
87 | ```
88 |
89 | {{< grid "3 mt-2 mb-2" >}}
90 | {{< chart "dataset2" "pie,doughnut" "1" >}}
91 | {{< /grid >}}
92 |
93 | #### Show table with filter
94 |
95 | {{< grid "3" >}}
96 | {{< chart "dataset2" "table" >}}
97 | {{< /grid >}}
98 |
99 | #### Show table only
100 |
101 | {{< grid "3" >}}
102 | {{< chart "dataset2" "table,noFilter" >}}
103 | {{< /grid >}}
104 |
--------------------------------------------------------------------------------
/exampleSite/content/docs/compose/install-theme.md:
--------------------------------------------------------------------------------
1 | +++
2 | title = "Install theme"
3 | weight = 2
4 | description = """
5 | This page tells you how to get started with the Compose theme.
6 | """
7 | +++
8 |
9 | ### Prerequisites
10 |
11 | First ensure that you have hugo installed.
12 |
13 | You need a [recent **extended** version](https://github.com/gohugoio/hugo/releases) (we recommend version 0.61 or later) of [Hugo](https://gohugo.io/) to do local builds and previews of sites (like this one) that uses this theme.
14 |
15 | If you install from the release page, make sure to get the `extended` Hugo version, which supports [sass](https://sass-lang.com/documentation/file.SCSS_FOR_SASS_USERS.html); you may need to scroll down the list of releases to see it.
16 |
17 | For comprehensive Hugo documentation, see [gohugo.io](https://gohugo.io/).
18 |
19 | ## Run your site with compose theme
20 |
21 | You could go with the options right below.
22 |
23 | ### Option 1 (my favorite)
24 |
25 | This option enables you to load compose theme as a hugo module. First things first, ensure you have `go` binary [installed on your machine](https://golang.org/doc/install).
26 |
27 | ```shell
28 | $ git clone https://github.com/onweru/compose/
29 | cd compose/exampleSite/
30 | hugo server
31 | ```
32 |
33 | To pull in theme updates, run `hugo mod get -u ./...` from the theme folder. If unsure, [learn how to update hugo modules](https://gohugo.io/hugo-modules/use-modules/#update-modules)
34 |
35 | {{< tip "warning" >}}
36 | The exampleSite uses the theme as a hugo module by default.
37 |
38 | If you choose __Option 2__ or __Option 3__ below, ensure you edit [these lines in the hugo.toml file](https://github.com/onweru/compose/blob/b3e30e0816621223224897edc45eeeabd0d9cd16/exampleSite/hugo.toml#L4-L7) as advised on the comments. Else, you will not be able to pull theme updates.
39 | {{< /tip >}}
40 |
41 | ### Option 2 (recommended)
42 |
43 | Generate a new Hugo site and add this theme as a Git submodule inside your themes folder:
44 |
45 | ```bash
46 | hugo new site yourSiteName
47 | cd yourSiteName
48 | git init
49 | git submodule add https://github.com/onweru/compose/ themes/compose
50 | cp -a themes/compose/exampleSite/* .
51 | git commit -m "setup compose theme"
52 | ```
53 |
54 | Then run
55 |
56 | ```bash
57 | hugo server
58 | ```
59 |
60 | Hurray!
61 |
62 | ### Option 3 (Great for testing quickly)
63 |
64 | You can run your site directly from the `exampleSite`. To do so, use the following commands:
65 |
66 | ```bash
67 | git clone https://github.com/onweru/compose/
68 | cd compose/exampleSite/
69 | hugo server --themesDir ../..
70 | ```
71 |
72 | {{< tip >}}
73 | Although, option 3 is great for quick testing, it is somewhat problematic when you want to update your theme. You would need to be careful not to overwrite your changes.
74 | {{< /tip >}}
75 |
76 | Once set, jump over to the [hugo.toml](https://github.com/onweru/compose/blob/afdf1cd76408aeac11547a6abd51bdc5138a295f/exampleSite/hugo.toml#L4-L7) file and start configuring your site.
77 |
78 |
--------------------------------------------------------------------------------
/exampleSite/content/docs/compose/organize-content.md:
--------------------------------------------------------------------------------
1 | +++
2 | title = "Content organization"
3 | weight = 4
4 | +++
5 |
6 | This theme is primarily meant for documentation.
7 |
8 | #### Documentation
9 |
10 | By default, the theme will look for all your documentation content within the `docs` directory.
11 |
12 | However, if you would like to have your docs content across multiple directories, please list those directories inside `config/_default/params.toml` under `docSections` like so:
13 |
14 | ```
15 | ...
16 | docSections = ["docs", "tutorials"]
17 | ...
18 | ```
19 |
20 | Unlike other regular pages, the documentation pages will have a left sidebar. This sidebar will list links to all the pages in the documentation pages. Beneath each link, there will be a collapsible list of __table of contents'__ links. These nested lists will unfold automatically on the active/current page.
21 |
22 | #### Home Page
23 |
24 | At the root level there's an `_index.md` page which is the homepage. Feel free to edit it as you like.
25 |
26 | #### Other pages
27 |
28 | You can also add as many regular pages as you like e.g `about.md`, `contact.md`...
29 |
30 | Take advantage of [shortcodes](../shortcodes) to customize the layouts of these pages and any other.
31 |
32 | #### Does this theme support blogging function?
33 |
34 | Currently, no.
35 |
--------------------------------------------------------------------------------
/exampleSite/content/docs/compose/search.md:
--------------------------------------------------------------------------------
1 | +++
2 | description = ""
3 | title = "Search Function"
4 | weight = 7
5 | +++
6 |
7 | Firstly, ensure you have these lines inside your hugo.toml file
8 |
9 | ```toml
10 | [outputs]
11 | home = ["HTML", "RSS","JSON"]
12 | ```
13 |
14 | Compose implements [Fuse js](https://fusejs.io/) or [Algolia](https://www.algolia.com/doc/rest-api/search/) to enable search functionality. By default Fuse is applied. Algolia can be enabled by adding this settings to `config/_default/params.toml` file
15 |
16 | ```toml
17 | # search
18 | [search]
19 | on = true
20 | global = false
21 | [search.algolia]
22 | enable = false # if false search will default to fusejs
23 | id = "Q40WQQX84U" # Application ID
24 | index = "compose" # Index name
25 | key = "da87401a458102ec6bbd6cc5e5cf8d95" # Search-Only API Key
26 | ```
27 |
28 | Both search engines will display results using the same UI. By choosing the default (.ie fuse js), you will be opting for local search. This way, no additional setup is needed.
29 |
30 | Algolia will require you to build and host your index. For those using Github, this theme ships with an [algolia github action](/docs/compose/github-actions/#algolia-ci).
31 |
32 | By default, search will return results from the current content section. Searches from the top level section e.g the homepage, will return global results. This way, the results are scoped. You can override this behaviour using this setting
33 |
34 | ```toml
35 | ...
36 | [search]
37 | ...
38 | global = false # turn to `true` to enable global search
39 | ...
40 | ```
41 |
42 | At the time of this writing, search on these theme takes either of this forms:
43 |
44 | ### 1. Passive search
45 |
46 | This occurs only when the user loads the search page i.e `/search/`. They can directly navigate to that url. Alternatively, the user can type you search query on the search field and click enter. They will be redirected to the search page which will contain matched results if any.
47 |
48 | ### 2. Live search
49 |
50 | This behaviour will be obvious as the user types a search query on the search field. All `valid search queries`, will yield a list of `quick links` or a simple `no matches found`. Else, the user will be prompted to continue typing.
51 |
52 | > Please note that the results under quick links will be a truncated list of the most relevant results. Only a maximum of 8 items will be returned. This number is pragmatic at best if not arbitrary. On the search page, the number is set to 12.
53 |
54 | Note that live search on the search page will behave differently than on the other pages. Nonetheles, the pages apply the same live search principle.
55 |
56 | > Hitting enter while typing on the search page will be moot as that page’s content will live update as you type in the search word / phrase.
57 |
58 | ### Customize search feedback labels
59 |
60 | Use the `i18n` files to do so.
61 |
62 | ### What is a valid search query
63 |
64 | A valid search query must be long enough. If the search query can be cast as a float, then it only need contain one or more characters.
65 |
66 | Else the search query must be at least 2 characters long.
67 |
68 |
--------------------------------------------------------------------------------
/exampleSite/content/docs/compose/shortcodes-example.md:
--------------------------------------------------------------------------------
1 | +++
2 | title = "Shortcodes Applied"
3 | weight = 7
4 | description = "This is how the shortcodes would look like in action"
5 | draft = true
6 | +++
7 |
8 | ### Blocks, columns & buttons
9 |
10 | ```sh
11 | {{* block "grid-2" */>}}
12 | {{* column */>}}
13 | #### Coumn 1
14 |
15 | Lorem ipsum dolor sit amet,
16 | ...
17 |
18 | {{* button "https://github.com/onweru/compose" "Download Theme" */>}}
19 |
20 | {{* /column */>}}
21 | {{* column */>}}
22 |
23 |
24 | ```
25 |
26 | {{< block "grid-2" >}}
27 | {{< column >}}
28 | #### Coumn 1
29 |
30 | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et
31 |
32 | dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
33 |
34 | Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
35 |
36 | > Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
37 |
38 | {{< button "https://github.com/onweru/compose" "Download Theme" >}}
39 |
40 | {{< /column >}}
41 | {{< column >}}
42 | #### Coumn 2
43 |
44 |
45 | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et
46 |
47 | > dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
48 |
49 | Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
50 |
51 | Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
52 |
53 | {{< button "docs/" "Read the Docs" >}}
54 |
55 | {{< /column >}}
56 | {{< /block >}}
--------------------------------------------------------------------------------
/exampleSite/content/docs/compose/shortcodes.md:
--------------------------------------------------------------------------------
1 | +++
2 | description = "Use hugo shortcodes to quickly compose your documentation pages."
3 | title = "Shortcodes"
4 | weight = 5
5 |
6 | +++
7 | Instead of writing all your site pages from scratch, Hugo lets you define and use [shortcodes](https://gohugo.io/content-management/shortcodes/).
8 |
9 | Why shortcodes? While markdown is sufficient to produce simple pages, it's insufficient where complex page structures are needed. Thusly, whenever we need special styling, shortcodes compliment the shortcomings of markdown.
10 |
11 | This way, you can side step complex html and css boilerplate in your content files.
12 |
13 | Sometimes, the shortcode will wrap content, sometimes it won't. When content is wrapped, a closing shortcode tag is needed. Please see the link I provided above and the markdown files for examples. You'll get the gist pretty quickly.
14 |
15 | I've setup the following shortcodes:
16 |
17 | ### Block
18 |
19 | Takes positional modifiers
20 |
21 | **Example**
22 |
23 | ```markdown
24 | ...
25 | {{* block "modifiers" */>}}
26 |
27 | {{* /block */>}}
28 | ...
29 | ```
30 |
31 | ### Column
32 |
33 | It takes positional parameters
34 |
35 | **Example**
36 |
37 | ```markdown
38 | {{* column "mt-2 mb-2" */>}}
39 |
40 | {{* /column */>}}
41 | ```
42 |
43 | ### Youtube Video
44 |
45 | This allows you to embed a youtube video in you content. You would achieve that using a positional parameter (needs no name )parameter, like so:
46 |
47 | **Syntax**
48 |
49 | ```markdown
50 | {{* youtube "25QyCxVkXwQ" */>}}
51 |
52 | ```
53 |
54 | **Result**
55 |
56 | {{< youtube "25QyCxVkXwQ" >}}
57 |
58 | **OR**
59 |
60 | **Syntax**
61 |
62 | ```markdown
63 |
64 | {{* youtube "https://www.youtube.com/watch?v=MmG2ah5Df4g" */>}}
65 | ```
66 |
67 | **Result**
68 |
69 | {{< youtube "https://www.youtube.com/watch?v=MmG2ah5Df4g" >}}
70 |
71 | #### Lite YouTube
72 |
73 | The `liteyoutube` shortcode supports three parameters:
74 |
75 | | PARAMETER | PURPOSE | OPTIONAL |
76 | | :--- | :--- | :--- |
77 | | videoid | YouTube video identifier | no |
78 | | params | YouTube parameters | yes |
79 | | img | Background image from static/images | yes |
80 |
81 | ##### With no Parameters
82 |
83 | This example shows only supplying the required `videoid` (without a named parameter). You can also add the `img` and `params` parameters (in that order) without using named parameters.
84 |
85 | ```markdown
86 | {{* liteyoutube "MmG2ah5Df4g" */>}}
87 | ```
88 |
89 | {{< liteyoutube "MmG2ah5Df4g" >}}
90 |
91 | ##### With `videoid` and `params`
92 |
93 | The params string instructs YouTube to play only 20 seconds of the video starting at ten seconds and ending at 30 seconds. It also disables the player controls and enables the YouTube `JSAPI`.
94 |
95 | ```markdown
96 | {{* liteyoutube videoid="MmG2ah5Df4g" params="controls=0&start=10&end=30&modestbranding=2&rel=0&enablejsapi=1" */>}}
97 | ```
98 |
99 | {{< liteyoutube videoid="MmG2ah5Df4g" params="controls=0&start=10&end=30&modestbranding=2&rel=0&enablejsapi=1" >}}
100 |
101 | ##### With All Three Positional Parameters
102 |
103 | ```markdown
104 | {{* liteyoutube "MmG2ah5Df4g" "painting.jpg" "controls=0&start=10&end=30&modestbranding=2&rel=0&enablejsapi=1" */>}}
105 | ```
106 |
107 | {{< liteyoutube "MmG2ah5Df4g" "painting.jpg" "controls=0&start=10&end=30&modestbranding=2&rel=0&enablejsapi=1" >}}
108 |
109 | {{< tip >}}
110 | You can browse the full list of YouTube parameters [here](https://developers.google.com/youtube/player_parameters#Parameters)
111 | {{< /tip >}}
112 |
113 | ### Button
114 |
115 | This adds a styled link (styled like a button). It takes two no-optional parameters:
116 |
117 | | PARAMETER | PURPOSE | OPTIONAL |
118 | | :--- | :--- | :--- |
119 | | label | button text | no |
120 | | url | button link | no |
121 | | modifier | styling classes | yes |
122 |
123 | **Example**
124 |
125 | ```markdown
126 | {{* button "/" "doe nu mee" */>}}
127 | ```
128 |
129 | ### Picture
130 |
131 | You want to use darkmode images when darkmode is enabled on a device and a regular image on lightmode? It takes 3 positional parameter
132 |
133 | Store these images in the `static/images` directory.
134 |
135 | **Syntax**
136 |
137 | ```markdown
138 | ...
139 | {{* picture "lightModeImage.png" "darkModeImage.png" "Image alt text" */>}}
140 | ...
141 | ```
142 |
143 | **Result**
144 |
145 | {{< picture "compose.svg" "compose-light.svg" "Compose Logo" >}}
146 |
147 | ### Gallery
148 |
149 | Include inline galleries within your articles. These galleries can contain `N` number of images. It takes 2 positional parameters.
150 |
151 | The 1st parameter is required. It's a _comma-separated list_ (`,`) of your images' paths.
152 |
153 | The 2nd parameter is optional. It's a _double-collon-separated list_ (`::`) of your images' alt/description/captions text. It's always a good SEO practice to include alt text for your images.
154 |
155 | **Syntax**
156 |
157 | ```markdown
158 | ...
159 | {{* gallery "images/painting.jpg,images/scribble.jpg,images/painting.jpg" "Gallery Image 1::gallery image 2::gallery image 1 copy" */>}}
160 | ...
161 | ```
162 |
163 | {{< tip >}}
164 |
165 | > For legibility, you may include a space after the delimiters `,` & `::`
166 | > {{< /tip >}}
167 |
168 | **Result**
169 |
170 | {{< gallery "images/painting.jpg,images/scribble.jpg,images/painting.jpg" "Gallery Image 1::gallery image 2::gallery image 1 copy" >}}
171 |
172 | ### Tab(s)
173 |
174 | Use this short if you want to publish a multiple tabs component.
175 |
176 | **Syntax**
177 |
178 | ```markdown
179 | {{* tabs "tabsId" */>}}
180 | {{* tab "First" */>}}
181 | What could such a tab include?
182 | {{* /tab >}}
183 | {{* tab "Second" */>}}
184 | - Some *bulletpoints*
185 | - and more…
186 | - …
187 | {{* /tab >}}
188 | {{* tab "Third" */>}}
189 | > great wise words?
190 | {{* /tab */>}}
191 | {{* /tabs */>}}
192 | ```
193 |
194 | **Result**
195 |
196 | {{< tabs "tabsId" >}}
197 | {{< tab "First" >}}
198 | What could such a tab include?
199 | {{< /tab >}}
200 | {{< tab "Second" >}}
201 | - Some *bulletpoints*
202 | - and more…
203 | - …
204 | {{< /tab >}}
205 | {{< tab "Third" >}}
206 | > great wise words?
207 | {{< /tab >}}
208 | {{< /tabs >}}
209 |
210 | ### Tip
211 |
212 | Use this short if you want to publish informational tooltips that look like:
213 |
214 | This tooltips may take either of the following forms:
215 |
216 | **Syntax**
217 |
218 | ```markdown
219 | {{* tip */>}}
220 | Something of __interest__ you want to highlight
221 | {{* /tip */>}}
222 | ```
223 |
224 | **Result**
225 |
226 | {{< tip >}}
227 | Something of **interest** you want to highlight
228 | {{< /tip >}}
229 |
230 | **OR**
231 |
232 | **Syntax**
233 |
234 | ```markdown
235 | {{* tip "warning" */>}}
236 | Something of __interest__ the user should be careful about
237 | {{* /tip */>}}
238 | ```
239 |
240 | **Result**
241 |
242 | {{< tip "warning" >}}
243 | Something of **interest** the user should be careful about
244 | {{< /tip >}}
245 |
--------------------------------------------------------------------------------
/exampleSite/content/docs/compose/use-tina-cms.md:
--------------------------------------------------------------------------------
1 | +++
2 | title = "Use Tina.io CMS"
3 | description = ""
4 | weight = 3
5 | +++
6 |
7 | Do you prefer managing your site using a CMS? Or would you like to make it easier for someone (a non-techie, perhaps) in your team to make edits easily? If interested, follow along. Else, skip to the [next section](../organize-content/)
8 |
9 | Let's sync your site with Tina CMS.
10 |
11 | ## Prerequisites !!
12 |
13 | Obviously you ought to have __a github account__. This is where your website source will live. Basically, Tina will read from github and write (commit) to your github repo.
14 |
15 | {{< tip "warning" >}}
16 | Gitlab or bitbucket will work too. Just check their [implementation here](https://Tina.io/docs/git-sync/gitlab/). Happy fishing.
17 | {{< /tip >}}
18 |
19 | ### Requirement 1 : A Tina.io account
20 |
21 | Jump over to [Tina.io](https://tina.io/) and sign up for an account. Consider signing up using your github account. That way, you don't have to deal with passwords.
22 |
23 | ### Requirement 2: A Netlify account _(optional)_
24 |
25 | If you intend to host with something other than Netlify _e.g github pages_, please scroll on. Hosting with Netlify is a lot of fun though; I highly recommend it.
26 |
27 | ### Step 1 : Fork or Clone Compose theme
28 |
29 | First we will fork [this theme's](https://github.com/onweru/compose) template.
30 |
31 | ### Step 2 : Add your repository in Tina CMS
32 |
33 | {{< tip >}}
34 | The exampleSite already comes with prefilled placeholder Tina settings. If you set up your site using [option 2](../install-theme/#option-2-recommended)
35 |
36 | {{< /tip >}}
37 |
38 | Edit `./static/tina/config.js` and replace tina CMS tokens with values from your own Tina account
39 |
40 | ```json
41 | ...
42 | clientId: "6ff9830b-b18a-4d21-b38c-cae1679e335f", // replace
43 | token: "2954980a0db18868974dc57a66be9ecdfe6f336b", // replace
44 | ...
45 | search: {
46 | ...
47 | tina: {
48 | indexerToken: "977c145439dda036080dd7a33478d2ba385ab5af", // replace
49 | stopwordLanguages: ["deu", "eng", "fra", "ita", "spa", "nld"] // consider adding or removing languages https://github.com/fergiemcdowall/stopword#language-code
50 | },
51 | ...
52 | }
53 | ...
54 | ```
55 |
56 | Go to your [Tina](https://tina.io/) account
57 |
--------------------------------------------------------------------------------
/exampleSite/content/projects.csv:
--------------------------------------------------------------------------------
1 | project 6,alpha,weru
2 | project 4,beta,dan
3 | project 4,candidate,dahl
4 | project y,abandoned,weru
5 | project 1,alpha,weru
6 | project 4,beta,ryan
7 | project 4,candidate,dan
8 | project y,abandoned,weru
9 | project 11,alpha,dahl
10 | project 4,beta,dan
11 | project 4,candidate,dan
12 | project A,abandoned,weru
13 |
--------------------------------------------------------------------------------
/exampleSite/content/search.md:
--------------------------------------------------------------------------------
1 | +++
2 | title = "Search"
3 | searchPage = true
4 | type = "search"
5 | +++
--------------------------------------------------------------------------------
/exampleSite/content/themes.csv:
--------------------------------------------------------------------------------
1 | clarity,V.1,chipzoller
2 | compose,V.1,weru
3 | swift,V.2,weru
4 | newsroom,V.1,weru
5 |
--------------------------------------------------------------------------------
/exampleSite/content/tutorials/_index.md:
--------------------------------------------------------------------------------
1 | +++
2 | title = "Tutorials' Docs"
3 | weight = 1
4 | +++
5 |
6 | Just an example of an additional docs folder.
7 |
8 | Surprised that it doesn't have a left sidebar menu? Worry not; just [follow this instructions to enable it](../docs/compose/organize-content/#documentation).
9 |
10 |
11 |
12 | {{< button "./example" "Tutorials" "mb-1" >}}
13 |
14 | {{< button "../docs/" "Back to docs" >}}
15 |
16 |
--------------------------------------------------------------------------------
/exampleSite/content/tutorials/example/_index.md:
--------------------------------------------------------------------------------
1 | +++
2 | title = "Compose Docs"
3 | weight = 1
4 | +++
5 |
6 | Welcome to the Compose theme user guide! This guide shows you how to get started creating technical documentation sites using Compose, including site customization and how to use Compose's blocks and templates.
7 |
8 | {{< button "../../docs/compose/install-theme/" "Get started now" >}}
9 |
--------------------------------------------------------------------------------
/exampleSite/dist/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/onweru/compose/053f7d2f6f523fc804d159fd8cebe737a4c90759/exampleSite/dist/.gitkeep
--------------------------------------------------------------------------------
/exampleSite/go.mod:
--------------------------------------------------------------------------------
1 | module compose-exampleSite
2 |
3 | go 1.19
4 |
5 | require github.com/onweru/compose v0.0.0-20250603154739-3e6a31685aae // indirect
6 |
--------------------------------------------------------------------------------
/exampleSite/go.sum:
--------------------------------------------------------------------------------
1 | github.com/onweru/compose v0.0.0-20230709163331-af3e133abf10 h1:6+OU3YpznL1bAy1s4B9KhEteRN+qo5T9vgYTWuGHpLw=
2 | github.com/onweru/compose v0.0.0-20230709163331-af3e133abf10/go.mod h1:tf1kQIBUcwJ/3mRFU5eiMrMvsDScVTK2IEFsZE3hZOc=
3 | github.com/onweru/compose v0.0.0-20230709170553-cdf6b3d268e3 h1:LQ9aw508QrowSWfr8m7Q43AelhGTaNhX+obnkCWefKg=
4 | github.com/onweru/compose v0.0.0-20230709170553-cdf6b3d268e3/go.mod h1:tf1kQIBUcwJ/3mRFU5eiMrMvsDScVTK2IEFsZE3hZOc=
5 | github.com/onweru/compose v0.0.0-20230717085020-14357bb3e167 h1:btK2EwB8mRaebaNkvzsEjnxQt6dI9corw9n5kyPQoMk=
6 | github.com/onweru/compose v0.0.0-20230717085020-14357bb3e167/go.mod h1:tf1kQIBUcwJ/3mRFU5eiMrMvsDScVTK2IEFsZE3hZOc=
7 | github.com/onweru/compose v0.0.0-20230729163245-27b84dc22eb8 h1:aVItqjRfGwyOZHloHxVY6kEjjR+e8AQVXlpWiQtO0dw=
8 | github.com/onweru/compose v0.0.0-20230729163245-27b84dc22eb8/go.mod h1:tf1kQIBUcwJ/3mRFU5eiMrMvsDScVTK2IEFsZE3hZOc=
9 | github.com/onweru/compose v0.0.0-20230730204557-43a58bce3d5a h1:o/x7EfZKZquisgw30cKagraXVccTNydxPGQYV9LadZY=
10 | github.com/onweru/compose v0.0.0-20230730204557-43a58bce3d5a/go.mod h1:tf1kQIBUcwJ/3mRFU5eiMrMvsDScVTK2IEFsZE3hZOc=
11 | github.com/onweru/compose v0.0.0-20230730204838-eb9964865cd0 h1:xIK8kxui2ulVqJRO9tjbGuhNPxr1QlmmnswX8Tcs+Js=
12 | github.com/onweru/compose v0.0.0-20230730204838-eb9964865cd0/go.mod h1:tf1kQIBUcwJ/3mRFU5eiMrMvsDScVTK2IEFsZE3hZOc=
13 | github.com/onweru/compose v0.0.0-20230817095514-20a7d0ddbfcb h1:azper7pbfQ92zfd8rV7HBjhF8AsZbZmGqxFqqTYEef8=
14 | github.com/onweru/compose v0.0.0-20230817095514-20a7d0ddbfcb/go.mod h1:tf1kQIBUcwJ/3mRFU5eiMrMvsDScVTK2IEFsZE3hZOc=
15 | github.com/onweru/compose v0.0.0-20230823103345-61fa78130dec h1:8iFU5Cf76/ww5+gLyyRrI7dpJpcKmnpBXtraIIq4AT0=
16 | github.com/onweru/compose v0.0.0-20230823103345-61fa78130dec/go.mod h1:2eSBLsKzvKf3r4/vHiKdakIBqDtWACDAqAD7tRdt00o=
17 | github.com/onweru/compose v0.0.0-20240111174942-cdf2ef5f4da1 h1:evqwOllx6XwfmYG2NKGFmfloNQXazxOCPir914Myjpk=
18 | github.com/onweru/compose v0.0.0-20240111174942-cdf2ef5f4da1/go.mod h1:2eSBLsKzvKf3r4/vHiKdakIBqDtWACDAqAD7tRdt00o=
19 | github.com/onweru/compose v0.0.0-20240111175353-5392252575a2 h1:jqoBc1FPDJNxRrrieLlRvyKCumTLa5XkehgXz3yBdvE=
20 | github.com/onweru/compose v0.0.0-20240111175353-5392252575a2/go.mod h1:2eSBLsKzvKf3r4/vHiKdakIBqDtWACDAqAD7tRdt00o=
21 | github.com/onweru/compose v0.0.0-20240111181611-61cf3194699c h1:4SSQgoXXBQS9iZ5IQIGLxXOExaeODx5Hg0+fDzcsLB0=
22 | github.com/onweru/compose v0.0.0-20240111181611-61cf3194699c/go.mod h1:2eSBLsKzvKf3r4/vHiKdakIBqDtWACDAqAD7tRdt00o=
23 | github.com/onweru/compose v0.0.0-20240113175534-20909d29d9a8 h1:g9eo2danSDAQ8wD/HDLWqFt7s01YaAGAVJZhN4ODBs8=
24 | github.com/onweru/compose v0.0.0-20240113175534-20909d29d9a8/go.mod h1:2eSBLsKzvKf3r4/vHiKdakIBqDtWACDAqAD7tRdt00o=
25 | github.com/onweru/compose v0.0.0-20240114134437-91252edd0478 h1:n5wqTvZ1RLOHHwJoHal5WmhSF/gqhxaDr/w1+wW9Dsw=
26 | github.com/onweru/compose v0.0.0-20240114134437-91252edd0478/go.mod h1:2eSBLsKzvKf3r4/vHiKdakIBqDtWACDAqAD7tRdt00o=
27 | github.com/onweru/compose v0.0.0-20240114135539-a7a9df6d34b9 h1:pRRosz/W2ZKxruZ5fTYxN+BAFIybNg+V8IhGMVdZfbE=
28 | github.com/onweru/compose v0.0.0-20240114135539-a7a9df6d34b9/go.mod h1:2eSBLsKzvKf3r4/vHiKdakIBqDtWACDAqAD7tRdt00o=
29 | github.com/onweru/compose v0.0.0-20240711165024-0ea6ac76134e h1:ljas9s4I9bPPkSEkk7CXkDitWxrHUmIlrfLmojpHCcI=
30 | github.com/onweru/compose v0.0.0-20240711165024-0ea6ac76134e/go.mod h1:2eSBLsKzvKf3r4/vHiKdakIBqDtWACDAqAD7tRdt00o=
31 | github.com/onweru/compose v0.0.0-20250123191723-478f5b77f140 h1:/TtnPfRGcs/vxLf1nCrkQ1XE8qqKh4DTdE2kBxDx83U=
32 | github.com/onweru/compose v0.0.0-20250123191723-478f5b77f140/go.mod h1:2eSBLsKzvKf3r4/vHiKdakIBqDtWACDAqAD7tRdt00o=
33 | github.com/onweru/compose v0.0.0-20250123191918-095317e5c72c h1:7yWUB0saRkxfw5sSaQF9/sRegrcCZnwV3pFi2YI3RxU=
34 | github.com/onweru/compose v0.0.0-20250123191918-095317e5c72c/go.mod h1:2eSBLsKzvKf3r4/vHiKdakIBqDtWACDAqAD7tRdt00o=
35 | github.com/onweru/compose v0.0.0-20250603154739-3e6a31685aae h1:YVEMXrH3wp2DvYgHLyJ7CvoZbToIEkEin/5mp4cWl7M=
36 | github.com/onweru/compose v0.0.0-20250603154739-3e6a31685aae/go.mod h1:2eSBLsKzvKf3r4/vHiKdakIBqDtWACDAqAD7tRdt00o=
37 |
--------------------------------------------------------------------------------
/exampleSite/hugo.toml:
--------------------------------------------------------------------------------
1 | baseURL = "https://example.com/"
2 | title = "Compose Docs"
3 | enableRobotsTXT = true
4 | # this example loads the theme as hugo module
5 | # comment out line below, and uncomment the line after it if you prefer to load the theme normally
6 | theme = [
7 | "github.com/onweru/compose",
8 | ] # edit this if you'ld rather use a fork of this repo
9 | # theme = "compose"
10 | enableGitInfo = true
11 |
12 | [pagination]
13 | disableAliases = false
14 | pagerSize = 10
15 | path = 'page'
16 |
17 | # disableKinds = ["taxonomy"]
18 |
19 | [outputs]
20 | home = ["HTML", "RSS", "JSON"]
21 |
--------------------------------------------------------------------------------
/exampleSite/netlify.toml:
--------------------------------------------------------------------------------
1 | [build]
2 | publish = "public"
3 | #command = "hugo --gc --minify"
4 | command = "hugo --gc --minify --baseURL https://composedocs.netlify.app/"
5 |
6 | [context.production.environment]
7 | HUGO_VERSION = "0.147.2"
8 | GO_VERSION = "1.21.0"
9 | NODE_VERSION = "20.5.1"
10 | HUGO_ENV = "production"
11 | HUGO_ENABLEGITINFO = "true"
12 |
13 | [context.split1]
14 | command = "hugo --gc --minify --enableGitInfo"
15 |
16 | [context.split1.environment]
17 | HUGO_VERSION = "0.147.2"
18 | GO_VERSION = "1.21.0"
19 | NODE_VERSION = "20.5.1"
20 | HUGO_ENV = "production"
21 |
22 | [context.deploy-preview]
23 | command = "hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL"
24 |
25 | [context.deploy-preview.environment]
26 | HUGO_VERSION = "0.147.2"
27 | GO_VERSION = "1.21.0"
28 | NODE_VERSION = "20.5.1"
29 |
30 | [context.branch-deploy]
31 | command = "hugo --gc --minify -b $DEPLOY_PRIME_URL"
32 |
33 | [context.branch-deploy.environment]
34 | HUGO_VERSION = "0.147.2"
35 | GO_VERSION = "1.21.0"
36 | NODE_VERSION = "20.5.1"
37 |
38 | [context.next.environment]
39 | HUGO_ENABLEGITINFO = "true"
40 |
--------------------------------------------------------------------------------
/exampleSite/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "examplesite",
3 | "version": "1.0.0",
4 | "description": "This guide covers the necessary bits. As the project evolves, it will only become more comprehensive",
5 | "main": "index.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1"
8 | },
9 | "keywords": [],
10 | "author": "",
11 | "license": "ISC",
12 | "dependencies": {
13 | "@tinacms/cli": "^1.5.31",
14 | "tinacms": "^1.5.22",
15 | "@tinacms/auth": "^1.0.3",
16 | "next-tinacms-cloudinary": "^4.3.0"
17 | }
18 | }
--------------------------------------------------------------------------------
/exampleSite/resources/_gen/assets/sass/main.sass_ad0d8311f7d21d831066e97916b5dca2.json:
--------------------------------------------------------------------------------
1 | {"Target":"css/styles.8d8085f7db497b3f3b3071490f89d4ce22990b40da7e429db3a4bfbf559eb93c93a40c627e51f10b618139145d468ecfdccb9425643cc38726adff2ceaf5ad10.css","MediaType":"text/css","Data":{"Integrity":"sha512-jYCF99tJez87MHFJD4nUziKZC0DafkKds6S/v1WeuTyTpAxiflHxC2GBORRdRo7P3MuUJWQ8w4cmrf8s6vWtEA=="}}
--------------------------------------------------------------------------------
/exampleSite/resources/_gen/assets/sass/main.sass_ae9eb86df8175869edaecf50caadd93b.json:
--------------------------------------------------------------------------------
1 | {"Target":"css/styles.8d8085f7db497b3f3b3071490f89d4ce22990b40da7e429db3a4bfbf559eb93c93a40c627e51f10b618139145d468ecfdccb9425643cc38726adff2ceaf5ad10.css","MediaType":"text/css","Data":{"Integrity":"sha512-jYCF99tJez87MHFJD4nUziKZC0DafkKds6S/v1WeuTyTpAxiflHxC2GBORRdRo7P3MuUJWQ8w4cmrf8s6vWtEA=="}}
--------------------------------------------------------------------------------
/exampleSite/resources/_gen/assets/sass/sass/main.sass_ae9eb86df8175869edaecf50caadd93b.json:
--------------------------------------------------------------------------------
1 | {"Target":"css/styles.5403a82853549c7143980076de5a74b1acfa655a8f3f490771cdeb6b1bb85c19fc018d76c22b67654b39bb14a35e359f243b77c63d68aa963df466a37735b351.css","MediaType":"text/css","Data":{"Integrity":"sha512-VAOoKFNUnHFDmAB23lp0saz6ZVqPP0kHcc3raxu4XBn8AY12witnZUs5uxSjXjWfJDt3xj1oqpY99GajdzWzUQ=="}}
--------------------------------------------------------------------------------
/exampleSite/resources/_gen/assets/sass/sass/main.sass_ca26857cefa9076967ab300682271513.json:
--------------------------------------------------------------------------------
1 | {"Target":"css/styles.cd62b2f2422cc4a7954bb12c250bb5a506c534f9f0e02d12144999181257b8046df4a087b684fbe4fa2e60fc50b054922f83d5cb594351423c6425a8cb80434c.css","MediaType":"text/css","Data":{"Integrity":"sha512-zWKy8kIsxKeVS7EsJQu1pQbFNPnw4C0SFEmZGBJXuARt9KCHtoT75PouYPxQsFSSL4PVy1lDUUI8ZCWoy4BDTA=="}}
--------------------------------------------------------------------------------
/exampleSite/static/admin/.gitignore:
--------------------------------------------------------------------------------
1 | index.html
2 | assets/
--------------------------------------------------------------------------------
/exampleSite/static/images/GitHubMarkDark.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/exampleSite/static/images/GitHubMarkLight.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/exampleSite/static/images/artist.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/onweru/compose/053f7d2f6f523fc804d159fd8cebe737a4c90759/exampleSite/static/images/artist.jpg
--------------------------------------------------------------------------------
/exampleSite/static/images/boy.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/onweru/compose/053f7d2f6f523fc804d159fd8cebe737a4c90759/exampleSite/static/images/boy.jpg
--------------------------------------------------------------------------------
/exampleSite/static/images/clarity/article-toc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/onweru/compose/053f7d2f6f523fc804d159fd8cebe737a4c90759/exampleSite/static/images/clarity/article-toc.png
--------------------------------------------------------------------------------
/exampleSite/static/images/clarity/image-figure.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/onweru/compose/053f7d2f6f523fc804d159fd8cebe737a4c90759/exampleSite/static/images/clarity/image-figure.png
--------------------------------------------------------------------------------
/exampleSite/static/images/clarity/image-inline.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/onweru/compose/053f7d2f6f523fc804d159fd8cebe737a4c90759/exampleSite/static/images/clarity/image-inline.png
--------------------------------------------------------------------------------
/exampleSite/static/images/clarity/screenshot-darkmode.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/onweru/compose/053f7d2f6f523fc804d159fd8cebe737a4c90759/exampleSite/static/images/clarity/screenshot-darkmode.png
--------------------------------------------------------------------------------
/exampleSite/static/images/clarity/screenshot-mobile-darkmode.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/onweru/compose/053f7d2f6f523fc804d159fd8cebe737a4c90759/exampleSite/static/images/clarity/screenshot-mobile-darkmode.png
--------------------------------------------------------------------------------
/exampleSite/static/images/clarity/screenshot-mobile.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/onweru/compose/053f7d2f6f523fc804d159fd8cebe737a4c90759/exampleSite/static/images/clarity/screenshot-mobile.png
--------------------------------------------------------------------------------
/exampleSite/static/images/clarity/screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/onweru/compose/053f7d2f6f523fc804d159fd8cebe737a4c90759/exampleSite/static/images/clarity/screenshot.png
--------------------------------------------------------------------------------
/exampleSite/static/images/clarity/syntax-block.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/onweru/compose/053f7d2f6f523fc804d159fd8cebe737a4c90759/exampleSite/static/images/clarity/syntax-block.gif
--------------------------------------------------------------------------------
/exampleSite/static/images/clarity/tags.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/onweru/compose/053f7d2f6f523fc804d159fd8cebe737a4c90759/exampleSite/static/images/clarity/tags.png
--------------------------------------------------------------------------------
/exampleSite/static/images/clarity/tn-darkmode.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/onweru/compose/053f7d2f6f523fc804d159fd8cebe737a4c90759/exampleSite/static/images/clarity/tn-darkmode.png
--------------------------------------------------------------------------------
/exampleSite/static/images/clarity/tn.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/onweru/compose/053f7d2f6f523fc804d159fd8cebe737a4c90759/exampleSite/static/images/clarity/tn.png
--------------------------------------------------------------------------------
/exampleSite/static/images/frustrated.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/onweru/compose/053f7d2f6f523fc804d159fd8cebe737a4c90759/exampleSite/static/images/frustrated.jpg
--------------------------------------------------------------------------------
/exampleSite/static/images/painting.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/onweru/compose/053f7d2f6f523fc804d159fd8cebe737a4c90759/exampleSite/static/images/painting.jpg
--------------------------------------------------------------------------------
/exampleSite/static/images/scribble.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/onweru/compose/053f7d2f6f523fc804d159fd8cebe737a4c90759/exampleSite/static/images/scribble.jpg
--------------------------------------------------------------------------------
/exampleSite/static/images/speakers.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/onweru/compose/053f7d2f6f523fc804d159fd8cebe737a4c90759/exampleSite/static/images/speakers.jpg
--------------------------------------------------------------------------------
/exampleSite/static/images/street.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/onweru/compose/053f7d2f6f523fc804d159fd8cebe737a4c90759/exampleSite/static/images/street.jpg
--------------------------------------------------------------------------------
/exampleSite/static/images/stuck.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/onweru/compose/053f7d2f6f523fc804d159fd8cebe737a4c90759/exampleSite/static/images/stuck.jpg
--------------------------------------------------------------------------------
/exampleSite/tina/config.js:
--------------------------------------------------------------------------------
1 | import { defineConfig } from "tinacms";
2 |
3 | // Your hosting provider likely exposes this as an environment variable
4 | const branch = process.env.HEAD || process.env.VERCEL_GIT_COMMIT_REF || "master";
5 |
6 | export default defineConfig({
7 | branch,
8 | clientId: "cf05fea4-4f23-47cf-be81-bf18b623b233", // Get this from tina.io
9 | token: "bdce3e17adfa4a16da812d6c538a22cd61dd057b", // Get this from tina.io
10 |
11 | build: {
12 | outputFolder: "admin",
13 | publicFolder: "static",
14 | },
15 | media: {
16 | tina: {
17 | mediaRoot: "images",
18 | publicFolder: "static",
19 | },
20 | },
21 | schema: {
22 | collections: [
23 | {
24 | name: "docs",
25 | label: "Docs",
26 | path: "content/docs",
27 | frontmatterFormat: "toml",
28 | frontmatterDelimiters: "+++",
29 | format: "md",
30 | fields: [
31 | {
32 | type: "string",
33 | name: "title",
34 | label: "Title",
35 | isTitle: true,
36 | required: true,
37 | },
38 | {
39 | type: "number",
40 | name: "weight",
41 | label: "Weight"
42 | },
43 | {
44 | type: "string",
45 | name: "description",
46 | label: "Description"
47 | },
48 | {
49 | type: "rich-text",
50 | name: "body",
51 | label: "Body",
52 | isBody: true,
53 | },
54 | ],
55 | },
56 | {
57 | name: "post",
58 | label: "Posts",
59 | path: "content/blog",
60 | frontmatterFormat: "toml",
61 | frontmatterDelimiters: "+++",
62 | format: "md",
63 | fields: [
64 | {
65 | type: "string",
66 | name: "title",
67 | label: "Title",
68 | isTitle: true,
69 | required: true,
70 | },
71 | {
72 | type: "string",
73 | name: "author",
74 | label: "Author",
75 | },
76 | {
77 | type: "string",
78 | name: "categories",
79 | label: "Categories",
80 | list: true
81 | },
82 | {
83 | type: "string",
84 | name: "tags",
85 | label: "Tags",
86 | list: true
87 | },
88 | {
89 | type: "datetime",
90 | name: "date",
91 | label: "Date",
92 | },
93 | {
94 | type: "image",
95 | name: "image",
96 | label: "Image",
97 | },
98 | {
99 | type: "rich-text",
100 | name: "body",
101 | label: "Body",
102 | isBody: true,
103 | },
104 | ],
105 | },
106 | {
107 | name: "tutorials",
108 | label: "Tutorials",
109 | path: "content/tutorials",
110 | frontmatterFormat: "toml",
111 | frontmatterDelimiters: "+++",
112 | format: "md",
113 | fields: [
114 | {
115 | type: "string",
116 | name: "title",
117 | label: "Title",
118 | isTitle: true,
119 | required: true,
120 | },
121 | {
122 | type: "number",
123 | name: "weight",
124 | label: "Weight",
125 | },
126 | {
127 | type: "rich-text",
128 | name: "body",
129 | label: "Body",
130 | isBody: true,
131 | },
132 | ],
133 | },
134 | ],
135 | },
136 | search: {
137 | tina: {
138 | indexerToken: "876018600e28b19feaf033cc3364f588fe8a6248",
139 | stopwordLanguages: ["deu", "eng", "fra", "ita", "spa", "nld"]
140 | },
141 | indexBatchSize: 100,
142 | maxSearchIndexFieldLength: 100
143 | }
144 | });
145 |
--------------------------------------------------------------------------------
/go.mod:
--------------------------------------------------------------------------------
1 | module github.com/onweru/compose
2 |
3 | go 1.20
4 |
--------------------------------------------------------------------------------
/i18n/de.toml:
--------------------------------------------------------------------------------
1 | [copy]
2 | other = "Kopieren"
3 | [copied]
4 | other = "Kopiert"
5 | [docs_menu]
6 | other = "Dokumentationsmenü"
7 | [no_matches]
8 | other = "Keine Übereinstimmung gefunden"
9 | [not_set]
10 | other = "undefiniert"
11 | [resize_snippet]
12 | other = "Höhe des Snippets ändern"
13 | [quick_links]
14 | other = "Schnellzugriff"
15 | [search_field_placeholder]
16 | other = "Suche"
17 | [search_results_label]
18 | other = "Suchergebnisse"
19 | [short_search_query]
20 | other = "Anfrage ist zu kurz"
21 | [site]
22 | other = "Webseite"
23 | [site_menu]
24 | other = "Menü der Webseite"
25 | [toggle_line_numbers]
26 | other = "Zeilennummern ein- oder ausblenden"
27 | [toggle_line_wrap]
28 | other = "Zeilenumbruch aktivieren oder deaktivieren"
29 | [to_top]
30 | other = "Zurück zum Anfang"
31 | [type_to_search]
32 | other = "Suchbegriff eingeben"
33 |
--------------------------------------------------------------------------------
/i18n/en.toml:
--------------------------------------------------------------------------------
1 | [copy]
2 | other = "Copy"
3 | [copied]
4 | other = "Copied"
5 | [docs_menu]
6 | other = "Docs Menu"
7 | [no_matches]
8 | other = "No matches found"
9 | [not_set]
10 | other = "not set"
11 | [resize_snippet]
12 | other = "Resize snippet height"
13 | [quick_links]
14 | other = "Quick links"
15 | [search_field_placeholder]
16 | other = "Search"
17 | [search_results_label]
18 | other = "Search Results"
19 | [short_search_query]
20 | other = "Query is too short"
21 | [site]
22 | other = "site"
23 | [site_menu]
24 | other = "Site Menu"
25 | [toggle_line_numbers]
26 | other = "Toggle line numbers"
27 | [toggle_line_wrap]
28 | other = "Toggle line wrap"
29 | [to_top]
30 | other = "Back to top"
31 | [type_to_search]
32 | other = "Type to search"
--------------------------------------------------------------------------------
/i18n/eo.toml:
--------------------------------------------------------------------------------
1 | [copy]
2 | other = "Kopii"
3 | [copied]
4 | other = "Kopiita"
5 | [docs_menu]
6 | other = "Dokumentara menuo"
7 | [no_matches]
8 | other = "Ne trovis kongrŭojn"
9 | [not_set]
10 | other = "ne agordita"
11 | [resize_snippet]
12 | other = "Ĝustigi kodaĵan alton"
13 | [quick_links]
14 | other = "Rapidaj ligiloj"
15 | [search_field_placeholder]
16 | other = "Serĉi"
17 | [search_results_label]
18 | other = "Serĉi rezultojn"
19 | [short_search_query]
20 | other = "La serĉoteksto estas tro mallonga"
21 | [site]
22 | other = "retejon"
23 | [site_menu]
24 | other = "Reteja menuo"
25 | [toggle_line_numbers]
26 | other = "Baskuligi liniajn nombrojn"
27 | [toggle_line_wrap]
28 | other = "Baskuligi linifaldon"
29 | [to_top]
30 | other = "Reiri supren"
31 | [type_to_search]
32 | other = "Tajpu por serĉi"
33 |
--------------------------------------------------------------------------------
/i18n/es.toml:
--------------------------------------------------------------------------------
1 | [copy]
2 | other = "Copiar"
3 | [copied]
4 | other = "Copiado"
5 | [docs_menu]
6 | other = "Menú de documentos"
7 | [no_matches]
8 | other = "No se encontraron coincidencias"
9 | [not_set]
10 | other = "no asignado"
11 | [resize_snippet]
12 | other = "Ajustar la altura del fragmento"
13 | [quick_links]
14 | other = "Enlaces rápidos"
15 | [search_field_placeholder]
16 | other = "Buscar"
17 | [search_results_label]
18 | other = "Buscar resultados"
19 | [short_search_query]
20 | other = "La consulta es demasiado corta"
21 | [site]
22 | other = "sitio web"
23 | [site_menu]
24 | other = "Menú del sitio web"
25 | [toggle_line_numbers]
26 | other = "Alterna números de línea"
27 | [toggle_line_wrap]
28 | other = "Alterna ajuste de línea"
29 | [to_top]
30 | other = "Volver arriba"
31 | [type_to_search]
32 | other = "Escribe para buscar"
33 |
--------------------------------------------------------------------------------
/i18n/tr.toml:
--------------------------------------------------------------------------------
1 | [copy]
2 | other = "Kopyala"
3 | [copied]
4 | other = "kopyalandı"
5 | [docs_menu]
6 | other = "Belgeleme menüsü"
7 | [no_matches]
8 | other = "Eşleşme bulunamadı"
9 | [not_set]
10 | other = "ayarlanmadı"
11 | [resize_snippet]
12 | other = "Snippet yüksekliğini yeniden boyutlandır"
13 | [quick_links]
14 | other = "Hızlı bağlantılar"
15 | [search_field_placeholder]
16 | other = "Belgelerde arayın"
17 | [search_results_label]
18 | other = "Arama sonuçları"
19 | [short_search_query]
20 | other = "Sorgu çok kısa"
21 | [site]
22 | other = "site"
23 | [site_menu]
24 | other = "Site menüsü"
25 | [toggle_line_numbers]
26 | other = "Satır numaralarını değiştir"
27 | [toggle_line_wrap]
28 | other = "Satır kaydırmayı değiştir"
29 | [to_top]
30 | other = "Retour au sommet"
31 | [type_to_search]
32 | other = "Aramak için yazın"
33 |
--------------------------------------------------------------------------------
/images/screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/onweru/compose/053f7d2f6f523fc804d159fd8cebe737a4c90759/images/screenshot.png
--------------------------------------------------------------------------------
/images/tn.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/onweru/compose/053f7d2f6f523fc804d159fd8cebe737a4c90759/images/tn.png
--------------------------------------------------------------------------------
/layouts/404.html:
--------------------------------------------------------------------------------
1 | {{- define "main"}}
2 | Bummer! This page doesn't exist. back home.Not found
4 |
10 | {{- partial "head/index" . }} 11 | 12 |
47 |