Documentation generation fixes
diff --git a/sphinx/files/reclass/source/nodes/index.rst b/sphinx/files/reclass/source/nodes/index.rst
index d3bbfe6..21d5d10 100644
--- a/sphinx/files/reclass/source/nodes/index.rst
+++ b/sphinx/files/reclass/source/nodes/index.rst
@@ -13,9 +13,9 @@
       - **Assigned Services**
 {%- for node_name, node_grains in salt['mine.get']('*', 'grains.items').iteritems() %}
    *  - {{ node_name }}
-{%- if node_grains.sphinx_doc is defined %}
+{%- if node_grains.sphinx is defined %}
       - {{ node_grains.ipv4 }}
-      - {% for service_name, service in node_grains.sphinx_doc.iteritems() %}{% for role_name, role in service.role.iteritems() %}{{ service_name }}-{{ role_name }} {% endfor %}{% endfor %}
+      - {% for service_name, service in node_grains.get('sphinx', {}).get('doc', {}).iteritems() %}{% for role_name, role in service.role.iteritems() %}{{ service_name }}-{{ role_name }} {% endfor %}{% endfor %}
 {%- else %}
       - N/A
       - N/A
diff --git a/sphinx/files/reclass/source/nodes/node.rst b/sphinx/files/reclass/source/nodes/node.rst
index db1fb1f..6cc54a7 100644
--- a/sphinx/files/reclass/source/nodes/node.rst
+++ b/sphinx/files/reclass/source/nodes/node.rst
@@ -5,7 +5,7 @@
 
 {%- if node_grains.get('sphinx_doc', {}) is not none %}
 
-{%- for service_name, service in node_grains.get('sphinx_doc', {}).iteritems() %}
+{%- for service_name, service in node_grains.get('sphinx', {}).get('doc', {}).iteritems() %}
 
 Service {{ service_name }}
 ===============================================
diff --git a/sphinx/files/reclass/source/services/endpoints.rst b/sphinx/files/reclass/source/services/endpoints.rst
index 935eedc..4c2d99b 100644
--- a/sphinx/files/reclass/source/services/endpoints.rst
+++ b/sphinx/files/reclass/source/services/endpoints.rst
@@ -15,7 +15,7 @@
       - **Server**
 {%- for node_name, node_grains in salt['mine.get']('*', 'grains.items').iteritems() %}
 {%- if node_grains.get('sphinx_doc', {}) != None %}
-{%- for service_name, service in node_grains.get('sphinx_doc', {}).iteritems() %}
+{%- for service_name, service in node_grains.get('sphinx', {}).get('doc', {}).iteritems() %}
 {%- if service.get('role', {}) != None %}
 {%- for role_name, role in service.get('role', {}).iteritems() %}
 {%- if role.get('endpoint', {}) != None %}