Skip to content

Commit

Permalink
Advertise https support for official installation
Browse files Browse the repository at this point in the history
  • Loading branch information
mat committed Mar 15, 2016
1 parent 5410a53 commit aa5e083
Show file tree
Hide file tree
Showing 7 changed files with 113 additions and 127 deletions.
26 changes: 13 additions & 13 deletions Readme.markdown
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# favicon-service (besticon)

Source of <http://icons.better-idea.org>, a favicon service:
Source of <https://icons.better-idea.org>, a favicon service:

* Supports `favicon.ico` and `apple-touch-icon.png`
* Simple URL API
Expand All @@ -21,20 +21,20 @@ Websites used to have a `favicon.ico`, or not. With the introduction of the `app
This endpoint always returns an icon image for the given site — it redirects to an official icon if possible or creates and returns a fallback image if needed.

Parameter | Example | Description | Default
-------- | -------- | -------- | ----
-------- | -------- | -------- | ----
url | http://yelp.com | | required
size | 120 | Desired **minimum** icon size | required
formats | png,ico | Comma-separated list of accepted image formats: png, ico, gif | `png,ico,gif`
fallback\_icon\_url | *HTTP image URL* | If provided, a redirect to this image will be returned in case no suitable icon could be found. This overrides the default fallback image behaviour. |
fallback\_icon\_url | *HTTP image URL* | If provided, a redirect to this image will be returned in case no suitable icon could be found. This overrides the default fallback image behaviour. |


#### Examples

|Input URL | Icon |
|----------|------|
|<http://icons.better-idea.org/icon?url=yelp.com&size=32>|![Icon for yelp.com](http://icons.better-idea.org/icon?url=yelp.com&size=32)|
|<http://icons.better-idea.org/icon?url=yelp.com&size=64>|![Icon for yelp.com](http://icons.better-idea.org/icon?url=yelp.com&size=64)|
|<http://icons.better-idea.org/icon?url=yelp.com>|size missing|
|<https://icons.better-idea.org/icon?url=yelp.com&size=32>|![Icon for yelp.com](https://icons.better-idea.org/icon?url=yelp.com&size=32)|
|<https://icons.better-idea.org/icon?url=yelp.com&size=64>|![Icon for yelp.com](https://icons.better-idea.org/icon?url=yelp.com&size=64)|
|<https://icons.better-idea.org/icon?url=yelp.com>|size missing|



Expand All @@ -43,16 +43,16 @@ fallback\_icon\_url | *HTTP image URL* | If provided, a redirect to th
This endpoint returns all icons for a given site.

Parameter | Example | Description | Default
-------- | -------- | --------- | ----
-------- | -------- | --------- | ----
url | http://yelp.com | | required
formats | png,ico | Comma-separated list of accepted image formats: png, ico, gif | `png,ico,gif`
pretty | true | Whether to return a pretty-printed JSON response, for debugging | `false`

#### Examples

* <http://icons.better-idea.org/allicons.json?url=github.com>
* <http://icons.better-idea.org/allicons.json?url=github.com&formats=png>
* <http://icons.better-idea.org/allicons.json?url=github.com&formats=png&pretty=true>
* <https://icons.better-idea.org/allicons.json?url=github.com>
* <https://icons.better-idea.org/allicons.json?url=github.com&formats=png>
* <https://icons.better-idea.org/allicons.json?url=github.com&formats=png&pretty=true>


## Server Executable
Expand All @@ -78,7 +78,7 @@ If you want to build executables for a different target operating system you can
To start the server on default port 8080 just do

$ iconserver

To use a different port use

$ PORT=80 iconserver
Expand Down Expand Up @@ -112,14 +112,14 @@ Package | Description | License
<http://golang.org/x/net> | | [BSD style](https://github.com/golang/net/blob/master/LICENSE)|
<http://golang.org/x/text> | | [BSD style](https://github.com/golang/text/blob/master/LICENSE)|
| [Open Sans font](https://www.google.com/fonts/specimen/Open+Sans) used for the generated icons | | [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0.html) |
| [The icon](http://sixrevisions.com/freebies/icons/free-icons-1000/) used on [icons.better-idea.org](http://icons.better-idea.org) | | [License](http://sixrevisions.com/freebies/icons/free-icons-1000/) |
| [The icon](http://sixrevisions.com/freebies/icons/free-icons-1000/) used on [icons.better-idea.org](https://icons.better-idea.org) | | [License](http://sixrevisions.com/freebies/icons/free-icons-1000/) |


## License

MIT License (MIT)

Copyright (c) 2015-2016 Matthias Lüdtke, Hamburg - <http://github.com/mat>
Copyright (c) 2015-2016 Matthias Lüdtke, Hamburg - <https://github.com/mat>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
194 changes: 90 additions & 104 deletions besticon/iconserver/assets/assets.go

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions besticon/iconserver/assets/icons.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ <h2 class="content-subhead">Favicon for {{ .Host }}</h2>
<img src="/icon?url={{ .URL }}&amp;size=120" width=60 alt=''>
<p>
Icon link:
<a href="/icon?size=120&amp;url={{ .URL }}">http://<wbr>icons.better-idea.org<wbr>/icon?<wbr>url={{ .URL }}<wbr>&amp;size=120</a>
<a href="/icon?size=120&amp;url={{ .URL }}">https://<wbr>icons.better-idea.org<wbr>/icon?<wbr>url={{ .URL }}<wbr>&amp;size=120</a>
</p>

{{ if ((len .Icons) ne 0) }}
Expand All @@ -82,7 +82,7 @@ <h2 class="content-subhead">More Icons on {{ .Host }}</h2>

<p>
JSON representation:
<a href="/allicons.json?pretty=true&amp;url={{ .URL }}">http://<wbr>icons.better-idea.org/<wbr>allicons.json?<wbr>url={{ .URL }}</a>.
<a href="/allicons.json?pretty=true&amp;url={{ .URL }}">https://<wbr>icons.better-idea.org/<wbr>allicons.json?<wbr>url={{ .URL }}</a>.
</p>
{{ end }}

Expand All @@ -94,7 +94,7 @@ <h2 class="content-subhead">More Icons on {{ .Host }}</h2>

<div class="footer l-box">
<p>
<a href='http://icons.better-idea.org'>The Favicon Finder</a> &dash; in search for icons since 2015.
<a href='https://icons.better-idea.org'>The Favicon Finder</a> &dash; in search for icons since 2015.
Written in <a href='http://golang.org'>Go</a>,
source on <a href="https://github.com/mat/besticon">GitHub</a>.
&copy; 2015-2016 <a href='http://www.better-idea.org'>Matthias Lüdtke</a>.
Expand Down
6 changes: 3 additions & 3 deletions besticon/iconserver/assets/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<meta property="og:title" content="The Favicon Finder" />
<meta property="og:description" content="A service finding icons on web sites" />
<meta property="og:image" content="http://icons.better-idea.org/apple-touch-icon.png" />
<meta property="og:image" content="https://icons.better-idea.org/apple-touch-icon.png" />

<link rel="icon" href="/favicon.ico">
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
Expand Down Expand Up @@ -68,7 +68,7 @@ <h2 class="content-subhead">URL API</h2>
<p>
<code>
<a href="icon?url=github.com&amp;size=120">
http://icons.better-idea.org/<wbr>icon?<wbr>url=github.com<wbr>&amp;size=120</a>
https://icons.better-idea.org/<wbr>icon?<wbr>url=github.com<wbr>&amp;size=120</a>
</code>
</p>
Find more detailed information in the <a href="https://github.com/mat/besticon/blob/master/Readme.markdown">Readme on GitHub</a>.
Expand Down Expand Up @@ -103,7 +103,7 @@ <h2 class="content-subhead">Acknowledgments</h2>

<div class="footer l-box">
<p>
<a href='http://icons.better-idea.org'>The Favicon Finder</a> &dash; in search for icons since 2015.
<a href='https://icons.better-idea.org'>The Favicon Finder</a> &dash; in search for icons since 2015.
Written in <a href='http://golang.org'>Go</a>,
source on <a href="https://github.com/mat/besticon">GitHub</a>.
&copy; 2015-2016 <a href='http://www.better-idea.org'>Matthias Lüdtke</a>.
Expand Down
4 changes: 2 additions & 2 deletions besticon/iconserver/assets/not_found.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<meta property="og:title" content="The Favicon Finder" />
<meta property="og:description" content="A service finding icons on web sites" />
<meta property="og:image" content="http://icons.better-idea.org/apple-touch-icon.png" />
<meta property="og:image" content="https://icons.better-idea.org/apple-touch-icon.png" />

<link rel="icon" href="/favicon.ico">
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
Expand Down Expand Up @@ -48,7 +48,7 @@ <h2 class="content-subhead">404 Not found</h2>

<div class="footer l-box">
<p>
<a href='http://icons.better-idea.org'>The Favicon Finder</a> &dash; in search for icons since 2015.
<a href='https://icons.better-idea.org'>The Favicon Finder</a> &dash; in search for icons since 2015.
Written in <a href='http://golang.org'>Go</a>,
source on <a href="https://github.com/mat/besticon">GitHub</a>.
&copy; 2015-2016 <a href='http://www.better-idea.org'>Matthias Lüdtke</a>.
Expand Down
2 changes: 1 addition & 1 deletion besticon/iconserver/assets/popular.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ <h2 class="content-subhead">Icon Examples</h2>

<div class="footer l-box">
<p>
<a href='http://icons.better-idea.org'>The Favicon Finder</a> &dash; in search for icons since 2015.
<a href='https://icons.better-idea.org'>The Favicon Finder</a> &dash; in search for icons since 2015.
Written in <a href='http://golang.org'>Go</a>,
source on <a href="https://github.com/mat/besticon">GitHub</a>.
&copy; 2015-2016 <a href='http://www.better-idea.org'>Matthias Lüdtke</a>.
Expand Down
2 changes: 1 addition & 1 deletion besticon/iconserver/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ func registerGzipHandler(path string, f http.HandlerFunc) {
}

func main() {
fmt.Printf("iconserver %s (%s) - http://icons.better-idea.org\n", besticon.VersionString, runtime.Version())
fmt.Printf("iconserver %s (%s) - https://icons.better-idea.org\n", besticon.VersionString, runtime.Version())
port := os.Getenv("PORT")
if port == "" {
port = "8080"
Expand Down

0 comments on commit aa5e083

Please sign in to comment.