Browse Source

initial commit

master
max.mehl 2 years ago
commit
b515fd3856
Signed by: mxmehl GPG Key ID: 2704E4AB371E2E92
  1. 6
      archetypes/default.md
  2. 40
      config.toml
  3. 14
      content/blog/willkommen.md
  4. 4
      themes/hugo-dpsg/.browserslistrc
  5. 19
      themes/hugo-dpsg/.editorconfig
  6. 9
      themes/hugo-dpsg/.eslintrc
  7. 19
      themes/hugo-dpsg/.gitignore
  8. 7
      themes/hugo-dpsg/.postcssrc
  9. 319
      themes/hugo-dpsg/.stylelintrc
  10. 12
      themes/hugo-dpsg/.travis.yml
  11. 105
      themes/hugo-dpsg/CONTRIBUTING.md
  12. 361
      themes/hugo-dpsg/LICENSE.md
  13. 236
      themes/hugo-dpsg/README.md
  14. 10
      themes/hugo-dpsg/archetypes/default.md
  15. 1275
      themes/hugo-dpsg/assets/css/style.css
  16. 2
      themes/hugo-dpsg/exampleSite/.gitignore
  17. 33
      themes/hugo-dpsg/exampleSite/config.toml
  18. 32
      themes/hugo-dpsg/exampleSite/content/about.md
  19. 166
      themes/hugo-dpsg/exampleSite/content/post/basic-elements.md
  20. 1143
      themes/hugo-dpsg/exampleSite/content/post/creating-a-new-theme.md
  21. 344
      themes/hugo-dpsg/exampleSite/content/post/goisforlovers.md
  22. 86
      themes/hugo-dpsg/exampleSite/content/post/hugoisforlovers.md
  23. 155
      themes/hugo-dpsg/exampleSite/content/post/migrate-from-jekyll.md
  24. 0
      themes/hugo-dpsg/exampleSite/data/.gitkeep
  25. 0
      themes/hugo-dpsg/exampleSite/static/.gitkeep
  26. 94
      themes/hugo-dpsg/i18n/de.yaml
  27. 94
      themes/hugo-dpsg/i18n/en.yaml
  28. 92
      themes/hugo-dpsg/i18n/es.yaml
  29. 93
      themes/hugo-dpsg/i18n/fr.yaml
  30. 95
      themes/hugo-dpsg/i18n/hu.yaml
  31. 94
      themes/hugo-dpsg/i18n/it.yaml
  32. 95
      themes/hugo-dpsg/i18n/ja.yaml
  33. 93
      themes/hugo-dpsg/i18n/nl.yaml
  34. 93
      themes/hugo-dpsg/i18n/pt-br.yaml
  35. 93
      themes/hugo-dpsg/i18n/pt.yaml
  36. 95
      themes/hugo-dpsg/i18n/ru.yaml
  37. 92
      themes/hugo-dpsg/i18n/zh-cn.yaml
  38. 93
      themes/hugo-dpsg/i18n/zh-tw.yaml
  39. BIN
      themes/hugo-dpsg/images/screenshot.png
  40. BIN
      themes/hugo-dpsg/images/tn.png
  41. 8
      themes/hugo-dpsg/layouts/404.html
  42. 51
      themes/hugo-dpsg/layouts/_default/baseof.html
  43. 18
      themes/hugo-dpsg/layouts/_default/list.html
  44. 32
      themes/hugo-dpsg/layouts/_default/single.html
  45. 32
      themes/hugo-dpsg/layouts/_default/summary.html
  46. 24
      themes/hugo-dpsg/layouts/index.html
  47. 22
      themes/hugo-dpsg/layouts/partials/authorbox.html
  48. 5
      themes/hugo-dpsg/layouts/partials/comments.html
  49. 9
      themes/hugo-dpsg/layouts/partials/footer.html
  50. 7
      themes/hugo-dpsg/layouts/partials/footer_links.html
  51. 11
      themes/hugo-dpsg/layouts/partials/header.html
  52. 3
      themes/hugo-dpsg/layouts/partials/mathjax.html
  53. 23
      themes/hugo-dpsg/layouts/partials/menu.html
  54. 11
      themes/hugo-dpsg/layouts/partials/pagination.html
  55. 7
      themes/hugo-dpsg/layouts/partials/post_meta.html
  56. 16
      themes/hugo-dpsg/layouts/partials/post_meta/categories.html
  57. 9
      themes/hugo-dpsg/layouts/partials/post_meta/date.html
  58. 5
      themes/hugo-dpsg/layouts/partials/post_meta/translations.html
  59. 16
      themes/hugo-dpsg/layouts/partials/post_nav.html
  60. 10
      themes/hugo-dpsg/layouts/partials/post_tags.html
  61. 8
      themes/hugo-dpsg/layouts/partials/post_toc.html
  62. 22
      themes/hugo-dpsg/layouts/partials/sidebar.html
  63. 1
      themes/hugo-dpsg/layouts/partials/svg/bitbucket.svg
  64. 1
      themes/hugo-dpsg/layouts/partials/svg/category.svg
  65. 1
      themes/hugo-dpsg/layouts/partials/svg/email.svg
  66. 1
      themes/hugo-dpsg/layouts/partials/svg/facebook.svg
  67. 1
      themes/hugo-dpsg/layouts/partials/svg/files.svg
  68. 1
      themes/hugo-dpsg/layouts/partials/svg/github.svg
  69. 1
      themes/hugo-dpsg/layouts/partials/svg/gitlab.svg
  70. 1
      themes/hugo-dpsg/layouts/partials/svg/instagram.svg
  71. 1
      themes/hugo-dpsg/layouts/partials/svg/linkedin.svg
  72. 1
      themes/hugo-dpsg/layouts/partials/svg/tag.svg
  73. 1
      themes/hugo-dpsg/layouts/partials/svg/telegram.svg
  74. 1
      themes/hugo-dpsg/layouts/partials/svg/time.svg
  75. 1
      themes/hugo-dpsg/layouts/partials/svg/twitter.svg
  76. 17
      themes/hugo-dpsg/layouts/partials/widgets/categories.html
  77. 20
      themes/hugo-dpsg/layouts/partials/widgets/languages.html
  78. 15
      themes/hugo-dpsg/layouts/partials/widgets/recent.html
  79. 9
      themes/hugo-dpsg/layouts/partials/widgets/search.html
  80. 14
      themes/hugo-dpsg/layouts/partials/widgets/sidemenu.html
  81. 90
      themes/hugo-dpsg/layouts/partials/widgets/social.html
  82. 15
      themes/hugo-dpsg/layouts/partials/widgets/taglist.html
  83. BIN
      themes/hugo-dpsg/static/apple-touch-icon.png
  84. BIN
      themes/hugo-dpsg/static/favicon.ico
  85. BIN
      themes/hugo-dpsg/static/img/avatar.png
  86. BIN
      themes/hugo-dpsg/static/img/placeholder.png
  87. 25
      themes/hugo-dpsg/static/js/menu.js
  88. 17
      themes/hugo-dpsg/theme.toml

