From 63b4ff5322bcd58d58df572811cfeb0ab4c2432f Mon Sep 17 00:00:00 2001 From: Serghei Iakovlev Date: Sun, 8 May 2022 23:07:27 +0200 Subject: Update docs --- exampleSite/content/documentation/index.md | 18 ++++++++++-------- exampleSite/content/poem/o-captain.md | 30 ++++++++++++++---------------- layouts/shortcodes/br.html | 1 + layouts/shortcodes/indent.html | 2 ++ theme.toml | 9 +++++---- 5 files changed, 32 insertions(+), 28 deletions(-) create mode 100644 layouts/shortcodes/br.html create mode 100644 layouts/shortcodes/indent.html diff --git a/exampleSite/content/documentation/index.md b/exampleSite/content/documentation/index.md index 2e79da7..67ab099 100644 --- a/exampleSite/content/documentation/index.md +++ b/exampleSite/content/documentation/index.md @@ -41,7 +41,7 @@ Or, if you don't plan to make any significant changes but want to track and upda $ git submodule add https://github.com/sergeyklay/gohugo-theme-ed.git themes/ed ~~~ -At this point you should navigate inside your Ed project folder and stay there until further notice: +At this point you should navigate inside your site project folder and stay there until further notice: Next, open `config.toml` in the base of the Hugo site and ensure the theme option is set to `ed`: @@ -49,6 +49,8 @@ Next, open `config.toml` in the base of the Hugo site and ensure the theme optio theme = "ed" ~~~ +Take a look inside the `themes/ed/exampleSite` folder. You'll find a file called `config.toml`. Feel free to use it as a reference for your site's configuration. + If you don't get any errors, Ed should work at this point. To see if Ed is working properly we will take advantage of Hugo's built in server. You can build the first version of your site and run the Hugo server at the same time by entering: ~~~ bash @@ -89,7 +91,7 @@ By default Hugo uses a special Markdown processor called Goldmark. The processor ## Genres -Ed offers three different layouts: poem, narrative and drama. The genre is indicated in the YAML front matter on your texts. The templates that govern how these genres are displayed can be found in the `_layouts` folder. Using these layouts will allow you to tweak the stylesheets according to your different needs. Out of the box, Ed contains some special instructions for poetry in its stylesheets that allow you to deal with some of the peculiarities of poetry layouts. +Ed offers three different layouts: poem, narrative and drama. The genre is indicated in the YAML front matter on your texts. The templates that govern how these genres are displayed can be found in the `layouts` folder. Redefining these layouts will allow you to tweak the stylesheets according to your different needs. Out of the box, Ed contains some special instructions for poetry in its stylesheets that allow you to deal with some of the peculiarities of poetry layouts. To indicate lines in poetry we use the line syntax from Markdown: @@ -107,13 +109,13 @@ To indicate lines in poetry we use the line syntax from Markdown: To indent specific lines we take advantage of a feature in kramdown that allows us to indicate classes for a line. This approach still allows the line to be readable while editing. ~~~ markdown -- {:.indent-3} But O heart! heart! heart! -- {:.indent-4} O the bleeding drops of red, -- {:.indent-5} Where on the deck my Captain lies, -- {:.indent-6} Fallen cold and dead. +- {{}} But O heart! heart! heart! +- {{}} O the bleeding drops of red, +- {{}} Where on the deck my Captain lies, +- {{}} Fallen cold and dead. ~~~ -The `-` at the beginning of each line indicates that these are lines. The `{:.indent-3}` is what we need to in order to indicate the indent value for that line. Values can range from 1-10. You can expand the range or adjust the values in the Ed stylesheet (`_ed.scss`) in the `_sass` folder. +The `-` at the beginning of each line indicates that these are lines. The `{{}}` is what we need to in order to indicate the indent value for that line. Values can range from 1-10. You can expand the range or adjust the values in the custom stylesheet file (`assets/css/extended/*.css`). The example from Raisin in the Sun shows us that we don't need much special markup for theater as long as we use CAPITAL LETTERS for speakers. Italics for directions are easy enough. Just use `*` around the words you want to italicize. @@ -161,7 +163,7 @@ Notice the double HTML Entity (hex), `↩︎`, used at the end of the ## Blockquotes -*Narrative of the Life* also includes several blockquotes. You can also find another example of blockquote use in the footnote of "O Captain! My Captain!" Simple blockquotes are simple enough in kramdown: +*Narrative of the Life* also includes several blockquotes. You can also find another example of blockquote use in the footnote of "O Captain! My Captain!" Simple blockquotes are simple enough in Markdown: ~~~ > This is to certify that I, the undersigned, have given the bearer, my servant, full liberty to go to Baltimore, and spend the Easter holidays. diff --git a/exampleSite/content/poem/o-captain.md b/exampleSite/content/poem/o-captain.md index 1a4abc8..bfdb4c0 100644 --- a/exampleSite/content/poem/o-captain.md +++ b/exampleSite/content/poem/o-captain.md @@ -12,31 +12,29 @@ source: Poetry Foundation - The ship has weather’d every rack, the prize we sought is won, - The port is near, the bells I hear, the people all exulting, - While follow eyes the steady keel, the vessel grim and daring; -- {:.indent-3}But O heart! heart! heart! -- {:.indent-4}O the bleeding drops of red, -- {:.indent-5}Where on the deck my Captain lies, -- {:.indent-6}Fallen cold and dead. - +- {{< indent 3 >}}But O heart! heart! heart! +- {{< indent 4 >}}O the bleeding drops of red, +- {{< indent 5 >}}Where on the deck my Captain lies, +- {{< indent 6 >}}Fallen cold and dead. +- {{< br >}} - O Captain! my Captain! rise up and hear the bells; - Rise up—for you the flag is flung—for you the bugle[^2] trills, - For you bouquets and ribbon’d wreaths—for you the shores a-crowding, - For you they call, the swaying mass, their eager faces turning; -- {:.indent-3}Here Captain! dear father! -- {:.indent-4}This arm beneath your head! -- {:.indent-5}It is some dream that on the deck, -- {:.indent-6}You’ve fallen cold and dead. - - +- {{< indent 3 >}}Here Captain! dear father! +- {{< indent 4 >}}This arm beneath your head! +- {{< indent 5 >}}It is some dream that on the deck, +- {{< indent 6 >}}You’ve fallen cold and dead. +- {{< br >}} - My Captain does not answer, his lips are pale and still,[^3] - My father does not feel my arm, he has no pulse nor will, - The ship is anchor’d safe and sound, its voyage closed and done, - From fearful trip the victor ship comes in with object won; -- {:.indent-3}Exult O shores, and ring O bells! -- {:.indent-4}But I with mournful tread, -- {:.indent-5}Walk the deck my Captain lies, -- {:.indent-6}Fallen cold and dead. +- {{< indent 3 >}}Exult O shores, and ring O bells! +- {{< indent 4 >}}But I with mournful tread, +- {{< indent 5 >}}Walk the deck my Captain lies, +- {{< indent 6 >}}Fallen cold and dead. -
--- diff --git a/layouts/shortcodes/br.html b/layouts/shortcodes/br.html new file mode 100644 index 0000000..0ca25d9 --- /dev/null +++ b/layouts/shortcodes/br.html @@ -0,0 +1 @@ +
diff --git a/layouts/shortcodes/indent.html b/layouts/shortcodes/indent.html new file mode 100644 index 0000000..b8a9584 --- /dev/null +++ b/layouts/shortcodes/indent.html @@ -0,0 +1,2 @@ +{{ $size := .Get 0 -}} +  diff --git a/theme.toml b/theme.toml index 9f3ee08..6e6bd3f 100644 --- a/theme.toml +++ b/theme.toml @@ -4,7 +4,7 @@ licenselink = "https://github.com/sergeyklay/gohugo-theme-ed/blob/master/LICENSE description = "Ed theme for minimal editions, based on Alex Gil theme" # The home page of the theme, where the source can be found. -homepage = "https://github.com/sergeyklay/gohugo-theme-ed" +homepage = "https://github.com/sergeyklay/gohugo-theme-ed/" # If you have a running demo of the theme. demosite = "https://sergeyklay.github.io/gohugo-theme-ed/" @@ -24,6 +24,7 @@ tags = [ # The theme's features: features = [ "blog", + "shortcodes", "responsive", "posts", "opengraph", @@ -43,10 +44,10 @@ min_version = "0.84.0" # If the theme has a single author. [author] name = "Serghei Iakovlev" - homepage = "https://serghei.blog" + homepage = "https://serghei.blog/" # If porting an existing theme. [original] author = "Alex Gil" - homepage = "https://www.elotroalex.com" - repo = "https://github.com/minicomp/ed" + homepage = "https://www.elotroalex.com/" + repo = "https://github.com/minicomp/ed/" -- cgit v1.2.3