From 2b9458c378c316d05e7f106be5408ae91bf43595 Mon Sep 17 00:00:00 2001
From: Anas Nashif
Date: Sun, 3 Feb 2019 17:29:46 -0500
Subject: [PATCH] doc: restructure and create index pages
Move all lead pages to be index pages and create redirect rules from the
old pointers.
Signed-off-by: Anas Nashif
---
README.rst | 12 ++++----
boards/{boards.rst => index.rst} | 0
cmake/host-tools.cmake | 2 +-
.../{application.rst => index.rst} | 0
doc/conf.py | 16 +++++++++-
.../{getting_started.rst => index.rst} | 0
doc/index.rst | 30 +++++++++----------
.../{introducing_zephyr.rst => index.rst} | 0
doc/releases/{release-notes.rst => index.rst} | 0
doc/security/{security.rst => index.rst} | 2 +-
samples/classic.rst | 15 ++++++++++
samples/{samples.rst => index.rst} | 2 +-
samples/kernel.rst | 15 ----------
13 files changed, 54 insertions(+), 40 deletions(-)
rename boards/{boards.rst => index.rst} (100%)
rename doc/application/{application.rst => index.rst} (100%)
rename doc/getting_started/{getting_started.rst => index.rst} (100%)
rename doc/introduction/{introducing_zephyr.rst => index.rst} (100%)
rename doc/releases/{release-notes.rst => index.rst} (100%)
rename doc/security/{security.rst => index.rst} (91%)
create mode 100644 samples/classic.rst
rename samples/{samples.rst => index.rst} (97%)
delete mode 100644 samples/kernel.rst
diff --git a/README.rst b/README.rst
index cf31d2b7cbc..af33946ee4a 100644
--- a/README.rst
+++ b/README.rst
@@ -121,13 +121,13 @@ support systems:
.. _Slack Invite: https://tinyurl.com/yarkuemx
.. _Slack: https://zephyrproject.slack.com
-.. _supported boards: http://docs.zephyrproject.org/latest/boards/boards.html
+.. _supported boards: http://docs.zephyrproject.org/latest/boards
.. _Zephyr Documentation: http://docs.zephyrproject.org
-.. _Zephyr Introduction: http://docs.zephyrproject.org/latest/introduction/introducing_zephyr.html
-.. _Getting Started Guide: http://docs.zephyrproject.org/latest/getting_started/getting_started.html
-.. _Contribution Guide: http://docs.zephyrproject.org/latest/contribute/index.html
+.. _Zephyr Introduction: http://docs.zephyrproject.org/latest/introduction
+.. _Getting Started Guide: http://docs.zephyrproject.org/latest/getting_started
+.. _Contribution Guide: http://docs.zephyrproject.org/latest/contribute
.. _Zephyr GitHub wiki: https://github.com/zephyrproject-rtos/zephyr/wiki
.. _Zephyr Development mailing list: https://lists.zephyrproject.org/g/devel
.. _Zephyr mailing list subgroups: https://lists.zephyrproject.org/g/main/subgroups
-.. _Sample and Demo Code Examples: http://docs.zephyrproject.org/latest/samples/samples.html
-.. _Security Overview: http://docs.zephyrproject.org/latest/security/security-overview.html
+.. _Sample and Demo Code Examples: http://docs.zephyrproject.org/latest/samples
+.. _Security Overview: http://docs.zephyrproject.org/latest/security
diff --git a/boards/boards.rst b/boards/index.rst
similarity index 100%
rename from boards/boards.rst
rename to boards/index.rst
diff --git a/cmake/host-tools.cmake b/cmake/host-tools.cmake
index a24675bb81e..880c1bfb90e 100644
--- a/cmake/host-tools.cmake
+++ b/cmake/host-tools.cmake
@@ -33,7 +33,7 @@ if(${CMAKE_MATCH_1} VERSION_LESS ${MIN_DTC_VERSION})
assert(0 "The detected dtc version is unsupported. \n\
The version was found to be ${CMAKE_MATCH_1} \n\
But the minimum supported version is ${MIN_DTC_VERSION} \n\
- See https://docs.zephyrproject.org/latest/getting_started/getting_started.html \n\
+ See https://docs.zephyrproject.org/latest/getting_started/ \n\
for how to use the SDK's dtc alongside a custom toolchain."
)
endif()
diff --git a/doc/application/application.rst b/doc/application/index.rst
similarity index 100%
rename from doc/application/application.rst
rename to doc/application/index.rst
diff --git a/doc/conf.py b/doc/conf.py
index 48561a68da9..8ac708911b9 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -288,7 +288,21 @@ htmlhelp_basename = 'zephyrdoc'
#
# list of tuples (old_url, new_url) for pages to redirect
# (URLs should be relative to document root, only)
-html_redirect_pages = [('contribute/contribute_guidelines', 'contribute/index'),]
+html_redirect_pages = [
+ ('contribute/contribute_guidelines', 'contribute/index'),
+ ('application/application', 'application/index.rst'),
+ ('security/security', 'security/index'),
+ ('boards/boards', 'boards/index'),
+ ('samples/samples', 'samples/index'),
+ ('releases/release-notes', 'releases/index'),
+ ('getting_started/getting_starting', 'getting_started/index'),
+ ('introduction/introducing_zephyr', 'introduction/index'),
+ ('api/index', 'reference/index'),
+ ('api/api', 'reference/index'),
+ ('subsystems/subsystems', 'reference/index'),
+ ('kernel/kernel', 'reference/kernel/index'),
+
+ ]
# -- Options for LaTeX output ---------------------------------------------
diff --git a/doc/getting_started/getting_started.rst b/doc/getting_started/index.rst
similarity index 100%
rename from doc/getting_started/getting_started.rst
rename to doc/getting_started/index.rst
diff --git a/doc/index.rst b/doc/index.rst
index d3e7d44d030..a4485c7cec0 100644
--- a/doc/index.rst
+++ b/doc/index.rst
@@ -34,14 +34,14 @@ licensing, as described in :ref:`Zephyr_Licensing`.
-
+
Contribution Guidelines
@@ -57,7 +57,7 @@ licensing, as described in :ref:`Zephyr_Licensing`.
to submit patches directly to the project.
-
+
Samples and Demos
@@ -65,28 +65,28 @@ licensing, as described in :ref:`Zephyr_Licensing`.
by Zephyr
-
+
API Reference
API Documentation and Reference
-
+
Security
Requirements, processes, and developer guidelines for ensuring security is addressed within the Zephyr project.
-
+
Supported Boards
List if supported boards and platforms.
-
+
User and Developer Guides
@@ -102,17 +102,17 @@ licensing, as described in :ref:`Zephyr_Licensing`.
.. toctree::
:maxdepth: 1
- introduction/introducing_zephyr.rst
- getting_started/getting_started.rst
+ introduction/index.rst
+ getting_started/index.rst
contribute/index.rst
development_process/index.rst
- application/application.rst
+ application/index.rst
reference/index.rst
guides/index.rst
- security/security.rst
- samples/samples.rst
- boards/boards.rst
- releases/release-notes.rst
+ security/index.rst
+ samples/index.rst
+ boards/index.rst
+ releases/index.rst
.. only:: html
diff --git a/doc/introduction/introducing_zephyr.rst b/doc/introduction/index.rst
similarity index 100%
rename from doc/introduction/introducing_zephyr.rst
rename to doc/introduction/index.rst
diff --git a/doc/releases/release-notes.rst b/doc/releases/index.rst
similarity index 100%
rename from doc/releases/release-notes.rst
rename to doc/releases/index.rst
diff --git a/doc/security/security.rst b/doc/security/index.rst
similarity index 91%
rename from doc/security/security.rst
rename to doc/security/index.rst
index ac7c6c58fc6..67987de1a92 100644
--- a/doc/security/security.rst
+++ b/doc/security/index.rst
@@ -1,4 +1,4 @@
-.. _zephyr-security-docs:
+.. _security_section:
Security
########
diff --git a/samples/classic.rst b/samples/classic.rst
new file mode 100644
index 00000000000..707d1a590eb
--- /dev/null
+++ b/samples/classic.rst
@@ -0,0 +1,15 @@
+.. _classic_samples:
+
+Classic Samples
+###############
+
+The following are samples that can be run on any of the supported
+platforms:
+
+.. toctree::
+ :maxdepth: 1
+ :glob:
+
+ hello_world/*
+ synchronization/*
+ philosophers/*
diff --git a/samples/samples.rst b/samples/index.rst
similarity index 97%
rename from samples/samples.rst
rename to samples/index.rst
index 0499393b07c..c9bf73f0713 100644
--- a/samples/samples.rst
+++ b/samples/index.rst
@@ -8,7 +8,7 @@ Samples and Demos
:maxdepth: 2
:glob:
- kernel
+ classic
basic/*
userspace/*
subsys/subsys.rst
diff --git a/samples/kernel.rst b/samples/kernel.rst
deleted file mode 100644
index dadab40e4ab..00000000000
--- a/samples/kernel.rst
+++ /dev/null
@@ -1,15 +0,0 @@
-.. _kernel-samples:
-
-Kernel Samples
-##############
-
-The following are kernel samples that can be run on any of the supported
-platforms:
-
-.. toctree::
- :maxdepth: 1
- :glob:
-
- hello_world/*
- synchronization/*
- philosophers/*