From f6171183fb5e1a969db808a9ff39211ce7b45ac4 Mon Sep 17 00:00:00 2001 From: rac2030 Date: Sun, 26 Feb 2017 02:18:20 +0100 Subject: [PATCH 01/11] Moved content from template to hugo style content Removed sample pictures from deployed template and into demo site. Replaced inline content in template with hugo style markdown rendering keeping the same output to index.html --- archetypes/article.md | 5 ++++ exampleSite/content/.gitkeep | 0 exampleSite/content/article/about.md | 9 ++++++ exampleSite/content/article/intro.md | 11 +++++++ exampleSite/content/article/work.md | 11 +++++++ exampleSite/static/.gitkeep | 0 {static => exampleSite/static}/img/pic01.jpg | Bin {static => exampleSite/static}/img/pic02.jpg | Bin {static => exampleSite/static}/img/pic03.jpg | Bin layouts/article/onepagestyle.html | 4 +++ layouts/index.html | 30 +++++-------------- layouts/partials/footer.html | 18 +++++++++++ layouts/partials/header.html | 16 ++++++++++ 13 files changed, 82 insertions(+), 22 deletions(-) create mode 100644 archetypes/article.md delete mode 100644 exampleSite/content/.gitkeep create mode 100644 exampleSite/content/article/about.md create mode 100644 exampleSite/content/article/intro.md create mode 100644 exampleSite/content/article/work.md delete mode 100644 exampleSite/static/.gitkeep rename {static => exampleSite/static}/img/pic01.jpg (100%) rename {static => exampleSite/static}/img/pic02.jpg (100%) rename {static => exampleSite/static}/img/pic03.jpg (100%) create mode 100644 layouts/article/onepagestyle.html diff --git a/archetypes/article.md b/archetypes/article.md new file mode 100644 index 0000000..17a8ced --- /dev/null +++ b/archetypes/article.md @@ -0,0 +1,5 @@ ++++ +id = "" +weight = 0 +menu = "main" ++++ diff --git a/exampleSite/content/.gitkeep b/exampleSite/content/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/exampleSite/content/article/about.md b/exampleSite/content/article/about.md new file mode 100644 index 0000000..34219b3 --- /dev/null +++ b/exampleSite/content/article/about.md @@ -0,0 +1,9 @@ ++++ +title = "About" +id = "about" +weight = 20 +menu = "main" ++++ + + +Lorem ipsum dolor sit amet, consectetur et adipiscing elit. Praesent eleifend dignissim arcu, at eleifend sapien imperdiet ac. Aliquam erat volutpat. Praesent urna nisi, fringila lorem et vehicula lacinia quam. Integer sollicitudin mauris nec lorem luctus ultrices. Aliquam libero et malesuada fames ac ante ipsum primis in faucibus. Cras viverra ligula sit amet ex mollis mattis lorem ipsum dolor sit amet. diff --git a/exampleSite/content/article/intro.md b/exampleSite/content/article/intro.md new file mode 100644 index 0000000..7a08dc2 --- /dev/null +++ b/exampleSite/content/article/intro.md @@ -0,0 +1,11 @@ ++++ +title = "Intro" +id = "intro" +weight = 0 +menu = "main" ++++ + + +Aenean ornare velit lacus, ac varius enim ullamcorper eu. Proin aliquam facilisis ante interdum congue. Integer mollis, nisl amet convallis, porttitor magna ullamcorper, amet egestas mauris. Ut magna finibus nisi nec lacinia. Nam maximus erat id euismod egestas. By the way, check out my [awesome work](#work). + +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis dapibus rutrum facilisis. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Etiam tristique libero eu nibh porttitor fermentum. Nullam venenatis erat id vehicula viverra. Nunc ultrices eros ut ultricies condimentum. Mauris risus lacus, blandit sit amet venenatis non, bibendum vitae dolor. Nunc lorem mauris, fringilla in aliquam at, euismod in lectus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. In non lorem sit amet elit placerat maximus. Pellentesque aliquam maximus risus, vel sed vehicula. diff --git a/exampleSite/content/article/work.md b/exampleSite/content/article/work.md new file mode 100644 index 0000000..b2b21dd --- /dev/null +++ b/exampleSite/content/article/work.md @@ -0,0 +1,11 @@ ++++ +title = "Work" +id = "work" +weight = 10 +menu = "main" ++++ + + +Adipiscing magna sed dolor elit. Praesent eleifend dignissim arcu, at eleifend sapien imperdiet ac. Aliquam erat volutpat. Praesent urna nisi, fringila lorem et vehicula lacinia quam. Integer sollicitudin mauris nec lorem luctus ultrices. + +Nullam et orci eu lorem consequat tincidunt vivamus et sagittis libero. Mauris aliquet magna magna sed nunc rhoncus pharetra. Pellentesque condimentum sem. In efficitur ligula tate urna. Maecenas laoreet massa vel lacinia pellentesque lorem ipsum dolor. Nullam et orci eu lorem consequat tincidunt. Vivamus et sagittis libero. Mauris aliquet magna magna sed nunc rhoncus amet feugiat tempus. diff --git a/exampleSite/static/.gitkeep b/exampleSite/static/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/static/img/pic01.jpg b/exampleSite/static/img/pic01.jpg similarity index 100% rename from static/img/pic01.jpg rename to exampleSite/static/img/pic01.jpg diff --git a/static/img/pic02.jpg b/exampleSite/static/img/pic02.jpg similarity index 100% rename from static/img/pic02.jpg rename to exampleSite/static/img/pic02.jpg diff --git a/static/img/pic03.jpg b/exampleSite/static/img/pic03.jpg similarity index 100% rename from static/img/pic03.jpg rename to exampleSite/static/img/pic03.jpg diff --git a/layouts/article/onepagestyle.html b/layouts/article/onepagestyle.html new file mode 100644 index 0000000..a6dca03 --- /dev/null +++ b/layouts/article/onepagestyle.html @@ -0,0 +1,4 @@ +
+

{{ .Title }}

+ {{ .Content }} +
\ No newline at end of file diff --git a/layouts/index.html b/layouts/index.html index 0c344ac..78155a7 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -1,19 +1,4 @@ - - - - - {{ .Title }} - - - - - - - +{{ partial "header.html" }}
@@ -31,18 +16,19 @@
- + {{ range .Data.Pages }} + {{ .Render "onepagestyle"}} + {{ end }} +

Intro

diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index e69de29..6e521b8 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -0,0 +1,18 @@ + + +
+ +
+ +
+ +
+ + + + + + + + + diff --git a/layouts/partials/header.html b/layouts/partials/header.html index e69de29..f2f6656 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -0,0 +1,16 @@ + + + + + {{ .Title }} + + + + + + + \ No newline at end of file From bdf28fd01838e9f81ee59f7241c300de9ae504bb Mon Sep 17 00:00:00 2001 From: rac2030 Date: Sun, 26 Feb 2017 02:35:36 +0100 Subject: [PATCH 02/11] Added missing footer partial and fixed missing partial context parameter --- layouts/index.html | 44 ++------------------------------------------ 1 file changed, 2 insertions(+), 42 deletions(-) diff --git a/layouts/index.html b/layouts/index.html index 78155a7..c538f95 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -1,4 +1,4 @@ -{{ partial "header.html" }} +{{ partial "header.html" . }}
@@ -29,29 +29,6 @@ {{ .Render "onepagestyle"}} {{ end }} - -
-

Intro

- -

Aenean ornare velit lacus, ac varius enim ullamcorper eu. Proin aliquam facilisis ante interdum congue. Integer mollis, nisl amet convallis, porttitor magna ullamcorper, amet egestas mauris. Ut magna finibus nisi nec lacinia. Nam maximus erat id euismod egestas. By the way, check out my awesome work.

-

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis dapibus rutrum facilisis. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Etiam tristique libero eu nibh porttitor fermentum. Nullam venenatis erat id vehicula viverra. Nunc ultrices eros ut ultricies condimentum. Mauris risus lacus, blandit sit amet venenatis non, bibendum vitae dolor. Nunc lorem mauris, fringilla in aliquam at, euismod in lectus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. In non lorem sit amet elit placerat maximus. Pellentesque aliquam maximus risus, vel sed vehicula.

-
- - -
-

Work

- -

Adipiscing magna sed dolor elit. Praesent eleifend dignissim arcu, at eleifend sapien imperdiet ac. Aliquam erat volutpat. Praesent urna nisi, fringila lorem et vehicula lacinia quam. Integer sollicitudin mauris nec lorem luctus ultrices.

-

Nullam et orci eu lorem consequat tincidunt vivamus et sagittis libero. Mauris aliquet magna magna sed nunc rhoncus pharetra. Pellentesque condimentum sem. In efficitur ligula tate urna. Maecenas laoreet massa vel lacinia pellentesque lorem ipsum dolor. Nullam et orci eu lorem consequat tincidunt. Vivamus et sagittis libero. Mauris aliquet magna magna sed nunc rhoncus amet feugiat tempus.

-
- - -
-

About

- -

Lorem ipsum dolor sit amet, consectetur et adipiscing elit. Praesent eleifend dignissim arcu, at eleifend sapien imperdiet ac. Aliquam erat volutpat. Praesent urna nisi, fringila lorem et vehicula lacinia quam. Integer sollicitudin mauris nec lorem luctus ultrices. Aliquam libero et malesuada fames ac ante ipsum primis in faucibus. Cras viverra ligula sit amet ex mollis mattis lorem ipsum dolor sit amet.

-
-

Contact

@@ -324,21 +301,4 @@ print 'It took ' + i + ' iterations to sort the deck.';
- -
- -
- - - - -
- - - - - - - - - +{{ partial "footer.html" . }} From ff46ccae8b1aa124fffaa87c86abf6e24012a979 Mon Sep 17 00:00:00 2001 From: rac2030 Date: Tue, 28 Feb 2017 04:36:18 +0100 Subject: [PATCH 03/11] fixed, reworked and simplyfied and added example content in markdown --- archetypes/article.md | 5 - archetypes/default.md | 1 + exampleSite/content/{article => }/about.md | 4 +- exampleSite/content/contact.md | 25 ++ exampleSite/content/elements.md | 250 ++++++++++++++++ exampleSite/content/formspree.md | 40 +++ exampleSite/content/{article => }/intro.md | 4 +- exampleSite/content/{article => }/work.md | 4 +- .../{article => _default}/onepagestyle.html | 0 layouts/index.html | 271 ------------------ layouts/partials/footer.html | 1 - layouts/partials/header.html | 2 + layouts/shortcodes/gmaps.html | 1 + layouts/shortcodes/socialLinks.html | 5 + layouts/sitemap.xml | 8 + 15 files changed, 335 insertions(+), 286 deletions(-) delete mode 100644 archetypes/article.md rename exampleSite/content/{article => }/about.md (82%) create mode 100644 exampleSite/content/contact.md create mode 100644 exampleSite/content/elements.md create mode 100644 exampleSite/content/formspree.md rename exampleSite/content/{article => }/intro.md (91%) rename exampleSite/content/{article => }/work.md (87%) rename layouts/{article => _default}/onepagestyle.html (100%) create mode 100644 layouts/shortcodes/gmaps.html create mode 100644 layouts/shortcodes/socialLinks.html create mode 100644 layouts/sitemap.xml diff --git a/archetypes/article.md b/archetypes/article.md deleted file mode 100644 index 17a8ced..0000000 --- a/archetypes/article.md +++ /dev/null @@ -1,5 +0,0 @@ -+++ -id = "" -weight = 0 -menu = "main" -+++ diff --git a/archetypes/default.md b/archetypes/default.md index ac36e06..fb596f9 100644 --- a/archetypes/default.md +++ b/archetypes/default.md @@ -1,2 +1,3 @@ +++ +id = "" +++ diff --git a/exampleSite/content/article/about.md b/exampleSite/content/about.md similarity index 82% rename from exampleSite/content/article/about.md rename to exampleSite/content/about.md index 34219b3..de3d163 100644 --- a/exampleSite/content/article/about.md +++ b/exampleSite/content/about.md @@ -1,9 +1,7 @@ +++ title = "About" id = "about" -weight = 20 -menu = "main" +++ - +{{< figure class="image main" src="/img/pic03.jpg" >}} Lorem ipsum dolor sit amet, consectetur et adipiscing elit. Praesent eleifend dignissim arcu, at eleifend sapien imperdiet ac. Aliquam erat volutpat. Praesent urna nisi, fringila lorem et vehicula lacinia quam. Integer sollicitudin mauris nec lorem luctus ultrices. Aliquam libero et malesuada fames ac ante ipsum primis in faucibus. Cras viverra ligula sit amet ex mollis mattis lorem ipsum dolor sit amet. diff --git a/exampleSite/content/contact.md b/exampleSite/content/contact.md new file mode 100644 index 0000000..8a0bbe8 --- /dev/null +++ b/exampleSite/content/contact.md @@ -0,0 +1,25 @@ ++++ +title = "Contact" +id = "contact" ++++ + +
+
+ + +
+
+ + +
+
+ + +
+
    +
  • +
  • +
+
+ +{{< socialLinks >}} \ No newline at end of file diff --git a/exampleSite/content/elements.md b/exampleSite/content/elements.md new file mode 100644 index 0000000..c72648d --- /dev/null +++ b/exampleSite/content/elements.md @@ -0,0 +1,250 @@ ++++ +title = "Elements" +id = "elements" ++++ + +

Hugo shortcodes in theme

+ +{‌{< socialLinks >}} will get into {{< socialLinks >}} configured in config.toml. + +{‌{< gmaps pb="\" >}} will get a google map +{{< gmaps pb="!1m18!1m12!1m3!1d86456.59681285016!2d8.466675323953403!3d47.377433669132884!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x47900b9749bea219%3A0xe66e8df1e71fdc03!2zWsO8cmljaA!5e0!3m2!1sde!2sch!4v1488248947910" >}} + +To get the pb parameter value, search the desired place on google maps and click the share button and copy/paste the pb parameter out of the iframe code. + +

Text

+ +This is **bold** and this is __strong__. This is *italic* and this is _emphasized_. +This is superscript text and this is subscript text. +This is underlined and this is code: for (;;) { ... }. +Finally, [this is a link to a markdown cheatsheet](https://beegit.com/markdown-cheat-sheet). + +> Not all markdown syntax is allowed but you can mix most html tags into the markdown text. + +--- +## Heading Level 2 +### Heading Level 3 +#### Heading Level 4 +##### Heading Level 5 +###### Heading Level 6 +--- + +#### Blockquote +> Fringilla nisl. Donec accumsan interdum nisi, quis tincidunt felis sagittis eget tempus euismod. Vestibulum ante ipsum primis in faucibus vestibulum. Blandit adipiscing eu felis iaculis volutpat ac adipiscing accumsan faucibus. Vestibulum ante ipsum primis in faucibus lorem ipsum dolor sit amet nullam adipiscing eu felis. + +#### Preformatted + + i = 0; + + while (!deck.isInOrder()) { + print 'Iteration ' + i; + deck.shuffle(); + i++; + } + + print 'It took ' + i + ' iterations to sort the deck.'; + +

Lists

+ +#### Unordered +* Dolor pulvinar etiam. +* Sagittis adipiscing. +* Felis enim feugiat. + +#### Ordered +1. Dolor pulvinar etiam. +2. Etiam vel felis viverra. +3. Felis enim feugiat. +4. Dolor pulvinar etiam. +5. Etiam vel felis lorem. +6. Felis enim et feugiat. + +#### Icons + + + +#### Actions + + + +

Table

+#### Default + +| Tables | Are | Cool | +| ------------- |:-------------:| -----:| +| col 3 is | right-aligned | $1600 | +| col 2 is | centered | $12 | +| zebra stripes | are neat | $1 | + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionPrice
Item OneAnte turpis integer aliquet porttitor.29.99
Item TwoVis ac commodo adipiscing arcu aliquet.19.99
Item Three Morbi faucibus arcu accumsan lorem.29.99
Item FourVitae integer tempus condimentum.19.99
Item FiveAnte turpis integer aliquet porttitor.29.99
100.00
+
+ +

Alternate

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescriptionPrice
Item OneAnte turpis integer aliquet porttitor.29.99
Item TwoVis ac commodo adipiscing arcu aliquet.19.99
Item Three Morbi faucibus arcu accumsan lorem.29.99
Item FourVitae integer tempus condimentum.19.99
Item FiveAnte turpis integer aliquet porttitor.29.99
100.00
+
+ + + +

Buttons

+ + + +
    +
  • Disabled
  • +
  • Disabled
  • +
+ + + +

Form

+
+
+ + +
+
+ + +
+
+ +
+ +
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
    +
  • +
  • +
+
+ diff --git a/exampleSite/content/formspree.md b/exampleSite/content/formspree.md new file mode 100644 index 0000000..ad5b52a --- /dev/null +++ b/exampleSite/content/formspree.md @@ -0,0 +1,40 @@ ++++ +title = "Formspree" +id = "formspree" ++++ + +
+
+ +
+
+ +
+
+ +
+
    +
  • +
  • +
+ + + +
+Thank you for your message + + + + +{{< socialLinks >}} diff --git a/exampleSite/content/article/intro.md b/exampleSite/content/intro.md similarity index 91% rename from exampleSite/content/article/intro.md rename to exampleSite/content/intro.md index 7a08dc2..8e4bac8 100644 --- a/exampleSite/content/article/intro.md +++ b/exampleSite/content/intro.md @@ -1,11 +1,9 @@ +++ title = "Intro" id = "intro" -weight = 0 -menu = "main" +++ - +{{< figure class="image main" src="/img/pic01.jpg" >}} Aenean ornare velit lacus, ac varius enim ullamcorper eu. Proin aliquam facilisis ante interdum congue. Integer mollis, nisl amet convallis, porttitor magna ullamcorper, amet egestas mauris. Ut magna finibus nisi nec lacinia. Nam maximus erat id euismod egestas. By the way, check out my [awesome work](#work). Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis dapibus rutrum facilisis. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Etiam tristique libero eu nibh porttitor fermentum. Nullam venenatis erat id vehicula viverra. Nunc ultrices eros ut ultricies condimentum. Mauris risus lacus, blandit sit amet venenatis non, bibendum vitae dolor. Nunc lorem mauris, fringilla in aliquam at, euismod in lectus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. In non lorem sit amet elit placerat maximus. Pellentesque aliquam maximus risus, vel sed vehicula. diff --git a/exampleSite/content/article/work.md b/exampleSite/content/work.md similarity index 87% rename from exampleSite/content/article/work.md rename to exampleSite/content/work.md index b2b21dd..cd66a88 100644 --- a/exampleSite/content/article/work.md +++ b/exampleSite/content/work.md @@ -1,11 +1,9 @@ +++ title = "Work" id = "work" -weight = 10 -menu = "main" +++ - +{{< figure class="image main" src="/img/pic02.jpg" >}} Adipiscing magna sed dolor elit. Praesent eleifend dignissim arcu, at eleifend sapien imperdiet ac. Aliquam erat volutpat. Praesent urna nisi, fringila lorem et vehicula lacinia quam. Integer sollicitudin mauris nec lorem luctus ultrices. Nullam et orci eu lorem consequat tincidunt vivamus et sagittis libero. Mauris aliquet magna magna sed nunc rhoncus pharetra. Pellentesque condimentum sem. In efficitur ligula tate urna. Maecenas laoreet massa vel lacinia pellentesque lorem ipsum dolor. Nullam et orci eu lorem consequat tincidunt. Vivamus et sagittis libero. Mauris aliquet magna magna sed nunc rhoncus amet feugiat tempus. diff --git a/layouts/article/onepagestyle.html b/layouts/_default/onepagestyle.html similarity index 100% rename from layouts/article/onepagestyle.html rename to layouts/_default/onepagestyle.html diff --git a/layouts/index.html b/layouts/index.html index c538f95..05ea6d9 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -28,277 +28,6 @@ {{ range .Data.Pages }} {{ .Render "onepagestyle"}} {{ end }} - - -
-

Contact

-
-
- - -
-
- - -
-
- - -
-
    -
  • -
  • -
-
-
    - {{ range .Site.Params.social }} -
  • {{ .medium }}
  • - {{ end }} -
-
- - -
-

Elements

- -
-

Text

-

This is bold and this is strong. This is italic and this is emphasized. - This is superscript text and this is subscript text. - This is underlined and this is code: for (;;) { ... }. Finally, this is a link.

-
-

Heading Level 2

-

Heading Level 3

-

Heading Level 4

-
Heading Level 5
-
Heading Level 6
-
-

Blockquote

-
Fringilla nisl. Donec accumsan interdum nisi, quis tincidunt felis sagittis eget tempus euismod. Vestibulum ante ipsum primis in faucibus vestibulum. Blandit adipiscing eu felis iaculis volutpat ac adipiscing accumsan faucibus. Vestibulum ante ipsum primis in faucibus lorem ipsum dolor sit amet nullam adipiscing eu felis.
-

Preformatted

-
i = 0;
-
-while (!deck.isInOrder()) {
-    print 'Iteration ' + i;
-    deck.shuffle();
-    i++;
-}
-
-print 'It took ' + i + ' iterations to sort the deck.';
-
- -
-

Lists

- -

Unordered

-
    -
  • Dolor pulvinar etiam.
  • -
  • Sagittis adipiscing.
  • -
  • Felis enim feugiat.
  • -
- -

Alternate

-
    -
  • Dolor pulvinar etiam.
  • -
  • Sagittis adipiscing.
  • -
  • Felis enim feugiat.
  • -
- -

Ordered

-
    -
  1. Dolor pulvinar etiam.
  2. -
  3. Etiam vel felis viverra.
  4. -
  5. Felis enim feugiat.
  6. -
  7. Dolor pulvinar etiam.
  8. -
  9. Etiam vel felis lorem.
  10. -
  11. Felis enim et feugiat.
  12. -
-

Icons

- - -

Actions

- - -
- -
-

Table

-

Default

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameDescriptionPrice
Item OneAnte turpis integer aliquet porttitor.29.99
Item TwoVis ac commodo adipiscing arcu aliquet.19.99
Item Three Morbi faucibus arcu accumsan lorem.29.99
Item FourVitae integer tempus condimentum.19.99
Item FiveAnte turpis integer aliquet porttitor.29.99
100.00
-
- -

Alternate

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameDescriptionPrice
Item OneAnte turpis integer aliquet porttitor.29.99
Item TwoVis ac commodo adipiscing arcu aliquet.19.99
Item Three Morbi faucibus arcu accumsan lorem.29.99
Item FourVitae integer tempus condimentum.19.99
Item FiveAnte turpis integer aliquet porttitor.29.99
100.00
-
-
- -
-

Buttons

- - - -
    -
  • Disabled
  • -
  • Disabled
  • -
-
- -
-

Form

-
-
- - -
-
- - -
-
- -
- -
-
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
    -
  • -
  • -
-
-
- -
- {{ partial "footer.html" . }} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 6e521b8..d6705a1 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -9,7 +9,6 @@
- diff --git a/layouts/partials/header.html b/layouts/partials/header.html index f2f6656..3eed835 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -13,4 +13,6 @@ + + \ No newline at end of file diff --git a/layouts/shortcodes/gmaps.html b/layouts/shortcodes/gmaps.html new file mode 100644 index 0000000..8eacd62 --- /dev/null +++ b/layouts/shortcodes/gmaps.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/layouts/shortcodes/socialLinks.html b/layouts/shortcodes/socialLinks.html new file mode 100644 index 0000000..a4077e5 --- /dev/null +++ b/layouts/shortcodes/socialLinks.html @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/layouts/sitemap.xml b/layouts/sitemap.xml new file mode 100644 index 0000000..de6d2e3 --- /dev/null +++ b/layouts/sitemap.xml @@ -0,0 +1,8 @@ + +{{ $baseURL := .Site.BaseURL }} + {{ range sort .Site.Menus.main }} + + {{ $baseURL }}{{ .URL }} + + {{ end }} + From 8dea7799c149987dfd7a8d9d8af7a778274da3c0 Mon Sep 17 00:00:00 2001 From: rac2030 Date: Tue, 28 Feb 2017 04:44:08 +0100 Subject: [PATCH 04/11] Removed existing mail and placed a dummy mail to be replaced --- exampleSite/content/formspree.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exampleSite/content/formspree.md b/exampleSite/content/formspree.md index ad5b52a..2c4076f 100644 --- a/exampleSite/content/formspree.md +++ b/exampleSite/content/formspree.md @@ -3,7 +3,7 @@ title = "Formspree" id = "formspree" +++ -
+
From a93f586ddea0271fccb5be10fcb534eaaa671328 Mon Sep 17 00:00:00 2001 From: rac2030 Date: Tue, 28 Feb 2017 05:49:30 +0100 Subject: [PATCH 05/11] Added missing config.toml --- exampleSite/config.toml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 2f25303..94ab42a 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -29,3 +29,28 @@ theme = "dimension" medium = "github" icon = "github" link = "#" + +[[menu.main]] + name = "Intro" + weight = 10 + url = "#intro" +[[menu.main]] + name = "Work" + weight = 20 + url = "#work" +[[menu.main]] + name = "About" + weight = 30 + url = "#about" +[[menu.main]] + name = "Contact" + weight = 40 + url = "#contact" +[[menu.main]] + name = "Elements" + weight = 50 + url = "#elements" +[[menu.main]] + name = "Formspree" + weight = 60 + url = "#formspree" From 6d10f91047bcd2288a2ad0fe287caa3d9399fe89 Mon Sep 17 00:00:00 2001 From: Seth Date: Tue, 28 Feb 2017 01:12:38 -0500 Subject: [PATCH 06/11] Fixed front matter duplication. Edited default archetype. Fixed front matter duplication in index.html and sitemap.xml. --- archetypes/default.md | 3 ++- exampleSite/content/about.md | 3 ++- exampleSite/content/contact.md | 5 +++-- exampleSite/content/elements.md | 3 ++- exampleSite/content/formspree.md | 3 ++- exampleSite/content/intro.md | 3 ++- exampleSite/content/work.md | 3 ++- layouts/index.html | 4 ++-- layouts/sitemap.xml | 4 ++-- 9 files changed, 19 insertions(+), 12 deletions(-) diff --git a/archetypes/default.md b/archetypes/default.md index fb596f9..3aca40f 100644 --- a/archetypes/default.md +++ b/archetypes/default.md @@ -1,3 +1,4 @@ +++ -id = "" +title = "" +weight = +++ diff --git a/exampleSite/content/about.md b/exampleSite/content/about.md index de3d163..0643b51 100644 --- a/exampleSite/content/about.md +++ b/exampleSite/content/about.md @@ -1,6 +1,7 @@ +++ title = "About" -id = "about" +weight = 30 +draft = false +++ {{< figure class="image main" src="/img/pic03.jpg" >}} diff --git a/exampleSite/content/contact.md b/exampleSite/content/contact.md index 8a0bbe8..b7bbdec 100644 --- a/exampleSite/content/contact.md +++ b/exampleSite/content/contact.md @@ -1,6 +1,7 @@ +++ title = "Contact" -id = "contact" +weight = 40 +draft = false +++ @@ -22,4 +23,4 @@ id = "contact" -{{< socialLinks >}} \ No newline at end of file +{{< socialLinks >}} diff --git a/exampleSite/content/elements.md b/exampleSite/content/elements.md index c72648d..0690138 100644 --- a/exampleSite/content/elements.md +++ b/exampleSite/content/elements.md @@ -1,6 +1,7 @@ +++ title = "Elements" -id = "elements" +weight = 50 +draft = true +++

Hugo shortcodes in theme

diff --git a/exampleSite/content/formspree.md b/exampleSite/content/formspree.md index 2c4076f..1bedd88 100644 --- a/exampleSite/content/formspree.md +++ b/exampleSite/content/formspree.md @@ -1,6 +1,7 @@ +++ title = "Formspree" -id = "formspree" +weight = 60 +draft = true +++
diff --git a/exampleSite/content/intro.md b/exampleSite/content/intro.md index 8e4bac8..b0fc135 100644 --- a/exampleSite/content/intro.md +++ b/exampleSite/content/intro.md @@ -1,6 +1,7 @@ +++ title = "Intro" -id = "intro" +weight = 10 +draft = false +++ {{< figure class="image main" src="/img/pic01.jpg" >}} diff --git a/exampleSite/content/work.md b/exampleSite/content/work.md index cd66a88..37f205d 100644 --- a/exampleSite/content/work.md +++ b/exampleSite/content/work.md @@ -1,6 +1,7 @@ +++ title = "Work" -id = "work" +weight = 20 +draft = false +++ {{< figure class="image main" src="/img/pic02.jpg" >}} diff --git a/layouts/index.html b/layouts/index.html index 05ea6d9..8308d2c 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -16,8 +16,8 @@ diff --git a/layouts/sitemap.xml b/layouts/sitemap.xml index de6d2e3..b8ed7e8 100644 --- a/layouts/sitemap.xml +++ b/layouts/sitemap.xml @@ -1,8 +1,8 @@ {{ $baseURL := .Site.BaseURL }} - {{ range sort .Site.Menus.main }} + {{ range sort .Data.Pages }} - {{ $baseURL }}{{ .URL }} + {{ $baseURL }}#{{ .File.BaseFileName }} {{ end }} From abcfbd4ff177f0c07f4e97394dcda2a4b4f871fb Mon Sep 17 00:00:00 2001 From: Seth Date: Tue, 28 Feb 2017 01:13:22 -0500 Subject: [PATCH 07/11] Added draft toggle to default archetype --- archetypes/default.md | 1 + 1 file changed, 1 insertion(+) diff --git a/archetypes/default.md b/archetypes/default.md index 3aca40f..0438ffd 100644 --- a/archetypes/default.md +++ b/archetypes/default.md @@ -1,4 +1,5 @@ +++ title = "" weight = +draft = false +++ From 7b9cc04b9b4c137e61157e00a72338e429b39de5 Mon Sep 17 00:00:00 2001 From: Seth Date: Tue, 28 Feb 2017 01:35:09 -0500 Subject: [PATCH 08/11] Removed menu from config --- exampleSite/config.toml | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 94ab42a..2f25303 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -29,28 +29,3 @@ theme = "dimension" medium = "github" icon = "github" link = "#" - -[[menu.main]] - name = "Intro" - weight = 10 - url = "#intro" -[[menu.main]] - name = "Work" - weight = 20 - url = "#work" -[[menu.main]] - name = "About" - weight = 30 - url = "#about" -[[menu.main]] - name = "Contact" - weight = 40 - url = "#contact" -[[menu.main]] - name = "Elements" - weight = 50 - url = "#elements" -[[menu.main]] - name = "Formspree" - weight = 60 - url = "#formspree" From 38eded55444fe4ed83dcb44565da11a15f15e6be Mon Sep 17 00:00:00 2001 From: Seth Date: Tue, 28 Feb 2017 01:53:58 -0500 Subject: [PATCH 09/11] Fixed article id --- layouts/_default/onepagestyle.html | 4 ++-- layouts/index.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/layouts/_default/onepagestyle.html b/layouts/_default/onepagestyle.html index a6dca03..74d5e49 100644 --- a/layouts/_default/onepagestyle.html +++ b/layouts/_default/onepagestyle.html @@ -1,4 +1,4 @@ -
+

{{ .Title }}

{{ .Content }} -
\ No newline at end of file +
diff --git a/layouts/index.html b/layouts/index.html index 8308d2c..ca3ab9c 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -26,7 +26,7 @@
{{ range .Data.Pages }} - {{ .Render "onepagestyle"}} + {{ .Render "onepagestyle" }} {{ end }}
From 8390b1b33a4d0aafc4d86115cc585c58a49741b0 Mon Sep 17 00:00:00 2001 From: Seth Date: Tue, 28 Feb 2017 02:21:23 -0500 Subject: [PATCH 10/11] Weight requires a value. Set default to 0. Removed title so Hugo will generate title automatically. --- archetypes/default.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/archetypes/default.md b/archetypes/default.md index 0438ffd..40d517a 100644 --- a/archetypes/default.md +++ b/archetypes/default.md @@ -1,5 +1,4 @@ +++ -title = "" -weight = draft = false +weight = 0 +++ From 00df626d7b53f0eb003c75f77a0a44a84d087b13 Mon Sep 17 00:00:00 2001 From: Seth Date: Wed, 1 Mar 2017 08:38:51 -0500 Subject: [PATCH 11/11] Updated README --- README.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index bc8e1e7..2ac5115 100644 --- a/README.md +++ b/README.md @@ -23,15 +23,21 @@ You can change the logo as well with font-awesome icons. The default is set to ` ### Changing pictures -Create an `img` folder in the static folder of your site -- **not** the theme's static folder. Add pictures to `/static/img` as needed. The background image should be named `bg.jpg`. The default names for the other images are `pic01.jpg`, `pic02.jpg`, and `pic03.jpg`, but you may use your own naming scheme when you edit `index.html`. +Create an `img` folder in the static folder of your site -- **not** the theme's static folder. Add pictures to `/static/img` as needed. If you want to change the background image, the replacement image should be named `bg.jpg`. ### Writing your pages -Since this theme uses modals instead of separate content pages, it is best to simply edit the `index.html` file to edit your site. Copy the `index.html` file to your `layouts` folder before editing. Follow the example pages in the `index.html` file and adjust as needed. +To create a new page, run the following command inside your Hugo sites: + + $ hugo new your-page.md + +Change `your-page` to what you want to name the file. There are three variables that you can change: `title`, `weight`, and `draft`. Weight is set to 0 by default, so be sure to change it. + +You can also copy the pages from the exampleSite folder and modify those pages. ### Contact Form -You will need to use an external service for the contact form since static sites cannot handle forms on their own. One such service is [Formspree](https://formspree.io/). Formspree has a free tier. +You will need to use an external service for the contact form since static sites cannot handle forms on their own. One such service is [Formspree](https://formspree.io/). Formspree has a free tier. Check out the `formspree.md` page in the exampleSite folder for a template. ## License