You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@celix.apache.org by pn...@apache.org on 2018/07/04 19:09:04 UTC

celix-site git commit: CELIX-449: Refactors how the menu works. Now uses Hugo's section concept

Repository: celix-site
Updated Branches:
  refs/heads/asf-site 49775f7ea -> 314950255


CELIX-449: Refactors how the menu works. Now uses Hugo's section concept


Project: http://git-wip-us.apache.org/repos/asf/celix-site/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix-site/commit/31495025
Tree: http://git-wip-us.apache.org/repos/asf/celix-site/tree/31495025
Diff: http://git-wip-us.apache.org/repos/asf/celix-site/diff/31495025

Branch: refs/heads/asf-site
Commit: 314950255a64d4637b54a48ef2e917fe3968ddc2
Parents: 49775f7
Author: Pepijn Noltes <pe...@gmail.com>
Authored: Wed Jul 4 21:08:40 2018 +0200
Committer: Pepijn Noltes <pe...@gmail.com>
Committed: Wed Jul 4 21:08:40 2018 +0200

----------------------------------------------------------------------
 README.md                                       | 16 +++++--
 content/community/about.md                      | 33 +++++++++++++
 content/community/index.md                      | 34 -------------
 content/downloads/download.md                   | 49 +++++++++++++++++++
 content/downloads/index.md                      | 50 --------------------
 content/support/_index.md                       | 22 ---------
 content/support/issuetracking.md                |  3 --
 content/support/mailinglist.md                  |  3 --
 copy_docs_from_src_to_content.sh                |  9 ++--
 .../celix/layouts/partials/top_level_menu.html  | 31 +++++-------
 10 files changed, 110 insertions(+), 140 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix-site/blob/31495025/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 8def5f0..130812c 100644