6
archetypes/default.md

@ -0,0 +1,6 @@
---
title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }}
draft: true
---

40
config.toml

@ -0,0 +1,40 @@
baseURL = "https://pfadfinder-konstanz.de"
languageCode = "de-de"
title = "Pfadfinder DPSG Bruder Klaus Konstanz"
theme = ["hugo-dpsg"]
[Params]
subtitle = "Allzeit bereit in Konstanz"
copyright = "DPSG Stamm Bruder Klaus Konstanz"
opengraph = true # Enable OpenGraph if true
twitter_cards = true # Enable Twitter Cards if true
readmore = false # Show "Read more" button in list if true
authorbox = true # Show authorbox at bottom of pages if true
toc = true # Enable Table of Contents
post_navigation = true # Show post navigation at bottom of pages if true
post_meta = ["date", "categories", "translations"] # Order of post meta information
mainSections = ["post", "blog", "news"] # Specify section pages to show on home page and the "Recent articles" widget
dateformat = "2006-01-02" # Change the format of dates
mathjax = true # Enable MathJax
mathjaxPath = "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.6/MathJax.js" # Specify MathJax path
mathjaxConfig = "TeX-AMS-MML_HTMLorMML" # Specify MathJax config
highlightColor = "#e22d30" # Override highlight color
customCSS = ["css/custom.css"] # Include custom CSS files
customJS = ["js/custom.js"] # Include custom JS files
# Used in authorbox
[Author]
name = "John Doe"
bio = "John Doe's true identity is unknown. Maybe he is a successful blogger or writer. Nobody knows it."
avatar = "img/avatar.png"
[Params.sidebar]
home = "right" # Configure layout for home page
list = "right" # Configure layout for list pages
single = "right" # Configure layout for single pages
# Enable widgets in given order
widgets = ["search", "recent", "categories", "taglist", "social", "languages"]
[Params.widgets]
recent_num = 5 # Set the number of articles in the "Recent articles" widget
tags_counter = false # Enable counter for each tag in "Tags" widget

14
content/blog/willkommen.md

@ -0,0 +1,14 @@
---
title: "Willkommen"
date: 2020-03-16T11:49:04+01:00
menu: main
---
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem.
Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus.
Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. Nam quam nunc, blandit vel, luctus pulvinar, hendrerit id, lorem. Maecenas nec odio et ante tincidunt tempus. Donec vitae sapien ut libero venenatis faucibus.
Nullam quis ante. Etiam sit amet orci eget eros faucibus tincidunt. Duis leo. Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna. Sed consequat, leo eget bibendum sodales, augue velit cursus nunc,

4
themes/hugo-dpsg/.browserslistrc

@ -0,0 +1,4 @@
> 0.25%
not dead
IE >= 11
iOS >= 7

19
themes/hugo-dpsg/.editorconfig

@ -0,0 +1,19 @@
# editorconfig.org
root = true
[*]
charset = utf-8
indent_style = tab
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true
[*.html]
insert_final_newline = false
[*.md]
trim_trailing_whitespace = false
[*.{json,yaml,yml,toml,md,babelrc,eslintrc,stylelintrc}]
indent_style = space
indent_size = 2

9
themes/hugo-dpsg/.eslintrc

@ -0,0 +1,9 @@
{
"extends": "airbnb-base/legacy",
"rules": {
"indent": [2, "tab"],
"no-tabs": 0,
"no-unused-vars": 0,
"no-shadow-restricted-names": 0
}
}

19
themes/hugo-dpsg/.gitignore

