You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by mw...@apache.org on 2019/04/23 19:19:01 UTC
[accumulo-website] branch master updated: Created ghc tag to link
to GitHub code (#170)
This is an automated email from the ASF dual-hosted git repository.
mwalch pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/accumulo-website.git
The following commit(s) were added to refs/heads/master by this push:
new 15c6a2c Created ghc tag to link to GitHub code (#170)
15c6a2c is described below
commit 15c6a2cc819ba1af683e5c9c413caf7878805a52
Author: Mike Walch <mw...@apache.org>
AuthorDate: Tue Apr 23 15:18:56 2019 -0400
Created ghc tag to link to GitHub code (#170)
* Added links to example configuration files
---
_config.yml | 1 +
_docs-2/configuration/files.md | 30 +++++++++++++++++-------------
_plugins/links.rb | 18 ++++++++++++++++++
3 files changed, 36 insertions(+), 13 deletions(-)
diff --git a/_config.yml b/_config.yml
index 9998ce4..b5e607c 100644
--- a/_config.yml
+++ b/_config.yml
@@ -72,6 +72,7 @@ defaults:
docs_baseurl: "/docs/2.x"
javadoc_base: "https://static.javadoc.io/org.apache.accumulo"
skiph1fortitle: "true"
+ gh_branch: "master"
#whitelist: [jekyll-redirect-from]
#plugins_dir: ./_plugins
diff --git a/_docs-2/configuration/files.md b/_docs-2/configuration/files.md
index a9558d5..541b981 100644
--- a/_docs-2/configuration/files.md
+++ b/_docs-2/configuration/files.md
@@ -9,17 +9,19 @@ Accumulo has the following configuration files which can be found in the
## accumulo.properties
-Configures Accumulo server processes using [server properties]({% durl configuration/server-properties %}).
-This file can be found in the `conf/` direcory. It is needed on every host that runs Accumulo processes.
-Therfore, any configuration should be replicated to all hosts of the Accumulo cluster. If a property is not
-configured here, it might have been [configured another way]({% durl configuration/overview %}). See the
-[quick start] for help with configuring this file.
+The {% ghc assemble/conf/accumulo.properties %} file configures Accumulo server processes using
+[server properties]({% durl configuration/server-properties %}). This file can be found in the `conf/`
+direcory. It is needed on every host that runs Accumulo processes. Therfore, any configuration should be
+replicated to all hosts of the Accumulo cluster. If a property is not configured here, it might have been
+[configured another way]({% durl configuration/overview %}). See the [quick start] for help with
+configuring this file.
## accumulo-client.properties
-Configures Accumulo client processes using [client properties]({% durl configuration/client-properties %}).
-If run `accumulo shell` without arguments, the Accumulo connection information in this file will be used.
-This file can be used to create an AccumuloClient in Java using the following code:
+The `accumulo-client.properties` file configures Accumulo client processes using
+[client properties]({% durl configuration/client-properties %}). If `accumulo shell` is run without arguments,
+the Accumulo connection information in this file will be used. This file can be used to create an AccumuloClient
+in Java using the following code:
```java
AccumuloClient client = Accumulo.newClient()
@@ -30,22 +32,24 @@ See the [quick start] for help with configuring this file.
## accumulo-env.sh
-Configures the Java classpath and JVM options needed to run Accumulo processes. See the [quick install]
-for help with configuring this file.
+The {% ghc assemble/conf/accumulo-env.sh %} file configures the Java classpath and JVM options needed to run
+Accumulo processes. See the [quick install] for help with configuring this file.
## Log configuration files
### log4j-service.properties
-Configures logging for most Accumulo services (i.e [Master], [Tablet Server], [Garbage Collector]) except for the Monitor.
+The {% ghc assemble/conf/log4j-service.properties %} file configures logging for most Accumulo services
+(i.e [Master], [Tablet Server], [Garbage Collector]) except for the Monitor.
### log4j-monitor.properties
-Configures logging for the [Monitor].
+The {% ghc assemble/conf/log4j-monitor.properties %} file configures logging for the [Monitor].
### log4j.properties
-Configures logging for Accumulo commands (i.e `accumulo init`, `accumulo shell`, etc).
+The {% ghc assemble/conf/log4j.properties %} file configures logging for Accumulo commands (i.e `accumulo init`,
+`accumulo shell`, etc).
## Host files
diff --git a/_plugins/links.rb b/_plugins/links.rb
index f227890..6225c49 100755
--- a/_plugins/links.rb
+++ b/_plugins/links.rb
@@ -203,6 +203,23 @@ class JiraTag < Liquid::Tag
end
end
+class GitHubCodeTag < Liquid::Tag
+ def initialize(tag_name, text, tokens)
+ super
+ @text = text
+ end
+
+ def render(context)
+ path = @text.strip
+ file_name = path.split('/').last
+ branch = context.environments.first["page"]["gh_branch"]
+ if branch.nil?
+ branch = context.registers[:site].config["gh_branch"]
+ end
+ url = "https://github.com/apache/accumulo/blob/#{branch}/#{path}"
+ return "[#{file_name}](#{url})"
+ end
+end
Liquid::Template.register_tag('jlink', JavadocLinkTag)
Liquid::Template.register_tag('jurl', JavadocUrlTag)
@@ -211,4 +228,5 @@ Liquid::Template.register_tag('purl', PropertyUrlTag)
Liquid::Template.register_tag('dlink', DocLinkTag)
Liquid::Template.register_tag('durl', DocUrlTag)
Liquid::Template.register_tag('ghi', GitHubIssueTag)
+Liquid::Template.register_tag('ghc', GitHubCodeTag)
Liquid::Template.register_tag('jira', JiraTag)