repos / pico

pico services - prose.sh, pastes.sh, imgs.sh, feeds.sh, pgs.sh
git clone https://github.com/picosh/pico.git

commit
e88909e
parent
a3f56bf
author
Eric Bower
date
2022-10-07 13:49:20 +0000 UTC
docs(imgs,prose): add more info for docs

Also added a section on the prose marketing page about
how to upload images with your blog.
5 files changed,  +45, -5
M imgs/html/help.page.tmpl
+26, -0
 1@@ -53,6 +53,17 @@
 2         </ol>
 3     </section>
 4 
 5+    <section id="web-optimized">
 6+        <h2 class="text-xl">
 7+            <a href="#web-optimized" rel="nofollow noopener">#</a>
 8+            Web optimized
 9+        </h2>
10+        <p>
11+            When a user uploads an image, we immediately convert it to <code>webp</code>.
12+            Then we have an API that serves those web optimized images.
13+        </p>
14+    </section>
15+
16     <section id="integrations">
17         <h2 class="text-xl">
18             <a href="#integrations" rel="nofollow noopener">#</a>
19@@ -82,6 +93,21 @@
20         </ul>
21     </section>
22 
23+    <section id="image-manipulation">
24+        <h2 class="text-xl">
25+            <a href="#image-manipulation" rel="nofollow noopener">#</a>
26+            Image manipulation
27+        </h2>
28+        <p>
29+            We have an API that allows users to resize images on-the-fly.  Currently
30+            we only support downscaling.
31+        </p>
32+
33+        <pre>[!profile](/profile/x500)     # auto scale width
34+[!profile](/profile/500x500)  # scale width and height
35+[!profile](/profile/500x)     # auto scale height</pre>
36+    </section>
37+
38     <section id="img-update">
39         <h2 class="text-xl">
40             <a href="#img-update" rel="nofollow noopener">#</a>
M imgs/html/marketing.page.tmpl
+1, -1
1@@ -28,7 +28,7 @@
2 
3 {{define "body"}}
4 <header class="text-center">
5-    <h1 class="text-2xl font-bold">{{.Site.Domain}} [beta]</h1>
6+    <h1 class="text-2xl font-bold">{{.Site.Domain}}</h1>
7     <p class="text-lg">image hosting for hackers</p>
8     <hr />
9 </header>
M imgs/html/post.page.tmpl
+3, -1
 1@@ -41,7 +41,9 @@
 2 <main>
 3     <article>
 4         <figure class="img">
 5-            <img src="{{.ImgURL}}" alt="" />
 6+            <a href="{{.ImgURL}}">
 7+                <img src="{{.ImgURL}}" alt="" />
 8+            </a>
 9             {{if .Caption}}<figcaption class="my font-italic">{{.Caption}}</figcaption>{{end}}
10         </figure>
11 
M imgs/storage/minio.go
+0, -1
1@@ -34,7 +34,6 @@ func NewStorageMinio(address, user, pass string) (*StorageMinio, error) {
2 	}, err
3 }
4 
5-// GetBucket - A bucket for the filesystem is just a directory.
6 func (s *StorageMinio) GetBucket(name string) (Bucket, error) {
7 	bucket := Bucket{
8 		Name: name,
M prose/html/marketing.page.tmpl
+15, -2
 1@@ -80,6 +80,21 @@ Cya!
 2 </pre>
 3     </section>
 4 
 5+    <section>
 6+        <h2 class="text-lg font-bold">Upload images for your blog</h2>
 7+        <p>
 8+            We also support image uploading (jpg, png, gif, webp, svg).  Simply upload your
 9+            images alongside your markdown files and then reference them from root `/`:
10+        </p>
11+        <pre>---
12+title: hello world!
13+---
14+
15+        ![profile pic](/profile.jpg)</pre>
16+        <pre>scp ~/blog/hello-world.md ~/blog/profile.jpg {{.Site.Domain}}:/</pre>
17+        <p>Read more about image uploading at [imgs.sh](https://imgs.sh) and our [help page](/help)</p>
18+    </section>
19+
20     <section>
21         <h2 class="text-lg font-bold">Publish your posts with one command</h2>
22         <p>
23@@ -137,8 +152,6 @@ Cya!
24     <section>
25         <h2 class="text-lg font-bold">Roadmap</h2>
26         <ol>
27-            <li>Ability to upload images</li>
28-            <li>View posts by tag</li>
29             <li>Writing competitions</li>
30             <li><a href="/help#hugo-support">Limited compatibility</a> with <a href="https://gohugo.io">hugo</a></li>
31         </ol>