@ -0,0 +1,19 @@
# NPM
node_modules/
npm-debug.log
# IDE
.idea
*.sublime-project
*.sublime-workspace
.vscode/*
# OS
._*
Thumbs.db
.DS_Store
.Trashes
.Spotlight-V100
.AppleDouble
.LSOverride
Desktop.ini

7
themes/hugo-dpsg/.postcssrc

@ -0,0 +1,7 @@
{
"plugins": {
"autoprefixer": {
cascade: false
}
}
}

319
themes/hugo-dpsg/.stylelintrc

@ -0,0 +1,319 @@
{
"plugins": [
"stylelint-order"
],
"rules": {
"at-rule-empty-line-before": [
"always",
{
"except": [
"blockless-after-same-name-blockless",
"first-nested"
],
"ignore": [
"after-comment"
]
}
],
"at-rule-name-case": "lower",
"at-rule-name-space-after": "always-single-line",
"at-rule-semicolon-newline-after": "always",
"block-closing-brace-newline-after": "always",
"block-closing-brace-empty-line-before": "never",
"block-no-empty": true,
"block-opening-brace-newline-after": "always-multi-line",
"color-hex-case": "lower",
"color-hex-length": "short",
"color-no-invalid-hex": true,
"comment-no-empty": true,
"declaration-bang-space-after": "never",
"declaration-bang-space-before": "always",
"declaration-block-no-duplicate-properties": [
true,
{
"ignore": [
"consecutive-duplicates-with-different-values"
]
}
],
"declaration-block-no-shorthand-property-overrides": true,
"declaration-block-semicolon-newline-after": "always-multi-line",
"declaration-block-semicolon-space-after": "always-single-line",
"declaration-block-semicolon-space-before": "never",
"declaration-block-single-line-max-declarations": 1,
"declaration-block-trailing-semicolon": "always",
"declaration-colon-newline-after": "always-multi-line",
"declaration-colon-space-after": "always-single-line",
"declaration-colon-space-before": "never",
"font-family-no-duplicate-names": true,
"function-calc-no-unspaced-operator": true,
"function-comma-newline-after": "always-multi-line",
"function-comma-space-after": "always-single-line",
"function-comma-space-before": "never",
"function-linear-gradient-no-nonstandard-direction": true,
"function-max-empty-lines": 0,
"function-name-case": "lower",
"function-parentheses-newline-inside": "always-multi-line",
"function-parentheses-space-inside": "never-single-line",
"function-whitespace-after": "always",
"indentation": "tab",
"keyframe-declaration-no-important": true,
"length-zero-no-unit": true,
"max-empty-lines": 1,
"media-feature-colon-space-after": "always",
"media-feature-colon-space-before": "never",
"media-feature-name-case": "lower",
"media-feature-name-no-unknown": true,
"media-feature-parentheses-space-inside": "never",
"media-feature-range-operator-space-after": "always",
"media-feature-range-operator-space-before": "always",
"media-query-list-comma-newline-after": "always-multi-line",
"media-query-list-comma-space-after": "always-single-line",
"media-query-list-comma-space-before": "never",
"no-empty-source": true,
"no-eol-whitespace": true,
"no-extra-semicolons": true,
"no-invalid-double-slash-comments": true,
"no-missing-end-of-source-newline": true,
"number-no-trailing-zeros": true,
"property-case": "lower",
"property-no-unknown": true,
"selector-attribute-brackets-space-inside": "never",
"selector-attribute-operator-space-after": "never",
"selector-attribute-operator-space-before": "never",
"selector-combinator-space-after": "always",
"selector-combinator-space-before": "always",
"selector-descendant-combinator-no-non-space": true,
"selector-list-comma-newline-after": "always",
"selector-list-comma-space-before": "never",
"selector-pseudo-class-case": "lower",
"selector-pseudo-class-no-unknown": true,
"selector-pseudo-class-parentheses-space-inside": "never",
"selector-pseudo-element-case": "lower",
"selector-pseudo-element-colon-notation": "double",
"selector-pseudo-element-no-unknown": true,
"selector-type-case": "lower",
"selector-type-no-unknown": true,
"shorthand-property-no-redundant-values": true,
"string-no-newline": true,
"unit-case": "lower",
"unit-no-unknown": true,
"value-list-comma-newline-after": "always-multi-line",
"value-list-comma-space-after": "always-single-line",
"value-list-comma-space-before": "never",
"value-list-max-empty-lines": 0,
"order/properties-order": [
"position",
"top",
"right",
"bottom",
"left",
"z-index",
"box-sizing",
"display",
"flex",
"flex-align",
"flex-basis",
"flex-direction",
"flex-wrap",
"flex-flow",
"flex-shrink",
"flex-grow",
"flex-wrap",
"align-content",
"align-items",
"align-self",
"justify-content",
"order",
"float",
"width",
"min-width",
"max-width",
"height",
"min-height",
"max-height",
"padding",
"padding-top",
"padding-right",
"padding-bottom",
"padding-left",
"margin",
"margin-top",
"margin-right",
"margin-bottom",
"margin-left",
"overflow",
"overflow-x",
"overflow-y",
"-webkit-overflow-scrolling",
"-ms-overflow-x",
"-ms-overflow-y",
"-ms-overflow-style",
"columns",
"column-count",
"column-fill",
"column-gap",
"column-rule",
"column-rule-width",
"column-rule-style",
"column-rule-color",
"column-span",
"column-width",
"orphans",
"widows",
"clip",
"clear",
"font",
"font-family",
"font-size",
"font-style",
"font-weight",
"font-variant",
"font-size-adjust",
"font-stretch",
"font-effect",
"font-emphasize",
"font-emphasize-position",
"font-emphasize-style",
"font-smooth",
"src",
"hyphens",
"line-height",
"color",
"text-align",
"text-align-last",
"text-emphasis",
"text-emphasis-color",
"text-emphasis-style",
"text-emphasis-position",
"text-decoration",
"text-indent",
"text-justify",
"text-outline",
"-ms-text-overflow",
"text-overflow",
"text-overflow-ellipsis",
"text-overflow-mode",
"text-shadow",
"text-transform",
"text-wrap",
"-webkit-text-size-adjust",
"-ms-text-size-adjust",
"letter-spacing",
"-ms-word-break",
"word-break",
"word-spacing",
"-ms-word-wrap",
"word-wrap",
"overflow-wrap",
"tab-size",
"white-space",
"vertical-align",
"direction",
"unicode-bidi",
"list-style",
"list-style-position",
"list-style-type",
"list-style-image",
"pointer-events",
"-ms-touch-action",
"touch-action",
"cursor",
"visibility",
"zoom",
"table-layout",
"empty-cells",
"caption-side",
"border-spacing",
"border-collapse",
"content",
"quotes",
"counter-reset",
"counter-increment",
"resize",
"user-select",
"nav-index",
"nav-up",
"nav-right",
"nav-down",
"nav-left",
"background",
"background-color",
"background-image",
"filter",
"background-repeat",
"background-attachment",
"background-position",
"background-position-x",
"background-position-y",
"background-clip",
"background-origin",
"background-size",
"border",
"border-color",
"border-style",
"border-width",
"border-top",
"border-top-color",
"border-top-style",
"border-top-width",
"border-right",
"border-right-color",
"border-right-style",
"border-right-width",
"border-bottom",
"border-bottom-color",
"border-bottom-style",
"border-bottom-width",
"border-left",
"border-left-color",
"border-left-style",
"border-left-width",
"border-radius",
"border-top-left-radius",
"border-top-right-radius",
"border-bottom-right-radius",
"border-bottom-left-radius",
"border-image",
"border-image-source",
"border-image-slice",
"border-image-width",
"border-image-outset",
"border-image-repeat",
"outline",
"outline-width",
"outline-style",
"outline-color",
"outline-offset",
"box-shadow",
"opacity",
"-ms-interpolation-mode",
"page-break-after",
"page-break-before",
"page-break-inside",
"transition",
"transition-delay",
"transition-timing-function",
"transition-duration",
"transition-property",
"transform",
"transform-origin",
"perspective",
"appearance",
"animation",
"animation-name",
"animation-duration",
"animation-play-state",
"animation-timing-function",
"animation-delay",
"animation-iteration-count",
"animation-direction",
"animation-fill-mode",
"quotes",
"will-change",
"fill",
"fill-rule",
"stroke"
]
}
}

12
themes/hugo-dpsg/.travis.yml

@ -0,0 +1,12 @@
language: node_js
node_js:
- "8"
sudo: false
script:
- npm run lint
branches:
only:
- master

105
themes/hugo-dpsg/CONTRIBUTING.md

@ -0,0 +1,105 @@
# Contributing to Mainroad
**Mainroad** welcomes contributions and corrections. Before contributing, please make sure you have read the guidelines
below. If you're a newcomer to open source and you haven't contributed to other projects or used
[Git](https://git-scm.com/) before, you should make yourself familiar before proceeding.
## Issues
The [issue tracker](https://github.com/vimux/mainroad/issues) is the preferred channel for bug reports and features
requests, but please respect the following restrictions:
### General requirements
* Issue must be written in English.
* Please **do not** combine a few problems or feature requests in one issue. Create separate issues if needed.
* Please **do not** create an issue that contains only title. Write a clear title and useful description.
* Please **do not** use the issue tracker for personal support requests.
* Please **do not** post comments consisting solely of "+1" or emoji. The project maintainer reserve the right to delete
such comments. Use
[GitHub's reactions feature](https://github.com/blog/2119-add-reactions-to-pull-requests-issues-and-comments) instead.
* Search first before filing a new issue. Please check existing open or recently closed issues to make sure somebody
else hasn't already reported the issue.
### Reporting bugs
When creating a new bug issue make sure to include the following information:
* Your environment e.g. OS version, Hugo version, theme is up to date? Anything unusual about your environment or
deployment.
* Specify the exact steps to reproduce the bug in as many details as possible with code examples. Include links to files
or demo projects, or copy/pasteable snippets, which you use in those examples.
* Any message or error you get from Hugo, if you do.
* A screenshot of any visual bug.
**Note:** If you find a **Closed** issue that seems like it is the same bug that you're experiencing, open a new issue
and include a link to the original issue in the body of your new one.
### Proposing features
* Explain the proposed feature, what it should do, why it is useful, and alternatives considered if possible. Please
note that the project maintainer may close this issue or ask you to create a Pull Request if this is not something that
the project maintainer sees as a sufficiently high priority.
Following these guidelines helps maintainer and the community understand your suggestion and find related suggestions.
## Pull Requests (PR)
**Please ask first** before embarking on any significant pull request (e.g. implementing features or refactoring code),
otherwise, you risk spending a lot of time working on something that the project maintainer might not want to merge into
the project.
Please respect our Pull Request Acceptance Criteria. For larger changes, you will likely receive multiple rounds of
comments and it may take some time to complete.
### Pull Request Acceptance Criteria
* Keep the change in a single PR as small as possible
* 1 PR = 1 FIX or FEATURE (do not combine things, send separate PR if needed)
* PR with irrelevant changes won't be merged. If you do want to fix formatting or style, do that in a separate PR
* Use a clear and descriptive branch name (e.g. **NOT** "patch-1" or "update")
* Don't create a Pull Request from master branch
* Provide a reasonable PR title and description
* PR must be written in English
* If the PR changes the UI it should include before-and-after screenshots or a link to a video
* Keep PR up to date with upstream/master
* Pay attention to any automated CI failures reported in the Pull Request
* PR solves a common use case that several users will need in their real-life projects, not only your specific problems
* If you've added or modify SVG, ensure that each SVG file:
* Be less than 2048 bytes
* Be minified to a single line with no formatting
* Not contain any JS or CSS section inside it
* Not contain any additional transformations (matrix, translate, scale)
* Сompatible with [GPLv2 License](LICENSE.md)
* Maintain clean commit history and use meaningful commit messages. Pull Requests with messy commit history (with
commit messages like "update", "another update", etc) are difficult to review and won't be merged, even if the changes
are good enough
* Be prepared to answer questions and make code changes. The project maintainer expect you to be reasonably responsive
to those feedback, otherwise the PR will be closed after 2-4 weeks of inactivity
### Pull Request Contribution Prerequisites
* You have Node & npm installed
* You have Hugo installed at v0.48.0+
* You are familiar with Git
### Pull Request Process
1. Fork the repository
1. Clone down the repository to your local system
1. Run `npm i` in the repository root
1. Create a new *dedicated branch* with descriptive name from `master`
1. Make your change and commit to the new branch from the previous step
1. Write a clear commit message
1. If you've added code that need documentation, update the README.md
1. Make sure your code lints (`npm test`)
1. Push to your fork
1. Submit a Pull Request (PR) to the upstream
---
**⚠️ IMPORTANT: No guarantees can be made that your pull request will be accepted.**
## License
By contributing to Mainroad, you agree that your contributions will be licensed under [GPLv2 License](LICENSE.md).

361
themes/hugo-dpsg/LICENSE.md

@ -0,0 +1,361 @@
### GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
### Preamble
The licenses for most software are designed to take away your freedom
to share and change it. By contrast, the GNU General Public License is
intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if
you distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on,
we want its recipients to know that what they have is not the
original, so that any problems introduced by others will not reflect
on the original authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at
all.
The precise terms and conditions for copying, distribution and
modification follow.
### TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
**0.** This License applies to any program or other work which
contains a notice placed by the copyright holder saying it may be
distributed under the terms of this General Public License. The
"Program", below, refers to any such program or work, and a "work
based on the Program" means either the Program or any derivative work
under copyright law: that is to say, a work containing the Program or
a portion of it, either verbatim or with modifications and/or
translated into another language. (Hereinafter, translation is
included without limitation in the term "modification".) Each licensee
is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the Program
(independent of having been made by running the Program). Whether that
is true depends on what the Program does.
**1.** You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a
fee.
**2.** You may modify your copy or copies of the Program or any
portion of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
**a)** You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
**b)** You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any part
thereof, to be licensed as a whole at no charge to all third parties
under the terms of this License.
**c)** If the modified program normally reads commands interactively
when run, you must cause it, when started running for such interactive
use in the most ordinary way, to print or display an announcement
including an appropriate copyright notice and a notice that there is
no warranty (or else, saying that you provide a warranty) and that
users may redistribute the program under these conditions, and telling
the user how to view a copy of this License. (Exception: if the
Program itself is interactive but does not normally print such an
announcement, your work based on the Program is not required to print
an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
**3.** You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
**a)** Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections 1
and 2 above on a medium customarily used for software interchange; or,
**b)** Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your cost of
physically performing source distribution, a complete machine-readable
copy of the corresponding source code, to be distributed under the
terms of Sections 1 and 2 above on a medium customarily used for
software interchange; or,
**c)** Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is allowed
only for noncommercial distribution and only if you received the
program in object code or executable form with such an offer, in
accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
**4.** You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt otherwise
to copy, modify, sublicense or distribute the Program is void, and
will automatically terminate your rights under this License. However,
parties who have received copies, or rights, from you under this
License will not have their licenses terminated so long as such
parties remain in full compliance.
**5.** You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
**6.** Each time you redistribute the Program (or any work based on
the Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
**7.** If, as a consequence of a court judgment or allegation of
patent infringement or for any other reason (not limited to patent
issues), conditions are imposed on you (whether by court order,
agreement or otherwise) that contradict the conditions of this
License, they do not excuse you from the conditions of this License.
If you cannot distribute so as to satisfy simultaneously your
obligations under this License and any other pertinent obligations,
then as a consequence you may not distribute the Program at all. For
example, if a patent license would not permit royalty-free
redistribution of the Program by all those who receive copies directly
or indirectly through you, then the only way you could satisfy both it
and this License would be to refrain entirely from distribution of the
Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
**8.** If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
**9.** The Free Software Foundation may publish revised and/or new
versions of the General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Program does not specify a
version number of this License, you may choose any version ever
published by the Free Software Foundation.
**10.** If you wish to incorporate parts of the Program into other
free programs whose distribution conditions are different, write to
the author to ask for permission. For software which is copyrighted by
the Free Software Foundation, write to the Free Software Foundation;
we sometimes make exceptions for this. Our decision will be guided by
the two goals of preserving the free status of all derivatives of our
free software and of promoting the sharing and reuse of software
generally.
**NO WARRANTY**
**11.** BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
**12.** IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
### END OF TERMS AND CONDITIONS
### How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these
terms.
To do so, attach the following notices to the program. It is safest to
attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
one line to give the program's name and an idea of what it does.
Copyright (C) yyyy name of author
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Also add information on how to contact you by electronic and paper
mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
type `show w'. This is free software, and you are welcome
to redistribute it under certain conditions; type `show c'
for details.
The hypothetical commands \`show w' and \`show c' should show the
appropriate parts of the General Public License. Of course, the
commands you use may be called something other than \`show w' and
\`show c'; they could even be mouse-clicks or menu items--whatever
suits your program.
You should also get your employer (if you work as a programmer) or
your school, if any, to sign a "copyright disclaimer" for the program,
if necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright
interest in the program `Gnomovision'
(which makes passes at compilers) written
by James Hacker.
signature of Ty Coon, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library,
you may consider it more useful to permit linking proprietary
applications with the library. If this is what you want to do, use the
[GNU Lesser General Public
License](http://www.gnu.org/licenses/lgpl.html) instead of this
License.

236
themes/hugo-dpsg/README.md

@ -0,0 +1,236 @@
# Mainroad
**Mainroad** is a responsive, simple, clean and content-focused [Hugo](https://gohugo.io/) theme based on the
[MH Magazine lite](https://wordpress.org/themes/mh-magazine-lite/) WordPress theme by
[MH Themes](https://www.mhthemes.com/).
**[Demo (Fast update)](https://hugothemes.gitlab.io/mainroad/)** |
[Standart Demo](https://themes.gohugo.io/theme/mainroad/)
![screenshot](https://github.com/Vimux/mainroad/blob/master/images/screenshot.png)
**Features:**
+ Hugo internal templates (Open Graph, Twitter Cards, Disqus, Google Analytics)
+ Responsive menu
+ Secondary menus
+ SVG icons
+ Theme options (Sidebar position, Author Box, Post Navigation, highlight color) available through config.toml file
parameters
+ Table of Contents
+ MathJax
**Browser support:**
+ **Desktop:** IE11+, Chrome, Firefox, Safari
+ **Mobile:** Android browser (on Android 4.4+), Safari (on iOS 7+), Google Chrome, Opera mini
Other browsers (like Opera on Blink engine) are also supported, but not tested.
## Installation
*Before starting, please be sure that you have
[installed Hugo](https://gohugo.io/getting-started/quick-start/#step-1-install-hugo) and
[created a new site](https://gohugo.io/getting-started/quick-start/#step-2-create-a-new-site). After that, you ready to
install **Mainroad**.*
In your Hugo site `themes` directory, run:
```
git clone https://github.com/vimux/mainroad
```
Or, if you don't plan to make any significant changes, but want to track and update the theme, you can add it as a git
submodule via the following command:
```
git submodule add https://github.com/vimux/mainroad
```
Next, open `config.toml` in the base of the Hugo site and ensure the theme option is set to `mainroad`:
```
theme = "mainroad"
```
For more information read the official [setup guide](https://gohugo.io/themes/installing-and-using-themes/) of Hugo.
## Configuration
### Config.toml example
```toml
baseurl = "/"
title = "Mainroad"
languageCode = "en-us"
paginate = "10" # Number of posts per page
theme = "mainroad"
disqusShortname = "" # Enable Disqus comments by entering your Disqus shortname
googleAnalytics = "" # Enable Google Analytics by entering your tracking id
[Author] # Used in authorbox
name = "John Doe"
bio = "John Doe's true identity is unknown. Maybe he is a successful blogger or writer. Nobody knows it."
avatar = "img/avatar.png"
[Params]
subtitle = "Just another site" # Subtitle of your site. Used in site header
description = "John Doe's Personal blog about everything" # Site description. Used in meta description
copyright = "John Doe" # Footer copyright holder, otherwise will use site title
opengraph = true # Enable OpenGraph if true
twitter_cards = true # Enable Twitter Cards if true
readmore = false # Show "Read more" button in list if true
authorbox = true # Show authorbox at bottom of pages if true
toc = true # Enable Table of Contents
post_navigation = true # Show post navigation at bottom of pages if true
post_meta = ["date", "categories", "translations"] # Order of post meta information
mainSections = ["post", "blog", "news"] # Specify section pages to show on home page and the "Recent articles" widget
dateformat = "2006-01-02" # Change the format of dates
mathjax = true # Enable MathJax
mathjaxPath = "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.6/MathJax.js" # Specify MathJax path
mathjaxConfig = "TeX-AMS-MML_HTMLorMML" # Specify MathJax config
highlightColor = "#e22d30" # Override highlight color
customCSS = ["css/custom.css"] # Include custom CSS files
customJS = ["js/custom.js"] # Include custom JS files
[Params.sidebar]
home = "right" # Configure layout for home page
list = "left" # Configure layout for list pages
single = false # Configure layout for single pages
# Enable widgets in given order
widgets = ["search", "recent", "categories", "taglist", "social", "languages"]
[Params.widgets]
recent_num = 5 # Set the number of articles in the "Recent articles" widget
tags_counter = false # Enable counter for each tag in "Tags" widget
[Params.widgets.social]
# Enable parts of social widget
facebook = "username"
twitter = "username"
instagram = "username"
linkedin = "username"
telegram = "username"
github = "username"
gitlab = "username"
bitbucket = "username"
email = "example@example.com"
# Custom social links
[[Params.widgets.social.custom]]
title = "Youtube"
url = "https://youtube.com/user/username"
icon = "youtube.svg" # Optional. Path relative to "layouts/partials"
[[Params.widgets.social.custom]]
title = "My Home Page"
url = "http://example.com"
```
A good idea is not to copy all these settings without understanding how it works. Use only those parameters that you
need.
For more information about all available standard configuration settings, please read
[All Hugo Configuration Settings](https://gohugo.io/getting-started/configuration/#all-configuration-settings).
### Front Matter example
```yaml
---
# Common-Defined params
title: "Example article title"
date: "2017-08-21"
description: "Example article description"
categories:
- "Category 1"
- "Category 2"
tags:
- "Test"
- "Another test"
menu: main # Optional, add page to a menu. Options: main, side, footer
# Theme-Defined params
thumbnail: "img/placeholder.jpg" # Thumbnail image
lead: "Example lead - highlighted near the title" # Lead text
comments: false # Enable Disqus comments for specific page
authorbox: true # Enable authorbox for specific page
toc: true # Enable Table of Contents for specific page
mathjax: true # Enable MathJax for specific page
---
```
For more information about front matter variables read
[Hugo Front Matter](https://gohugo.io/content-management/front-matter) from Hugo official documentation.
### Sidebar
**Mainroad** comes with a configurable sidebar that can be on the left, on the right, or disabled. The default layout
can be specified in the `[Params.sidebar]` section of the configuration. The position can be specified for home, list
and single pages individually. Use the keys `home`, `list` and `single` with values `"left"`, `"right"` or `false`. The
layout can be configured per page, by setting the `sidebar` parameter with one of the same values in the page's front
matter.
The sidebar consists of multiple widgets. Widgets can be enabled individually using the `widgets` key with a list of
widget names as value. You can add your own widgets, by placing a template under `layouts/partials/widgets/<name>.html`.
The list of widgets can be overwritten from a page's front matter.
Some widget respect optional configuration. Have a look at the `[Params.widgets]` and `[Params.widgets.social]` sections
in the example configuration above.
### Menus
**Mainroad** supports multiple menus. The `main` menu is fully responsive and displayed right under the site header. The
secondary menus `side` and `footer` are displayed in a sidebar widget and the page footer. To add a page to a menu, add
a `menu: <menu>` parameter to the page's front matter:
```yaml
menu: main # Add page to a main menu
```
You can also add a page to multiple menus by providing a list:
```yaml
menu: ["main", "side", "footer"] # Add page to a main, side, and footer menu
```
**Note:** Don't forget to enable the `sidemenu` widget in the `widgets` configuration param if you want to use the
`side` menu.
**Note:** Please keep in mind that Mainroad menus don't support nested items i.e. submenus.
### Social Widget: custom links
**Mainroad** contains built-in social links in the social widget. In addition, you can also set custom social links by
adding `Params.widgets.social.custom` to your `config.toml`. Here is an example.
```toml
[[Params.widgets.social.custom]]
title = "Youtube"
url = "https://youtube.com/user/username"
icon = "youtube.svg"
```
**Note:** You need to put your icon file in `layouts/partials` directory under your project's root if you want to
display an icon of your social link. The `icon` filed, which is optional, should be a path relative to
`layouts/partials`.
**Note:** *Only* SVG files are supported to be used as custom social icons in the current version. If you use any files
of another format, PNG for example, a compile error will be raised by Hugo.
**Note:** Not every SVG icon can be used. For better results, it should be one-color SVG file with a special class
attribute `{{ with .class }}{{ . }} {{ end }}` and 24x24 size. At a minimum, custom SVG icon needs these attributes:
```html
<svg class="{{ with .class }}{{ . }} {{ end }} icon" width="24" height="24">...</svg>
```
## Contributing
Have you found a bug or got an idea for a new feature? Feel free to use the
[issue tracker](https://github.com/Vimux/mainroad/issues) to let me know. Or make directly a
[pull request](https://github.com/Vimux/mainroad/pulls), but please respect the following
[contributing guide](https://github.com/Vimux/mainroad/blob/master/CONTRIBUTING.md).
## License
This theme is released under the [GPLv2 license](https://github.com/Vimux/mainroad/blob/master/LICENSE.md).

10
themes/hugo-dpsg/archetypes/default.md

@ -0,0 +1,10 @@
---
title: "{{ replace .TranslationBaseName '-' ' ' | title }}"
description: ""
date: "{{ .Date }}"
thumbnail: ""
categories:
- ""
tags:
- ""
---

1275
themes/hugo-dpsg/assets/css/style.css
File diff suppressed because it is too large
View File

2
themes/hugo-dpsg/exampleSite/.gitignore

@ -0,0 +1,2 @@
public/
themes

33
themes/hugo-dpsg/exampleSite/config.toml

@ -0,0 +1,33 @@
baseurl = "/"
title = "Mainroad"
languageCode = "en-us"
paginate = "10" # Number of posts per page
theme = "mainroad"
disqusShortname = "" # Enable comments by entering your Disqus shortname
googleAnalytics = "" # Enable Google Analytics by entering your tracking id
[Author]
name = "John Doe"
bio = "John Doe's true identity is unknown. Maybe he is a successful blogger or writer. Nobody knows it."
avatar = "img/avatar.png"
[Params]
subtitle = "Just another site" # Subtitle of your site
description = "John Doe's Personal blog about everything" # Description of your site
opengraph = true
twitter_cards = false
readmore = false # Show "Read more" button in list if true
authorbox = true
post_navigation = true
post_meta = ["date", "categories"] # Order of post meta information
[Params.sidebar]
home = "right" # Configure layout for home page
list = "right" # Configure layout for list pages
single = "right" # Configure layout for single pages
# Enable widgets in given order
widgets = ["search", "recent", "categories", "taglist"]
[Params.widgets]
recent_num = 5 # Set the number of articles in the "Recent articles" widget
tags_counter = false # Enable counter for each tag in "Tags" widget (disabled by default)

32
themes/hugo-dpsg/exampleSite/content/about.md

@ -0,0 +1,32 @@
---
title: About Hugo
date: 2014-04-09
authorbox: false
sidebar: false
menu: main
---
Hugo is a static site engine written in Go.
It makes use of a variety of open source projects including:
* [Cobra](https://github.com/spf13/cobra)
* [Viper](https://github.com/spf13/viper)
* [J Walter Weatherman](https://github.com/spf13/jWalterWeatherman)
* [Cast](https://github.com/spf13/cast)
Learn more and contribute on [GitHub](https://github.com/spf13).
## Setup
Some fun facts about [Hugo](http://gohugo.io/):
* Built in [Go](http://golang.org/)
* Loosely inspired by [Jekyll](http://jekyllrb.com/)
* Primarily developed by [spf13](http://spf13.com/) on the train while commuting to and from Manhattan.
* Coded in [Vim](http://vim.org) using [spf13-vim](http://vim.spf13.com/)
Have questions or suggestions? Feel free to [open an issue on GitHub](https://github.com/spf13/hugo/issues/new) or [ask me on Twitter](https://twitter.com/spf13).
Thanks for reading!

166
themes/hugo-dpsg/exampleSite/content/post/basic-elements.md

@ -0,0 +1,166 @@
---
title: Basic HTML Elements
description: Example test article that contains basic HTML elements for text formatting on the Web.
date: 2018-04-16
categories:
- "Development"
tags:
- "HTML"
- "CSS"
- "Basic Elements"
---
The main purpose of this article is to make sure that all basic HTML Elements are decorated with CSS so as to not miss any possible elements when creating new themes for Hugo.
<!--more-->
## Headings
Let's start with all possible headings. The HTML `<h1>`—`<h6>` elements represent six levels of section headings. `<h1>` is the highest section level and `<h6>` is the lowest.
# Heading 1
## Heading 2
### Heading 3
#### Heading 4
##### Heading 5
###### Heading 6
***
## Paragraph
According to the [HTML5 specification](https://www.w3.org/TR/html5/dom.html#elements) by [W3C](https://www.w3.org/), **HTML documents consist of a tree of elements and text**. Each element is denoted in the source by a [start tag](https://www.w3.org/TR/html5/syntax.html#syntax-start-tags), such as `<body>`, and an [end tag](https://www.w3.org/TR/html5/syntax.html#syntax-end-tags), such as `</body>`. (*Certain start tags and end tags can in certain cases be omitted and are implied by other tags.*)
Elements can have attributes, which control how the elements work. For example, hyperlink are formed using the `a` element and its `href` attribute.
## List Types
### Ordered List
1. First item
2. Second item
3. Third item
### Unordered List
* List item
* Another item
* And another item
### Nested list
<ul>
<li>First item</li>
<li>Second item
<ul>
<li>Second item First subitem</li>
<li>Second item second subitem
<ul>
<li>Second item Second subitem First sub-subitem</li>
<li>Second item Second subitem Second sub-subitem</li>
<li>Second item Second subitem Third sub-subitem</li>
</ul>
</li>
<li>Second item Third subitem
<ol>
<li>Second item Third subitem First sub-subitem</li>
<li>Second item Third subitem Second sub-subitem</li>
<li>Second item Third subitem Third sub-subitem</li>
</ol>
</ul>
</li>
<li>Third item</li>
</ul>
### Definition List
HTML also supports definition lists.
<dl>
<dt>Blanco tequila</dt>
<dd>The purest form of the blue agave spirit...</dd>
<dt>Reposado tequila</dt>
<dd>Typically aged in wooden barrels for between two and eleven months...</dd>
</dl>
## Blockquotes
The blockquote element represents content that is quoted from another source, optionally with a citation which must be within a `footer` or `cite` element, and optionally with in-line changes such as annotations and abbreviations.
> Quoted text.
> This line is part of the same quote.
> Also you can *put* **Markdown** into a blockquote.
Blockquote with a citation.
<blockquote>
<p>My goal wasn't to make a ton of money. It was to build good computers. I only started the company when I realized I could be an engineer forever.</p>
<footer><cite>Steve Wozniak</cite></footer>
</blockquote>
According to Mozilla's website, <q cite="https://www.mozilla.org/en-US/about/history/details/">Firefox 1.0 was released in 2004 and became a big success.</q>
## Tables
Tables aren't part of the core Markdown spec, but Hugo supports them.
| ID | Make | Model | Year |
| --- | --------- | ------- | ---- |
| 1 | Honda | Accord | 2009 |
| 2 | Toyota | Camry | 2012 |
| 3 | Hyundai | Elantra | 2010 |
Colons can be used to align columns.
| Tables | Are | Cool |
|:----------- |:-------------:| ------------:|
| align: left | align: center | align: right |
| align: left | align: center | align: right |
| align: left | align: center | align: right |
You can also use inline Markdown.
| Inline | Markdown | In | Table |
| ---------- | --------- | ----------------- | ---------- |
| *italics* | **bold** | ~~strikethrough~~ | `code` |
## Code
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Example HTML5 Document</title>
</head>
<body>
<p>Test</p>
</body>
</html>
```
{{< highlight html >}}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Example HTML5 Document</title>
</head>
<body>
<p>Test</p>
</body>
</html>
{{< /highlight >}}
## Other stuff — abbr, sub, sup, kbd, etc.
<abbr title="Graphics Interchange Format">GIF</abbr> is a bitmap image format.
H<sub>2</sub>O
C<sub>6</sub>H<sub>12</sub>O<sub>6</sub>
X<sup>n</sup> + Y<sup>n</sup> = Z<sup>n</sup>
Press <kbd>X</kbd> to win. Or press <kbd><kbd>CTRL</kbd>+<kbd>ALT</kbd>+<kbd>F</kbd></kbd> to show FPS counter.
<mark>As a unit of information in information theory, the bit has alternatively been called a shannon</mark>, named after Claude Shannon, the founder of field of information theory.

1143
themes/hugo-dpsg/exampleSite/content/post/creating-a-new-theme.md
File diff suppressed because it is too large
View File

344
themes/hugo-dpsg/exampleSite/content/post/goisforlovers.md

@ -0,0 +1,344 @@
---
title: "(Hu)go Template Primer"
date: 2014-04-02
thumbnail: "img/placeholder.png"
tags:
- "go"
- "golang"
- "templates"
- "themes"
- "development"
categories:
- "Development"
- "golang"
menu: main
---
Hugo uses the excellent [Go][] [html/template][gohtmltemplate] library for
its template engine. It is an extremely lightweight engine that provides a very
small amount of logic. In our experience that it is just the right amount of
logic to be able to create a good static website. If you have used other
template systems from different languages or frameworks you will find a lot of
similarities in Go templates.
<!--more-->
This document is a brief primer on using Go templates. The [Go docs][gohtmltemplate]
provide more details.
## Introduction to Go Templates
Go templates provide an extremely simple template language. It adheres to the
belief that only the most basic of logic belongs in the template or view layer.
One consequence of this simplicity is that Go templates parse very quickly.
A unique characteristic of Go templates is they are content aware. Variables and
content will be sanitized depending on the context of where they are used. More
details can be found in the [Go docs][gohtmltemplate].
## Basic Syntax
Golang templates are HTML files with the addition of variables and
functions.
**Go variables and functions are accessible within {{ }}**
Accessing a predefined variable "foo":
{{ foo }}
**Parameters are separated using spaces**
Calling the add function with input of 1, 2:
{{ add 1 2 }}
**Methods and fields are accessed via dot notation**
Accessing the Page Parameter "bar"
{{ .Params.bar }}
**Parentheses can be used to group items together**
{{ if or (isset .Params "alt") (isset .Params "caption") }} Caption {{ end }}
## Variables
Each Go template has a struct (object) made available to it. In hugo each
template is passed either a page or a node struct depending on which type of
page you are rendering. More details are available on the
[variables](/layout/variables) page.
A variable is accessed by referencing the variable name.
<title>{{ .Title }}</title>
Variables can also be defined and referenced.
{{ $address := "123 Main St."}}
{{ $address }}
## Functions
Go template ship with a few functions which provide basic functionality. The Go
template system also provides a mechanism for applications to extend the
available functions with their own. [Hugo template
functions](/layout/functions) provide some additional functionality we believe
are useful for building websites. Functions are called by using their name
followed by the required parameters separated by spaces. Template
functions cannot be added without recompiling hugo.
**Example:**
{{ add 1 2 }}
## Includes
When including another template you will pass to it the data it will be
able to access. To pass along the current context please remember to
include a trailing dot. The templates location will always be starting at
the /layout/ directory within Hugo.
**Example:**
{{ template "chrome/header.html" . }}
## Logic
Go templates provide the most basic iteration and conditional logic.
### Iteration
Just like in Go, the Go templates make heavy use of range to iterate over
a map, array or slice. The following are different examples of how to use
range.
**Example 1: Using Context**
{{ range array }}
{{ . }}
{{ end }}
**Example 2: Declaring value variable name**
{{range $element := array}}
{{ $element }}
{{ end }}
**Example 2: Declaring key and value variable name**
{{range $index, $element := array}}
{{ $index }}
{{ $element }}
{{ end }}
### Conditionals
If, else, with, or, & and provide the framework for handling conditional
logic in Go Templates. Like range, each statement is closed with `end`.
Go Templates treat the following values as false:
* false
* 0
* any array, slice, map, or string of length zero
**Example 1: If**
{{ if isset .Params "title" }}<h4>{{ index .Params "title" }}</h4>{{ end }}
**Example 2: If -> Else**
{{ if isset .Params "alt" }}
{{ index .Params "alt" }}
{{else}}
{{ index .Params "caption" }}
{{ end }}
**Example 3: And & Or**
{{ if and (or (isset .Params "title") (isset .Params "caption")) (isset .Params "attr")}}
**Example 4: With**
An alternative way of writing "if" and then referencing the same value
is to use "with" instead. With rebinds the context `.` within its scope,
and skips the block if the variable is absent.
The first example above could be simplified as:
{{ with .Params.title }}<h4>{{ . }}</h4>{{ end }}
**Example 5: If -> Else If**
{{ if isset .Params "alt" }}
{{ index .Params "alt" }}
{{ else if isset .Params "caption" }}
{{ index .Params "caption" }}
{{ end }}
## Pipes
One of the most powerful components of Go templates is the ability to
stack actions one after another. This is done by using pipes. Borrowed
from unix pipes, the concept is simple, each pipeline's output becomes the
input of the following pipe.
Because of the very simple syntax of Go templates, the pipe is essential
to being able to chain together function calls. One limitation of the
pipes is that they only can work with a single value and that value
becomes the last parameter of the next pipeline.
A few simple examples should help convey how to use the pipe.
**Example 1 :**
{{ if eq 1 1 }} Same {{ end }}
is the same as
{{ eq 1 1 | if }} Same {{ end }}
It does look odd to place the if at the end, but it does provide a good
illustration of how to use the pipes.
**Example 2 :**
{{ index .Params "disqus_url" | html }}
Access the page parameter called "disqus_url" and escape the HTML.
**Example 3 :**
{{ if or (or (isset .Params "title") (isset .Params "caption")) (isset .Params "attr")}}
Stuff Here
{{ end }}
Could be rewritten as
{{ isset .Params "caption" | or isset .Params "title" | or isset .Params "attr" | if }}
Stuff Here
{{ end }}
## Context (aka. the dot)
The most easily overlooked concept to understand about Go templates is that {{ . }}
always refers to the current context. In the top level of your template this
will be the data set made available to it. Inside of a iteration it will have
the value of the current item. When inside of a loop the context has changed. .
will no longer refer to the data available to the entire page. If you need to
access this from within the loop you will likely want to set it to a variable
instead of depending on the context.
**Example:**
{{ $title := .Site.Title }}
{{ range .Params.tags }}
<li> <a href="{{ $baseurl }}/tags/{{ . | urlize }}">{{ . }}</a> - {{ $title }} </li>
{{ end }}
Notice how once we have entered the loop the value of {{ . }} has changed. We
have defined a variable outside of the loop so we have access to it from within
the loop.
# Hugo Parameters
Hugo provides the option of passing values to the template language
through the site configuration (for sitewide values), or through the meta
data of each specific piece of content. You can define any values of any
type (supported by your front matter/config format) and use them however
you want to inside of your templates.
## Using Content (page) Parameters
In each piece of content you can provide variables to be used by the
templates. This happens in the [front matter](/content/front-matter).
An example of this is used in this documentation site. Most of the pages
benefit from having the table of contents provided. Sometimes the TOC just
doesn't make a lot of sense. We've defined a variable in our front matter
of some pages to turn off the TOC from being displayed.
Here is the example front matter:
```
---
title: "Permalinks"
date: "2013-11-18"
aliases:
- "/doc/permalinks/"
groups: ["extras"]
groups_weight: 30
notoc: true
---
```
Here is the corresponding code inside of the template:
{{ if not .Params.notoc }}
<div id="toc" class="well col-md-4 col-sm-6">
{{ .TableOfContents }}
</div>
{{ end }}
## Using Site (config) Parameters
In your top-level configuration file (eg, `config.yaml`) you can define site
parameters, which are values which will be available to you in chrome.
For instance, you might declare:
```yaml
params:
CopyrightHTML: "Copyright &#xA9; 2013 John Doe. All Rights Reserved."
TwitterUser: "spf13"
SidebarRecentLimit: 5
```
Within a footer layout, you might then declare a `<footer>` which is only
provided if the `CopyrightHTML` parameter is provided, and if it is given,
you would declare it to be HTML-safe, so that the HTML entity is not escaped
again. This would let you easily update just your top-level config file each
January 1st, instead of hunting through your templates.
```
{{if .Site.Params.CopyrightHTML}}<footer>
<div class="text-center">{{.Site.Params.CopyrightHTML | safeHtml}}</div>
</footer>{{end}}
```
An alternative way of writing the "if" and then referencing the same value
is to use "with" instead. With rebinds the context `.` within its scope,
and skips the block if the variable is absent:
```
{{with .Site.Params.TwitterUser}}<span class="twitter">
<a href="https://twitter.com/{{.}}" rel="author">
<img src="/images/twitter.png" width="48" height="48" title="Twitter: {{.}}"
alt="Twitter"></a>
</span>{{end}}
```
Finally, if you want to pull "magic constants" out of your layouts, you can do
so, such as in this example:
```
<nav class="recent">
<h1>Recent Posts</h1>
<ul>{{range first .Site.Params.SidebarRecentLimit .Site.Recent}}
<li><a href="{{.RelPermalink}}">{{.Title}}</a></li>
{{end}}</ul>
</nav>
```
[go]: https://golang.org/
[gohtmltemplate]: https://golang.org/pkg/html/template/

86
themes/hugo-dpsg/exampleSite/content/post/hugoisforlovers.md

@ -0,0 +1,86 @@
---
title: Getting Started with Hugo
date: 2014-04-02
tags:
- "go"
- "golang"
- "hugo"
- "development"
categories:
- "Development"
- "golang"
menu: main
---
## Step 1. Install Hugo
Go to [Hugo releases](https://github.com/spf13/hugo/releases) and download the
appropriate version for your OS and architecture.
Save it somewhere specific as we will be using it in the next step.
More complete instructions are available at [Install Hugo](https://gohugo.io/getting-started/installing/)
## Step 2. Build the Docs
Hugo has its own example site which happens to also be the documentation site