parent
63dc10f54c
commit
bd20274fff
10 changed files with 113 additions and 0 deletions
@ -0,0 +1,15 @@ |
||||
#+DATE: July 6, 2017 |
||||
|
||||
* How to compile the site |
||||
1. Be the root directory for this Hugo site (the directory containing =config.toml=). |
||||
2. Run "hugo server --port 1111" |
||||
3. See the site served on "http://localhost:1111/" |
||||
* Source blog posts in Org |
||||
Location: =<HUGO_BASE_DIR>/content-org/= |
||||
|
||||
The directory does not have to be =content-org=, but it has to be |
||||
outside the =hugo= Contents dir =content/=. |
||||
* Tested to work on |
||||
- hugo v0.25-DEV updated today |
||||
- org master updated today |
||||
- emacs master updated today |
||||
@ -0,0 +1,5 @@ |
||||
+++ |
||||
title = "{{ replace .TranslationBaseName "-" " " | title }}" |
||||
date = {{ .Date }} |
||||
draft = true |
||||
+++ |
||||
@ -0,0 +1,4 @@ |
||||
baseURL = "http://example.org/" |
||||
languageCode = "en-us" |
||||
title = "My Org-exported Hugo Site" |
||||
theme = "bare_min" |
||||
@ -0,0 +1,25 @@ |
||||
#+HUGO_BASE_DIR: ../ |
||||
|
||||
* Preparation |
||||
:PROPERTIES: |
||||
:EXPORT_FILE_NAME: prep |
||||
:END: |
||||
1. Be the root directory for this Hugo site (the directory containing |
||||
=config.toml=). |
||||
2. Run |
||||
#+BEGIN_EXAMPLE |
||||
hugo server --port 1111 |
||||
#+END_EXAMPLE |
||||
3. See the site served on "http://localhost:1111/" |
||||
* Post 1 |
||||
:PROPERTIES: |
||||
:EXPORT_FILE_NAME: post-1 |
||||
:END: |
||||
Export this *first* post only by moving point here and doing =C-c C-e |
||||
H H=. |
||||
* Post 2 |
||||
:PROPERTIES: |
||||
:EXPORT_FILE_NAME: post-2 |
||||
:END: |
||||
Export this *second* post only by moving point here and doing =C-c C-e |
||||
H H=. |
||||
@ -0,0 +1,7 @@ |
||||
+++ |
||||
title = "Post 1" |
||||
date = 2017-07-06T15:39:06-04:00 |
||||
tags = [] |
||||
+++ |
||||
|
||||
Export this **first** post only by moving point here and doing `C-c C-e H H`. |
||||
@ -0,0 +1,7 @@ |
||||
+++ |
||||
title = "Post 2" |
||||
date = 2017-07-06T15:39:10-04:00 |
||||
tags = [] |
||||
+++ |
||||
|
||||
Export this **second** post only by moving point here and doing `C-c C-e H H`. |
||||
@ -0,0 +1,11 @@ |
||||
+++ |
||||
title = "Preparation" |
||||
date = 2017-07-06T15:38:08-04:00 |
||||
tags = [] |
||||
+++ |
||||
|
||||
1. Be the root directory for this Hugo site (the directory containing `config.toml`). |
||||
2. Run |
||||
|
||||
hugo server --port 1111 |
||||
3. See the site served on “<http://localhost:1111/>” |
||||
@ -0,0 +1,21 @@ |
||||
<!DOCTYPE html> |
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us"> |
||||
|
||||
<head> |
||||
<link href="http://gmpg.org/xfn/11" rel="profile"> |
||||
<meta charset="utf-8"> |
||||
<title> |
||||
{{ if eq .URL "/" }} |
||||
{{ .Site.Title }} |
||||
{{ else }} |
||||
{{ .Title }} ❚ {{ .Site.Title }} |
||||
{{ end }} |
||||
</title> |
||||
</head> |
||||
|
||||
<body lang="en"> |
||||
|
||||
{{ block "main" . }}{{ end }} |
||||
|
||||
</body> |
||||
</html> |
||||
@ -0,0 +1,10 @@ |
||||
{{ define "main" }} |
||||
|
||||
<div class="posts"> |
||||
<!-- http://justindunham.net/blog-bells-and-whistles-in-hugo/ --> |
||||
{{ range (.Paginator 10).Pages }} |
||||
{{ .Render "single"}} <!-- Use layouts/post/summary.html --> |
||||
{{ end }} |
||||
</div> |
||||
|
||||
{{ end }} |
||||
@ -0,0 +1,8 @@ |
||||
{{ define "main" }} |
||||
|
||||
<div class="post"> |
||||
<h1 class="post-title">{{ .Title }}</h1> |
||||
{{ .Content }} |
||||
</div> |
||||
|
||||
{{ end }} |
||||
Loading…
Reference in new issue