mirror of
https://github.com/maxboeck/webring
synced 2024-11-29 06:30:35 +00:00
add embed snippet code
This commit is contained in:
parent
656c35c558
commit
9bcc031689
3 changed files with 19 additions and 6 deletions
|
@ -9,7 +9,6 @@ module.exports = function(config) {
|
|||
config.addLayoutAlias('page', 'page.njk')
|
||||
|
||||
config.addPassthroughCopy('src/assets/images')
|
||||
config.addPassthroughCopy('src/assets/styles/main.css')
|
||||
|
||||
config.addTransform('htmlmin', function(content, outputPath) {
|
||||
if (outputPath.endsWith('.html')) {
|
||||
|
|
10
src/includes/snippet.njk
Normal file
10
src/includes/snippet.njk
Normal file
|
@ -0,0 +1,10 @@
|
|||
<div class="webring-badge-embed">
|
||||
<p>Member of <a href="{{ meta.url }}">{{ meta.title }}</a></p>
|
||||
<a href="{{ meta.url }}/prev">Previous</a>
|
||||
<a href="{{ meta.url }}/random">Random</a>
|
||||
<a href="{{ meta.url }}/next">Next</a>
|
||||
</div>
|
||||
|
||||
<script async src="{{ meta.url }}/embed.js" charset="utf-8"></script>
|
||||
|
||||
|
14
src/index.md
14
src/index.md
|
@ -18,14 +18,18 @@ The webring admins will then look at your site and handle your request.
|
|||
|
||||
## Add the badge
|
||||
|
||||
If you want to make your own badge, use these three links to connect to the webring:
|
||||
|
||||
```html
|
||||
<a href="{{ meta.url }}/prev">Previous</a>
|
||||
<a href="{{ meta.url }}/random">Random</a>
|
||||
<a href="{{ meta.url }}/next">Next</a>
|
||||
<div class="webring-badge-embed">
|
||||
<p>Member of <a href="{{ meta.url }}">{{ meta.title }}</a></p>
|
||||
<a href="{{ meta.url }}/prev">Previous</a>
|
||||
<a href="{{ meta.url }}/random">Random</a>
|
||||
<a href="{{ meta.url }}/next">Next</a>
|
||||
</div>
|
||||
<script async src="{{ meta.url }}/embed.js" charset="utf-8"></script>
|
||||
```
|
||||
|
||||
{% include 'snippet.njk' %}
|
||||
|
||||
## Want to host your own webring?
|
||||
|
||||
If you want to start your own webring, fork [this project](https://github.com/maxboeck/webring) on Github and follow the instructions in the README.
|
||||
|
|
Loading…
Reference in a new issue