Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/parsiya/Hugo-Octopress.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorparsiya <parsiya@gmail.com>2018-05-06 07:00:35 +0300
committerparsiya <parsiya@gmail.com>2018-05-06 07:00:35 +0300
commitc68d6c023c7b75fe884be55442151a97c9322a3f (patch)
treef053c8f6e39ccace846ff713b98c0b23a4524ac1 /README.md
parentbe1373dfc0ec402ed42f6249b411eda7f1c1af2f (diff)
Add twitter card support
Diffstat (limited to 'README.md')
-rw-r--r--README.md31
1 files changed, 30 insertions, 1 deletions
diff --git a/README.md b/README.md
index 0e16396..e0bd06b 100644
--- a/README.md
+++ b/README.md
@@ -27,6 +27,7 @@ My personal website runs a modified version of the theme (mainly modified index)
- [Taxonomy pages](#taxonomy)
- [Individual pages](#page)
- [Disqus](#disqus)
+- [Twitter Card](#twitter)
- [Issues/TODO](#issues)
- [Attribution](#attribution)
- [Ported by](#portedby)
@@ -48,7 +49,6 @@ theme = "hugo-octopress"
# Disable comments for any individual post by adding "comments: false" in its frontmatter
disqusShortname = "Your disqus shortname"
-
# Number of blog posts in each pagination page
paginate = 6
@@ -440,6 +440,35 @@ disqusShortname = "whatever"
The disqus partial is at `layouts/partials/disqus.html`. By default it does not add Disqus when you are testing on localhost using the test server. This can be disabled (e.g. if you want to test Disqus locally) by commenting the `if and return` lines in the partial above.
+## <a name="twitter"></a>Twitter Card
+Twitter card support can be enabled in the config file under `Params`:
+
+``` toml
+[params]
+ # Twitter card config
+ # Enable with this.
+ twitterCardEnabled = true
+ # Don't include the @.
+ # twitterCardSite =
+ twitterCardDomain = "parsiya.net"
+ # Don't include the @.
+ twitterCardAuthor = "CryptoGangsta"
+```
+
+After Twitter card is enabled, you can add summary images to your posts via front matter through `twitterImage`:
+
+``` yaml
+twitterImage: 02-fuzzer-crash.png
+```
+
+**Note:** Image URL should be relative to the page, otherwise the final URL will not be correct. In short, image URL should be part of the page bundle. In this case, both `index.md` and `02-fuzzer-crash.png` are in the same root directory. If the image is in a subdirectory of page bundle, it can be added like this:
+
+``` yaml
+twitterImage: images/02-fuzzer-crash.png
+```
+
+The template can be modified at `Hugo-Octopress/partials/custom_twitter_card.html`.
+
## <a name="issues"></a>Issues/TODO
If you discover any issues/bugs or want new features please use the Github issue tracker. Please keep in my mind that development has not been my day job for quite a while and I may be slow in fixing things (don't be surprised if I ask you about details).