Parcourir la source

setup layout for tagging videos

Harlan Iverson il y a 7 ans
Parent
commit
56a392ffd2

+ 2 - 2
ispooge.com-v2/app/resources/templates/config.edn

@@ -17,8 +17,8 @@
  :author-root-uri      "about"
  :blog-prefix          ""
  :rss-name             "feed.xml"
- :rss-filters          ["ispooge"]
- :recent-posts         4
+ :rss-filters          ["video" "playlist" "playlist-Random"]
+ :recent-posts         8
  :post-date-format     "yyyy-MM-dd"
  :archive-group-format "yyyy MMMM"
  :sass-src             []

+ 8 - 7
ispooge.com-v2/app/resources/templates/themes/ispooge/html/base.html

@@ -45,15 +45,8 @@
                     <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
                         More <span class="caret"></span></a>
                     <ul class="dropdown-menu" role="menu">
-                      {% if sidebar-pages|not-empty %}
-                        <li class="dropdown-header">{{ sidebar-pages-title }}</li>
-                          {% for page in sidebar-pages %}
-                          <li><a href="{{page.uri}}">{{page.title}}</a></li>
-                          {% endfor %}
-                      {% endif %}
 
                       {% if latest-posts|not-empty %}
-                        <li class="divider"></li>
                         <li class="dropdown-header">Recent Posts</li>
                         {% for post in latest-posts %}
                           <li><a href="{{post.uri}}">{{post.title}}</a></li>
@@ -68,6 +61,14 @@
                         {% endfor %}
                       {% endif %}
 
+                      {% if sidebar-pages|not-empty %}
+                        <li class="divider"></li>
+                        <li class="dropdown-header">{{ sidebar-pages-title }}</li>
+                          {% for page in sidebar-pages %}
+                          <li><a href="{{page.uri}}">{{page.title}}</a></li>
+                          {% endfor %}
+                      {% endif %}
+
                       <li class="divider"></li>
                       <li class="dropdown-header">{{ sidebar-links-title }}</li>
                       <li><a href="{{rss-uri}}">RSS (need reader)</a></li>

+ 29 - 0
ispooge.com-v2/doc/operations.md

@@ -14,6 +14,26 @@ Assume you want to create a page A from the `ispooge.com-v2` directory.
 * Edit the page with your editor... `nano` in CLI, `Bluefish` in X.
 
 
+
+## Create a new playlist
+
+Playlists are created in two parts. The playlist-Random post and optionally by the video post having 
+the playlist-Random tag combined with a filter of same name in config.edn--creating a filtered playlist for rss readers.
+
+```text
+
++- md
+   +- posts
+      +- DATE-video-TITLE-ID.md
+      +- DATE-playlist-NAME.md
+   videos
+   +- TITLE-ID.mp4
+   playlists
+   +- NAME-ID.json
+
+```
+
+
 ## Create a new video
 
 Creating a new video is accomplished by copying it and a cover image to the `$ISPOOGE_MEDIA/videos`
@@ -28,6 +48,15 @@ Assuming you have files `MyVideo.mp4` and `MyVideo.jpg`:
 * `cd ../../../tinydatacenter/ispooge.com-v2`
 * `scripts/make-video-page.sh A > md-pages/video-A.md`
 
+The video page has in the EDN header
+
+```clojure
+{:layout :video
+ :tags ["video" "playlist-Random"]
+}
+```
+
+
 That's it... see the `Add a page` section for more details.
 
 ## Import a video from YouTube

+ 1 - 0
ispooge.com-v2/scripts/make-playlist-page.sh

@@ -32,6 +32,7 @@ for vid in $VIDEOS; do
     {:video-thumbnail-url "/media/videos/${NAME}/${vid}.jpg"
 	  :video-url "/media/videos/${NAME}/${vid}.hls/out.m3u8"
 	  :title "${vid}"
+	  :tags ["playlist" "playlist-${NAME}"]
 	  :url "/video-${vid}.html"}
 EOM
   

+ 1 - 8
ispooge.com-v2/scripts/make-video-page.sh

@@ -6,22 +6,15 @@ PLAYLIST_NAME="$2"
 VIDEO="$VIDEO_BASENAME.mp4"
 THUMBNAIL="$VIDEO_BASENAME.jpg"
 HLS="$VIDEO_BASENAME.hls"
-PAGE="md-pages/video-$VIDEO_BASENAME.md"
-
-PAGE_IDX=$(expr 5000 + `ls -l md-pages/video-*.md | wc -l`)
 
 read -r -d '' PAGE_MD << EOM
 {:title "Video $VIDEO_BASENAME"
- :page-index $PAGE_IDX
  :layout :video
+ :tags ["video" "playlist-$PLAYLIST_NAME"]
  :video-thumbnail-url "/media/videos/$PLAYLIST_NAME/$THUMBNAIL"
  :video-url "/media/videos/$PLAYLIST_NAME/$HLS/out.m3u8"
  :video-description "$VIDEO_BASENAME"
  }
 EOM
 
-
-PAGE="md-pages/video-$1.md"
-
-
 echo $PAGE_MD