:EXPORT_HUGO_CUSTOM_FRONT_MATTER+: :header /img/org.png
:END:
This article explains in detail the process of setting up a bare-bones website
:EXPORT_HUGO_CUSTOM_FRONT_MATTER+: :header /img/org.png
:END:
This article explains in detail the process of setting up a bare-bones website
skill level a strong foundation to apply their own knowledge and techniques to
the Emacs-Hugo toolchain.
I assume only beginner-level knowledge of Emacs.
*** Intro & Setup
skill level a strong foundation to apply their own knowledge and techniques to
the Emacs-Hugo toolchain.
I assume only beginner-level knowledge of Emacs.
*** Intro & Setup
-[[https://github.com/kaushalmodi][Kaushal Modi]] made ox-hugo by extending org's ox-blackfriday package, providing
-an impressive amount of features for organizing blog text and linked data with
+[[https://github.com/kaushalmodi][Kaushal Modi]] created ox-hugo on top of his ox-blackfriday package, providing an
+impressive amount of features for organizing blog text and linked data with
Hugo. He maintains [[https://ox-hugo.scripter.co/][great documentation]] and ample [[https://github.com/kaushalmodi/ox-hugo/tree/master/test/site/content-org][examples]] for using the
package. I will explain my own workflow here, but for an exhaustive (though
Hugo. He maintains [[https://ox-hugo.scripter.co/][great documentation]] and ample [[https://github.com/kaushalmodi/ox-hugo/tree/master/test/site/content-org][examples]] for using the
package. I will explain my own workflow here, but for an exhaustive (though
-terse) reference, I highly recommend Modi's [[https://ox-hugo.scripter.co/test/][test site]] and [[https://raw.githubusercontent.com/kaushalmodi/ox-hugo/master/test/site/content-org/all-posts.org][post source]] org file,
+terse) reference, I highly recommend Modi's [[https://ox-hugo.scripter.co/test/][test site]] and [[https://raw.githubusercontent.com/kaushalmodi/ox-hugo/master/test/site/content-org/all-posts.org][post source]] Org file,
which contain demonstrations and tests for all of ox-hugo's features.
After issuing the Emacs command ~M-x package-install RET ox-hugo RET~, you'll
need to ~require~ it. You can do this by running ~M-: (require 'ox-hugo)~, but
you'll want to add it to your configuration as explained [[https://ox-hugo.scripter.co/doc/usage/][here]]. Once this is
which contain demonstrations and tests for all of ox-hugo's features.
After issuing the Emacs command ~M-x package-install RET ox-hugo RET~, you'll
need to ~require~ it. You can do this by running ~M-: (require 'ox-hugo)~, but
you'll want to add it to your configuration as explained [[https://ox-hugo.scripter.co/doc/usage/][here]]. Once this is
content. Org's format is very straightforward, and is designed to make sense to
the reader even if they're unfamiliar with the formal syntax. For instance,
#+begin_src org
content. Org's format is very straightforward, and is designed to make sense to
the reader even if they're unfamiliar with the formal syntax. For instance,
#+begin_src org
| Brussel Sprouts | 32 | 4 | 0 | 36 |
#+TBLFM: @2$5=vsum($2..$4)::@3$5=vsum($2..$4)::@4$5=vsum($2..$4)
| Brussel Sprouts | 32 | 4 | 0 | 36 |
#+TBLFM: @2$5=vsum($2..$4)::@3$5=vsum($2..$4)::@4$5=vsum($2..$4)
-If you're already familiar with org-mode, the benefits are obvious and creating
-content is fairly trivial. Org-mode is, however, a complex and expansive program
+If you're already familiar with Org mode, the benefits are obvious and creating
+content is fairly trivial. Org mode is, however, a complex and expansive program
with many features, and its learning curve can appear daunting at first glance.
Using ox-hugo is a great way to learn the format, since it gives the author a
command-center view of their entire content hierarchy, much like a traditional
database, but in a flat format that's much easier to read and understand. Org
features present themselves naturally, and the author can easily visualize the
with many features, and its learning curve can appear daunting at first glance.
Using ox-hugo is a great way to learn the format, since it gives the author a
command-center view of their entire content hierarchy, much like a traditional
database, but in a flat format that's much easier to read and understand. Org
features present themselves naturally, and the author can easily visualize the
cool!" and you should find this very paragraph.
Eventually you'll want to [[https://orgmode.org/manual/][read the manual]], though. You may access it in Emacs
with ~M-x org-info~.
*** Making a New Blog
cool!" and you should find this very paragraph.
Eventually you'll want to [[https://orgmode.org/manual/][read the manual]], though. You may access it in Emacs
with ~M-x org-info~.
*** Making a New Blog
needs to properly export data is a ~:PROPERTIES: ... :END:~ block with
definitions used for Hugo's [[https://gohugo.io/content-management/front-matter/][front matter]] (used for associating a title, header,
or other custom data with the page it generates). ~:PROPERTIES:~ blocks are
needs to properly export data is a ~:PROPERTIES: ... :END:~ block with
definitions used for Hugo's [[https://gohugo.io/content-management/front-matter/][front matter]] (used for associating a title, header,
or other custom data with the page it generates). ~:PROPERTIES:~ blocks are
many such ways. Providing an ~:EXPORT_FILE_NAME:~ definition signals to ox-hugo
that this heading is available for export, and that it should be exported to a
markdown file with the name provided. For example, the ~:PROPERTIES:~ block of
many such ways. Providing an ~:EXPORT_FILE_NAME:~ definition signals to ox-hugo
that this heading is available for export, and that it should be exported to a
markdown file with the name provided. For example, the ~:PROPERTIES:~ block of
identifies the Hugo project's root directory. This path definition is required
for any valid ox-hugo file, and in the example above uses ~.~ as the base
directory, which assumes that the file will be placed in the hugo project's base
identifies the Hugo project's root directory. This path definition is required
for any valid ox-hugo file, and in the example above uses ~.~ as the base
directory, which assumes that the file will be placed in the hugo project's base
exporter ~C-c C-e~ and selected the Hugo output ~H~ and the All Subtrees To
Files option ~A~, you'd wind up with the following files in your directory:
#+begin_src
exporter ~C-c C-e~ and selected the Hugo output ~H~ and the All Subtrees To
Files option ~A~, you'd wind up with the following files in your directory:
#+begin_src
files. Hereafter, making new blog posts is as simple as adding new sub-headings
under the "My Blog" heading, and exporting. As you can see, this is suitable for
defining the hierarchical structure of any general website, not just
files. Hereafter, making new blog posts is as simple as adding new sub-headings
under the "My Blog" heading, and exporting. As you can see, this is suitable for
defining the hierarchical structure of any general website, not just
well-structured that providing content is all that's required for a new page,
blog entry, or entirely new site section. If you can blog with ox-hugo, you can
deftly deploy any manner of web content, or even develop entire websites as
well-structured that providing content is all that's required for a new page,
blog entry, or entirely new site section. If you can blog with ox-hugo, you can
deftly deploy any manner of web content, or even develop entire websites as
2. simply ~rm -Rf content/~ to remove the content directory ox-hugo created,
then run ~hugo new site --force .~
3. don't even bother with the ~hugo new site~ command, and make a *config.toml*
2. simply ~rm -Rf content/~ to remove the content directory ox-hugo created,
then run ~hugo new site --force .~
3. don't even bother with the ~hugo new site~ command, and make a *config.toml*
HTML). You'll notice from this default output however that Hugo creates a
sitemap, and two directories for [[https://gohugo.io/content-management/taxonomies/][taxonomies]] that let you "tag" and "categorize"
content. The taxonomy index pages allow users to browse content by category or
HTML). You'll notice from this default output however that Hugo creates a
sitemap, and two directories for [[https://gohugo.io/content-management/taxonomies/][taxonomies]] that let you "tag" and "categorize"
content. The taxonomy index pages allow users to browse content by category or
automatically associated tagged headings with the tags taxonomy, or the
categories taxonomy if prefixed with an @ symbol. You are free to define your
own taxonomies, and even disable the default "tags" and "categories" taxonomies,
automatically associated tagged headings with the tags taxonomy, or the
categories taxonomy if prefixed with an @ symbol. You are free to define your
own taxonomies, and even disable the default "tags" and "categories" taxonomies,
taxonomies. Files like these are often useful to output as JSON (done by the
theme) to allow Javascript-driven dynamic search features, but a simpler scheme
can output HTML pages to browse taxonomies just as you would posts in a section
taxonomies. Files like these are often useful to output as JSON (done by the
theme) to allow Javascript-driven dynamic search features, but a simpler scheme
can output HTML pages to browse taxonomies just as you would posts in a section
-Once you have a basic site structured in your org file, you're ready to start
-throwing information in it. It is of course sufficient to open the org file and
-edit it, but most org-mode users prefer to automate /everything/, and being able
-to use org's capture feature to instantly populate new blog posts is extremely
+Once you have a basic site structured in your Org file, you're ready to start
+throwing information in it. It is of course sufficient to open the Org file and
+edit it, but most Org mode users prefer to automate /everything/, and being able
+to use Org's capture feature to instantly populate new blog posts is extremely
convenient.
The [[https://ox-hugo.scripter.co/][ox-hugo documentation]] provides succinct explanations on how to do this,
including elisp snippets for [[https://ox-hugo.scripter.co/doc/org-capture-setup/][capture setup]], [[https://ox-hugo.scripter.co/doc/images-in-content/][image linking]], and [[https://ox-hugo.scripter.co/doc/auto-export-on-saving/][automating
convenient.
The [[https://ox-hugo.scripter.co/][ox-hugo documentation]] provides succinct explanations on how to do this,
including elisp snippets for [[https://ox-hugo.scripter.co/doc/org-capture-setup/][capture setup]], [[https://ox-hugo.scripter.co/doc/images-in-content/][image linking]], and [[https://ox-hugo.scripter.co/doc/auto-export-on-saving/][automating
time, just save the file as usual with ~C-x C-s~).
** DONE I did a blog :blog:org:emacs:hugo:
CLOSED: [2018-04-06 Fri 18:29]
time, just save the file as usual with ~C-x C-s~).
** DONE I did a blog :blog:org:emacs:hugo:
CLOSED: [2018-04-06 Fri 18:29]
:EXPORT_HUGO_CUSTOM_FRONT_MATTER: :caption "Exporting to Hugo's Blackfriday Markdown from Orgmode"
:EXPORT_HUGO_CUSTOM_FRONT_MATTER+: :header /img/org.png
:END:
:EXPORT_HUGO_CUSTOM_FRONT_MATTER: :caption "Exporting to Hugo's Blackfriday Markdown from Orgmode"
:EXPORT_HUGO_CUSTOM_FRONT_MATTER+: :header /img/org.png
:END:
content generator [[https://gohugo.io/][Hugo]], which I use for this website. Today I integrated its
expectations about file structure into the Speedy theme for this blog, allowing
content generator [[https://gohugo.io/][Hugo]], which I use for this website. Today I integrated its
expectations about file structure into the Speedy theme for this blog, allowing
content for Hugo's excellent [[https://github.com/russross/blackfriday][blackfriday markdown parser]] (a markdown format with
many added features). Hugo does support limited parsing of org files internally,
content for Hugo's excellent [[https://github.com/russross/blackfriday][blackfriday markdown parser]] (a markdown format with
many added features). Hugo does support limited parsing of org files internally,
-but org-mode features like inline spreadsheets and system communication are
-beyond the scope of most external tools, so org-mode is best used as an
+but Org mode features like inline spreadsheets and system communication are
+beyond the scope of most external tools, so Org mode is best used as an
exporter. As an Emacs user, this allows me to instantly capture interesting
information I come across and publish it within seconds. Now I have no excuses!
exporter. As an Emacs user, this allows me to instantly capture interesting
information I come across and publish it within seconds. Now I have no excuses!
(Emacs), but to me it is the natural evolution of decades of careful work to do
things the right way. When a software developer, after much study and
deliberation, finally comes to the realization that we are all fundamentally
(Emacs), but to me it is the natural evolution of decades of careful work to do
things the right way. When a software developer, after much study and
deliberation, finally comes to the realization that we are all fundamentally
-Emacs and Org-mode take these philosophies to heart in different, and incomplete
-ways. Org-mode is a plain text formatting system, not so dissimilar to markdown,
+Emacs and Org mode take these philosophies to heart in different, and incomplete
+ways. Org mode is a plain text formatting system, not so dissimilar to markdown,
bbcode, or even twitter's automatic recognition of hashtags and @s. It's a
formatting engine that recognizes certain plain-text patterns as having special
meanings, geared eponymously towards organization of data. For instance,
bbcode, or even twitter's automatic recognition of hashtags and @s. It's a
formatting engine that recognizes certain plain-text patterns as having special
meanings, geared eponymously towards organization of data. For instance,
been around in some form since the early 70s, While I extend this philosophy to
my coding style, it's also integral
been around in some form since the early 70s, While I extend this philosophy to
my coding style, it's also integral