summaryrefslogtreecommitdiffstats
path: root/hugolib/permalinker.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-04-04 18:14:41 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-04-04 23:09:01 +0200
commit142558719324aa1628541d556ef1fa2d123f1e68 (patch)
tree7df0443f97c11105582af4a31a935d79d13eb752 /hugolib/permalinker.go
parenta883948c4fa6d6de9ef2912709b42655c4cead83 (diff)
hugolib: Add optional outputFormat to Ref/RelRef
Fixes #3224
Diffstat (limited to 'hugolib/permalinker.go')
-rw-r--r--hugolib/permalinker.go25
1 files changed, 25 insertions, 0 deletions
diff --git a/hugolib/permalinker.go b/hugolib/permalinker.go
new file mode 100644
index 000000000..5e7a13a02
--- /dev/null
+++ b/hugolib/permalinker.go
@@ -0,0 +1,25 @@
+// Copyright 2017-present The Hugo Authors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package hugolib
+
+var (
+ _ Permalinker = (*Page)(nil)
+ _ Permalinker = (*OutputFormat)(nil)
+)
+
+// Permalinker provides permalinks of both the relative and absolute kind.
+type Permalinker interface {
+ Permalink() string
+ RelPermalink() string
+}