-
+ {{ macros.variants(images.0.url, images.0.url, images.0.alt, 200, 50 ) }}
chevron_right
diff --git a/Packages/chrosey_materialize/templates/layout/navigationBar.twig b/Packages/chrosey_materialize/templates/layout/navigationBar.twig
index 3e4b617..f2bcbfd 100644
--- a/Packages/chrosey_materialize/templates/layout/navigationBar.twig
+++ b/Packages/chrosey_materialize/templates/layout/navigationBar.twig
@@ -4,10 +4,8 @@
-
diff --git a/content/blog/2020/20200507.synology-docker-gitea-drone.md b/content/blog/2020/20200507.synology-docker-gitea-drone.md
new file mode 100644
index 0000000..954e8fe
--- /dev/null
+++ b/content/blog/2020/20200507.synology-docker-gitea-drone.md
@@ -0,0 +1,35 @@
+---
+Title: Gitea und Drone
+Description: Einrichtung einer CI/CD-Lösung auf der Diskstation
+Author: Christian Seyfferth
+Date: 2020-05-07 01:00
+
+Template: templates/blogitem
+---
+
+# CI/CD mit der Diskstation
+
+Einige haben ja, wie ich, zu Hause eine Diskstation von Synology stehen. Da ich selbst auch einige kleine Sachen programmiere,
+wollte ich mir auch den Komfort wie auf Arbeit gönnen und automatisiert Pipelines starten.
+
+Zunächst habe ich mir hier ein Gitea aufgesetzt:
+
+
+
+
+
+
+
+
+
+
+
+
+- [ ] Drone-Server
+- [ ] Drone-Runner
+- [ ] Oauth
+- [ ] Webhook
+- [ ] Admin
+
+
+
diff --git a/images/blog/2020/20200121.hallo-welt/thumbs/ich.png b/images/blog/2020/20200121.hallo-welt/thumbs/ich.png
new file mode 100644
index 0000000..d2a99e5
Binary files /dev/null and b/images/blog/2020/20200121.hallo-welt/thumbs/ich.png differ
diff --git a/plugins/ChroseyImageVariants/ChroseyImageVariants.php b/plugins/ChroseyImageVariants/ChroseyImageVariants.php
new file mode 100644
index 0000000..69b004e
--- /dev/null
+++ b/plugins/ChroseyImageVariants/ChroseyImageVariants.php
@@ -0,0 +1,15 @@
+getImageVariants();
+ }
+
+ private function getImageVariants()
+ {
+ // code...
+ }
+}
diff --git a/plugins/PicoPagesImages.php b/plugins/PicoPagesImages.php
index 67651e0..758ba1f 100644
--- a/plugins/PicoPagesImages.php
+++ b/plugins/PicoPagesImages.php
@@ -1,12 +1,13 @@
* @license http://opensource.org/licenses/MIT The MIT License
- * @link http://nliautaud.fr
- * @link http://picocms.org
+ *
+ * @see http://nliautaud.fr
+ * @see http://picocms.org
*/
class PicoPagesImages extends AbstractPicoPlugin
{
@@ -16,7 +17,7 @@ class PicoPagesImages extends AbstractPicoPlugin
/**
* Register path relative to content without index and extension
- * var/html/content/foo/bar.md => foo/bar/
+ * var/html/content/foo/bar.md => foo/bar/.
*
* Triggered after Pico has discovered the content file to serve
*
@@ -36,29 +37,33 @@ class PicoPagesImages extends AbstractPicoPlugin
}
$contentExt = $this->getConfig('content_ext');
$this->path = substr($file, $contentDirLength);
- $this->path = rtrim($this->path, "index$contentExt");
+ $this->path = rtrim($this->path, "index{$contentExt}");
$this->path = rtrim($this->path, $contentExt);
if ($this->path) {
$this->path .= '/';
}
}
+
/**
- * Triggered after Pico has read its configuration
+ * Triggered after Pico has read its configuration.
*
* @see Pico::getConfig()
- * @param array &$config array of config variables
+ *
+ * @param array &$config array of config variables
+ *
* @return void
*/
public function onConfigLoaded(array &$config)
{
if (!empty($config['images_path'])) {
- $this->root = rtrim($config['images_path'], '/') . '/';
+ $this->root = rtrim($config['images_path'], '/').'/';
} else {
$this->root = 'images/';
}
}
+
/**
- * Triggered before Pico renders the page
+ * Triggered before Pico renders the page.
*
* @see DummyPlugin::onPageRendered()
*
@@ -72,6 +77,7 @@ class PicoPagesImages extends AbstractPicoPlugin
// Create images array
$twigVariables['images'] = $this->getImages();
}
+
/**
* Return the list and infos of images in the current directory.
*
@@ -79,46 +85,47 @@ class PicoPagesImages extends AbstractPicoPlugin
*/
private function getImages()
{
- $images_path = $this->root . $this->path;
+ $images_path = $this->root.$this->path;
// Filter images path for extra slashes
- $images_path = preg_replace('/(\/+)/','/',$images_path);
+ $images_path = preg_replace('/(\/+)/', '/', $images_path);
- $data = array();
+ $data = [];
$pattern = '*.{[jJ][pP][gG],[jJ][pP][eE][gG],[pP][nN][gG],[gG][iI][fF]}';
- $images = glob($images_path . $pattern, GLOB_BRACE);
- $meta = array();
+ $images = glob($images_path.$pattern, GLOB_BRACE);
+ $meta = [];
if (!is_array($images)) {
- return array();
+ return [];
}
foreach ($images as $path) {
$imagesize = getimagesize($path);
if (!is_array($imagesize)) {
- $imagesize = array();
+ $imagesize = [];
}
- list($width, $height,, $size) = array_pad($imagesize, 4, '');
+ list($width, $height, , $size) = array_pad($imagesize, 4, '');
// Find meta files for images if they exist
- $metapath = $path . '.meta.yml';
+ $metapath = $path.'.meta.yml';
if (is_file($metapath)) {
$yamlparser = $this->getPico()->getYamlParser();
$meta = $yamlparser->parse(file_get_contents($metapath));
}
- $data[] = array (
- 'url' => $this->getBaseUrl() . $images_path . pathinfo($path, PATHINFO_BASENAME),
+ $data[] = [
+ 'url' => $this->getBaseUrl().$images_path.pathinfo($path, PATHINFO_BASENAME),
+ 'preview' => $this->getBaseUrl().pathinfo($path, PATHINFO_DIRNAME).'/thumbs/'.pathinfo($path, PATHINFO_BASENAME),
+ 'basename' => pathinfo($path, PATHINFO_BASENAME),
'path' => $images_path,
'name' => pathinfo($path, PATHINFO_FILENAME),
'ext' => pathinfo($path, PATHINFO_EXTENSION),
'width' => $width,
'height' => $height,
'size' => $size,
- 'meta' => $meta
- );
-
-
+ 'meta' => $meta,
+ ];
}
+
return $data;
}
}