--- a/README.md
+++ b/README.md
@@ -26,14 +26,22 @@ This is the website for [Apache Celix](https://celix.apache.org/), hosted at:
 
 The Celix website uses the Hugo content management system. See [Hugo](https://gohugo.io) for more info and for details how to install hugo
 
-## Run the website locally
+## Generate the website
 
-On the root dir, run: `hugo server -D`. The -D is provided to also host draft pages.
+### Copy documentation dir from celix repo
 
-## Generate the status website
+ - Run `git submodule init` and `git submodule update` to retreive the Celix sources
+ - Run `./copy_docs_from_src_to_content.sh` to copy the documents director to the website content documentation section 
+
+### Create doxygen documentation
+
+TODO
+
+### Generate the static website
 
 To generate the static website run: `hugo`. The resulting public dir should contain a updated static website.
+Or to just host it locally run: `hugo server -D`. The -D is provided to also host draft pages.
 
-## Initialize celix git submodule
+## Publish the website
 
 TODO

http://git-wip-us.apache.org/repos/asf/celix-site/blob/31495025/content/community/about.md
----------------------------------------------------------------------
diff --git a/content/community/about.md b/content/community/about.md
new file mode 100644
index 0000000..6f63e39
--- /dev/null
+++ b/content/community/about.md
@@ -0,0 +1,33 @@
+---
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you 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.
+title: Community
+---
+# Celix Community
+
+Celix is a community driven project, where everyone is free to download and use it. Besides using Celix we encourage 
+everyone to participate in the development. This can be as simple as providing feedback and reporting bugs but could as 
+well mean bug fixes and code contributions.
+
+- [Contribute](/community/contributing/contributing.html)
+
+While Celix was in incubation at the Apache Incubator, the status had to be reported to the Incubator PMC. These
+reports are also available on this site.
+
+- [Board Reports](/community/boardreports/boardreports.html)
+
+

http://git-wip-us.apache.org/repos/asf/celix-site/blob/31495025/content/community/index.md
----------------------------------------------------------------------
diff --git a/content/community/index.md b/content/community/index.md
deleted file mode 100644
index 8d17839..0000000
--- a/content/community/index.md
+++ /dev/null
@@ -1,34 +0,0 @@
----
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you 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.
-title: Community
-menu: main
----
-# Celix Community
-
-Celix is a community driven project, where everyone is free to download and use it. Besides using Celix we encourage 
-everyone to participate in the development. This can be as simple as providing feedback and reporting bugs but could as 
-well mean bug fixes and code contributions.
-
-- [Contribute](/community/contributing/contributing.html)
-
-While Celix was in incubation at the Apache Incubator, the status had to be reported to the Incubator PMC. These
-reports are also available on this site.
-
-- [Board Reports](/community/boardreports/boardreports.html)
-
-

http://git-wip-us.apache.org/repos/asf/celix-site/blob/31495025/content/downloads/download.md
----------------------------------------------------------------------
diff --git a/content/downloads/download.md b/content/downloads/download.md
new file mode 100755
index 0000000..754d929
--- /dev/null
+++ b/content/downloads/download.md
@@ -0,0 +1,49 @@
+---
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you 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.
+title: Download
+---
+# Download Celix
+
+Celix is an implementation of the OSGi specification adapted to C.
+
+
+## Releases
+
+Apache Celix only releases source distributions, information about building and running van be found inside the release tarball.
+
+### Mirrors
+
+The currently selected mirror is **[preferred]**. If you encounter a problem with this mirror, please select another mirror. If all mirrors are failing, there are *backup* 
+mirrors (at the end of the mirrors list) that should be available. 
+<form action="[location]" method="get" id="SelectMirror">Other mirrors:
+    <select name="Preferred">
+        [if-any http] [for http]<option value="[http]">[http]</option>[end] [end] 
+        [if-any ftp] [for ftp]<option value="[ftp]">[ftp]</option>[end] [end] 
+        [if-any backup] [for backup]<option value="[backup]">[backup] (backup)</option>[end] [end]
+    </select>
+    <input type="submit" value="Change"></input>
+</form>
+
+You may also consult the [complete list of mirrors](http://www.apache.org/mirrors/).
+
+### Downloads
+
+- Source: [celix-2.0.0.tar.gz]([preferred]/celix/celix-2.0.0/celix-2.0.0.tar.gz)
+[PGP](http://www.apache.org/dist/celix/celix-2.0.0/celix-2.0.0.tar.gz.asc)
+[MD5](http://www.apache.org/dist/celix/celix-2.0.0/celix-2.0.0.tar.gz.md5)
+[SHA1](http://www.apache.org/dist/celix/celix-2.0.0/celix-2.0.0.tar.gz.sha)

http://git-wip-us.apache.org/repos/asf/celix-site/blob/31495025/content/downloads/index.md
----------------------------------------------------------------------
diff --git a/content/downloads/index.md b/content/downloads/index.md
deleted file mode 100755
index 15f971e..0000000
--- a/content/downloads/index.md
+++ /dev/null
@@ -1,50 +0,0 @@
----
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you 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.
-title: Download
-menu: main
----
-# Download Celix
-
-Celix is an implementation of the OSGi specification adapted to C.
-
-
-## Releases
-
-Apache Celix only releases source distributions, information about building and running van be found inside the release tarball.
-
-### Mirrors
-
-The currently selected mirror is **[preferred]**. If you encounter a problem with this mirror, please select another mirror. If all mirrors are failing, there are *backup* 
-mirrors (at the end of the mirrors list) that should be available. 
-<form action="[location]" method="get" id="SelectMirror">Other mirrors:
-    <select name="Preferred">
-        [if-any http] [for http]<option value="[http]">[http]</option>[end] [end] 
-        [if-any ftp] [for ftp]<option value="[ftp]">[ftp]</option>[end] [end] 
-        [if-any backup] [for backup]<option value="[backup]">[backup] (backup)</option>[end] [end]
-    </select>
-    <input type="submit" value="Change"></input>
-</form>
-
-You may also consult the [complete list of mirrors](http://www.apache.org/mirrors/).
-
-### Downloads
-
-- Source: [celix-2.0.0.tar.gz]([preferred]/celix/celix-2.0.0/celix-2.0.0.tar.gz)
-[PGP](http://www.apache.org/dist/celix/celix-2.0.0/celix-2.0.0.tar.gz.asc)
-[MD5](http://www.apache.org/dist/celix/celix-2.0.0/celix-2.0.0.tar.gz.md5)
-[SHA1](http://www.apache.org/dist/celix/celix-2.0.0/celix-2.0.0.tar.gz.sha)

http://git-wip-us.apache.org/repos/asf/celix-site/blob/31495025/content/support/_index.md
----------------------------------------------------------------------
diff --git a/content/support/_index.md b/content/support/_index.md
deleted file mode 100644
index c6bf84b..0000000
--- a/content/support/_index.md
+++ /dev/null
@@ -1,22 +0,0 @@
----
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you 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.
-title: "Support"
-menu: 
-  main:
-    identifier: "support"
----

http://git-wip-us.apache.org/repos/asf/celix-site/blob/31495025/content/support/issuetracking.md
----------------------------------------------------------------------
diff --git a/content/support/issuetracking.md b/content/support/issuetracking.md
index 1b2dfd6..b6dd52d 100644
--- a/content/support/issuetracking.md
+++ b/content/support/issuetracking.md
@@ -16,9 +16,6 @@
 # specific language governing permissions and limitations
 # under the License.
 title: "Issues"
-menu:
-  main:
-    parent: "support"
 ---
 # Issue Tracking
 

http://git-wip-us.apache.org/repos/asf/celix-site/blob/31495025/content/support/mailinglist.md
----------------------------------------------------------------------
diff --git a/content/support/mailinglist.md b/content/support/mailinglist.md
index 45a204c..7ad7d0f 100644
--- a/content/support/mailinglist.md
+++ b/content/support/mailinglist.md
@@ -16,9 +16,6 @@
 # specific language governing permissions and limitations
 # under the License.
 title: "Mailing list"
-menu:
-  main:
-    parent: "support"
 ---
 # Mailing List
 

http://git-wip-us.apache.org/repos/asf/celix-site/blob/31495025/copy_docs_from_src_to_content.sh
----------------------------------------------------------------------
diff --git a/copy_docs_from_src_to_content.sh b/copy_docs_from_src_to_content.sh
index 22ce919..9e22924 100755
--- a/copy_docs_from_src_to_content.sh
+++ b/copy_docs_from_src_to_content.sh
@@ -1,11 +1,12 @@
 #!/bin/sh
 
 src_doc_dir=celix-src/documents
-site_doc_dir=content/documents
+site_doc_dir=content/documentation
 
 for file in `cd ${src_doc_dir}; find . -name \*.md`
 do
-    dest=`dirname ${file}`
-    mkdir -p ${site_doc_dir}/${dest}
-    cp -v ${src_doc_dir}/${file} ${site_doc_dir}/${dest}/index.md
+    dest="`dirname ${file}`.md"
+    dest_dir="`dirname ${dest}`"
+    mkdir -p ${site_doc_dir}/${dest_dir}
+    cp -v ${src_doc_dir}/${file} ${site_doc_dir}/${dest}
 done

http://git-wip-us.apache.org/repos/asf/celix-site/blob/31495025/themes/celix/layouts/partials/top_level_menu.html
----------------------------------------------------------------------
diff --git a/themes/celix/layouts/partials/top_level_menu.html b/themes/celix/layouts/partials/top_level_menu.html
index e7042ea..f428806 100644
--- a/themes/celix/layouts/partials/top_level_menu.html
+++ b/themes/celix/layouts/partials/top_level_menu.html
@@ -20,18 +20,13 @@ limitations under the License.
 	<select class="mobbutton" onchange="if (this.value) window.location.href=this.value">
 		<option value="">navigate</option>
         <option value="/">Home</option>
-		<option value="/doc/">Documentation</option>
-        {{ range .Site.Menus.main }}
-            {{ if .HasChildren }}
+        {{ range .Sections }}
                 <optgroup label="{{ .Name }}">
                     <option value="{{ .URL }}">{{ .Name }}</option>
-                {{ range .Children }}
+                {{ range .Pages }}
                     <option value="{{ .URL }}">{{ .Name }}</option>
                 {{ end }}
                 </optgroup>
-            {{ else }}
-                <option value="{{ .URL }}">{{ .Name }}</option>
-            {{ end }}
         {{ end }}
         <!--
 		<option value="/downloads/">Downloads</option>
@@ -56,20 +51,16 @@ limitations under the License.
 	</select>
 	<div id="dropmenu" class="shadowed">
 		<a href="/"><div class="dropbutton">Home</div></a>
-        <a href="/doc/"><div class="dropbutton">Documentation</div></a>
-        {{ range .Site.Menus.main }}
-            {{ if .HasChildren }}
-                <div class="dropdown">
-                    <div class="dropbutton">{{ .Name }}<div class="triangle"></div></div>
-                    <div class="dropdown-content">
-                    {{ range .Children }}
-                        <a href="{{ .URL }}">{{ .Name }}</a>
-                    {{ end }}
-                    </div>
+
+        {{ range .Site.Sections }}
+            <div class="dropdown">
+                <div class="dropbutton">{{ .Name }}<div class="triangle"></div></div>
+                <div class="dropdown-content">
+                {{ range .Pages }}
+                    <a href="{{ .URL }}">{{.Title}}</a>
+                {{ end }}
                 </div>
-           {{ else }}  
-               <a href="{{ .URL }}"><div class="dropbutton">{{ .Name }}</div></a>
-           {{ end }}
+            </div>
         {{ end }}
         
         <div class="dropdown">