diff --git a/Features.md b/Features.md index a3781ef..ca4ead3 100644 --- a/Features.md +++ b/Features.md @@ -14,6 +14,7 @@ - [Show post reading time](#show-post-reading-time) - [Show Table of Contents (Toc) on blog post](#show-table-of-contents-toc-on-blog-post) - [BreadCrumb Navigation](#breadcrumb-navigation) +- [Edit Link for Posts](#edit-link-for-posts) - [Other Posts suggestion below a post](#other-posts-suggestion-below-a-post) - [Multiple Authors](#multiple-authors) - [Comments](#comments) @@ -351,6 +352,47 @@ ShowBreadCrumbs: false --- +### Edit Link for Posts + +Add a button to suggest changes by using the file path of the post to link to a edit destination. + +For site config use: + +```yml +Params: + editPost: + URL: "https://github.com//content" + Text: "Suggest Changes" # edit text + appendFilePath: true # to append file path to Edit link +``` + +Can be modified for individual pages + +```yml +--- +editPost: + URL: "https://github.com//content" + Text: "Suggest Changes" # edit text + appendFilePath: true # to append file path to Edit link +--- + +``` + +The example above would yield the following link for the post file `posts/post-name.md`: +https://github.com//content/posts/post-name.md + +| Parameter | Required | Default Value | +| ----------------------- | -------- | ------------- | +| editPost.URL | true | - | +| editPost.appendFilePath | false | false | +| editPost.Text | false | "Edit" | + +Since the link generated is a regular HTML anchor tag ``, you can +also use other URL schemas like `mailto://`, e.g. +`URL: "mailto://mail@example.com?subject=Suggesting changes for "` + +--- + ### Other Posts suggestion below a post Adds a Previous / Next post suggestion under a single post diff --git a/Icons.md b/Icons.md index d8ae8d9..abfb0c0 100644 --- a/Icons.md +++ b/Icons.md @@ -23,34 +23,37 @@ | 14 | `freepik` | freepik.com | | 15 | `github` | github.com | | 16 | `gitlab` | gitlab.com | -| 17 | `hackerrank` | hackerrank.com | -| 18 | `hackthebox` | hackthebox.eu | -| 19 | `instagram` | instagram.com | -| 20 | `kakaotalk` | kakaocorp.com/service/KakaoTalk | -| 21 | `keybase` | keybase.io | -| 22 | `kofi` | ko-fi.com | -| 23 | `lastfm` | last.fm | -| 24 | `linkedin` | linkedin.com | -| 25 | `mastodon` | mastodon.social | -| 26 | `medium` | medium.com | -| 27 | `mixcloud` | mixcloud.com | -| 28 | `nuget` | nuget.org | -| 29 | `paypal` | paypal.com | -| 30 | `qq` | qq.com | -| 31 | `reddit` | reddit.com | -| 32 | `rss` | - | -| 33 | `soundcloud` | soundcloud.com | -| 34 | `shutterstock` | shutterstock.com | -| 35 | `slack` | slack.com | -| 36 | `snapchat` | snapchat.com/add | -| 37 | `sourcerer` | sourcerer.io | -| 38 | `stackoverflow` | stackoverflow.com | -| 39 | `steam` | steampowered.com | -| 40 | `telegram` | telegram.org | -| 41 | `twitch` | twitch.tv | -| 42 | `twitter` | twitter.com | -| 43 | `youtube` | youtube.com | -| 44 | `other` | - | +| 17 | `gitea` | gitea.io | +| 18 | `hackerrank` | hackerrank.com | +| 19 | `hackthebox` | hackthebox.eu | +| 20 | `instagram` | instagram.com | +| 21 | `itchio` | itch.io | +| 22 | `kakaotalk` | kakaocorp.com/service/KakaoTalk | +| 23 | `keybase` | keybase.io | +| 24 | `kofi` | ko-fi.com | +| 25 | `lastfm` | last.fm | +| 26 | `linkedin` | linkedin.com | +| 27 | `mastodon` | mastodon.social | +| 28 | `medium` | medium.com | +| 29 | `mixcloud` | mixcloud.com | +| 30 | `nuget` | nuget.org | +| 31 | `paypal` | paypal.com | +| 32 | `qq` | qq.com | +| 33 | `reddit` | reddit.com | +| 34 | `rss` | - | +| 35 | `soundcloud` | soundcloud.com | +| 36 | `shutterstock` | shutterstock.com | +| 37 | `slack` | slack.com | +| 38 | `snapchat` | snapchat.com/add | +| 39 | `sourcerer` | sourcerer.io | +| 40 | `stackoverflow` | stackoverflow.com | +| 41 | `steam` | steampowered.com | +| 42 | `telegram` | telegram.org | +| 43 | `twitch` | twitch.tv | +| 44 | `twitter` | twitter.com | +| 45 | `unsplash` | unsplash.com | +| 46 | `youtube` | youtube.com | +| 47 | `other` | - | Usage : diff --git a/Translations.md b/Translations.md index 4966f03..fde9744 100644 --- a/Translations.md +++ b/Translations.md @@ -1,26 +1,26 @@ ## Languages Supported -| Name | ISO Code | Available Translations | -| ---------- | -------- | -------------------------------------------------------- | -| Arabic | ar | prev_page, next_page, read_time, toc, translations, home | -| Bulgarian | bg | prev_page, next_page, read_time, toc, translations | -| Catalan | ca | prev_page, next_page, read_time, toc, translations, home | -| German | de | prev_page, next_page, read_time, toc, translations | -| English | en | prev_page, next_page, read_time, toc, translations, home | -| Spanish | es | prev_page, next_page, read_time, toc, translations | -| Farsi | fa | prev_page, next_page, read_time, toc, translations | -| French | fr | prev_page, next_page | -| Hebrew | he | prev_page, next_page, read_time, toc, translations, home | -| Hindi | hi | prev_page, next_page, read_time, toc, translations | -| Hungarian | hu | prev_page, next_page, read_time, toc, translations | -| Indonesian | id | prev_page, next_page, read_time, toc, translations | -| Italian | it | prev_page, next_page, read_time, toc, translations | -| Japanese | ja | prev_page, next_page, read_time, toc, translations | -| Korean | ko | prev_page, next_page | -| Portuguese | pt | prev_page, next_page, read_time, toc, translations | -| Russian | ru | prev_page, next_page, read_time, toc, translations | -| Uzbek | uz | prev_page, next_page, read_time, toc, translations, home | -| Chinese | zh | prev_page, next_page, read_time, toc, translations | +| Name | ISO Code | Available Translations | +| ---------- | -------- | ------------------------------------------------------------------- | +| Arabic | ar | prev_page, next_page, read_time, toc, translations, home | +| Bulgarian | bg | prev_page, next_page, read_time, toc, translations | +| Catalan | ca | prev_page, next_page, read_time, toc, translations, home | +| German | de | prev_page, next_page, read_time, toc, translations, edit_post | +| English | en | prev_page, next_page, read_time, toc, translations, home, edit_post | +| Spanish | es | prev_page, next_page, read_time, toc, translations | +| Farsi | fa | prev_page, next_page, read_time, toc, translations | +| French | fr | prev_page, next_page | +| Hebrew | he | prev_page, next_page, read_time, toc, translations, home | +| Hindi | hi | prev_page, next_page, read_time, toc, translations | +| Hungarian | hu | prev_page, next_page, read_time, toc, translations | +| Indonesian | id | prev_page, next_page, read_time, toc, translations | +| Italian | it | prev_page, next_page, read_time, toc, translations | +| Japanese | ja | prev_page, next_page, read_time, toc, translations | +| Korean | ko | prev_page, next_page | +| Portuguese | pt | prev_page, next_page, read_time, toc, translations | +| Russian | ru | prev_page, next_page, read_time, toc, translations | +| Uzbek | uz | prev_page, next_page, read_time, toc, translations, home | +| Chinese | zh | prev_page, next_page, read_time, toc, translations | ## Want to add your Language ? @@ -50,4 +50,7 @@ ISO codes can be found here: https://www.w3schools.com/tags/ref_language_codes.a - id: home translation: "Home" + +- id: edit_post + translation: "Edit" ``` diff --git a/Variables.md b/Variables.md index 4d57f04..ffd68a8 100644 --- a/Variables.md +++ b/Variables.md @@ -20,7 +20,9 @@ | `defaultTheme` | string | light \| dark \| auto | To set default theme | | `disableThemeToggle` | boolean | true \| false | To disable theme toggle icon shown besides label | | `disableSpecial1stPost` | boolean | true \| false | To disable no-card special appearance of 1st post | +| `disableScrollToTop` | boolean | true \| false | To disable ScrollToTop button | | `hidemeta` | boolean | true \| false | To Hide meta elements : date, read-time, author and available-translations for page | +| `hideSummary` | boolean | true \| false | To Hide summary being shown in list pages | | `showtoc` | boolean | true \| false | To show/hide Table of Contents | | `tocopen` | boolean | true \| false | To keep open ToC by default on page load | | `ShowPostNavLinks` | boolean | true \| false | Show Previous and Next Posts below a Post | @@ -35,6 +37,7 @@ | `assets` | - | - | [Details](#assets) | | `cover` | - | - | [Details](#cover) | | `profileMode` | - | - | [Details](#profilemode) | +| `editPost` | - | - | [Details](#editPost) | #### label @@ -111,25 +114,39 @@ socialIcons: url: "" ``` +#### editPost + +```yml +editPost: + URL: "https://github.com//content" + Text: "Suggest Changes" # edit text + appendFilePath: true # to append file path to Edit link +``` + +> Note: Same format is being used by Page Variables + --- ### Page Variables -| Name | Type | Example | Description | -| ----------------- | ------------- | --------------------- | ----------------------------------------------------------------------------------- | -| `showtoc` | boolean | true \| false | To show/hide Table of Contents | -| `tocopen` | boolean | true \| false | To keep open ToC by default on page load | -| `hidemeta` | boolean | true \| false | To Hide meta elements : date, read-time, author and available-translations for page | -| `comments` | boolean | true \| false | To show/hide comments | -| `description` | string | 'description text' | Show Post Description under Title | -| `disableShare` | boolean | true \| false | To hide/show share icons under a page | -| `disableHLJS` | boolean | true \| false | To disable Highlight.js loading | -| `searchHidden` | boolean | true \| false | Hide page from search | -| `ShowBreadCrumbs` | boolean | true \| false | Show BreadCrumb Navigation above single post/page | -| `author` | string \|list | 'Me' \| ['Me','You'] | To show multiple Authors | -| `cover.image` | string | 'featured.jpg' | To add a cover image | -| `cover.caption ` | string | 'caption for image' | To add caption to cover image | -| `cover.alt` | string | 'this is cover image' | Alternate text to show if image doesn't load/show up | -| `cover.relative` | boolean | true \| false | To use relative path for cover image, used in hugo Page-bundles | -| `cover.hidden ` | boolean | true \| false | To hide on current single page | -| `weight ` | integer | 5 | To set page order or to pin a post to Top of list | +| Name | Type | Example | Description | +| ------------------ | ------------- | --------------------- | ----------------------------------------------------------------------------------- | +| `showtoc` | boolean | true \| false | To show/hide Table of Contents | +| `tocopen` | boolean | true \| false | To keep open ToC by default on page load | +| `hidemeta` | boolean | true \| false | To Hide meta elements : date, read-time, author and available-translations for page | +| `comments` | boolean | true \| false | To show/hide comments | +| `description` | string | 'description text' | Show Post Description under Title | +| `disableShare` | boolean | true \| false | To hide/show share icons under a page | +| `disableHLJS` | boolean | true \| false | To disable Highlight.js loading | +| `searchHidden` | boolean | true \| false | Hide page from search | +| `hideSummary` | boolean | true \| false | To Hide summary being shown in list pages | +| `ShowReadingTime` | boolean | true \| false | To show read time in post meta | +| `ShowBreadCrumbs` | boolean | true \| false | Show BreadCrumb Navigation above single post/page | +| `ShowPostNavLinks` | boolean | true \| false | Show Previous and Next Posts below a Post | +| `author` | string \|list | 'Me' \| ['Me','You'] | To show multiple Authors | +| `cover.image` | string | 'featured.jpg' | To add a cover image | +| `cover.caption ` | string | 'caption for image' | To add caption to cover image | +| `cover.alt` | string | 'this is cover image' | Alternate text to show if image doesn't load/show up | +| `cover.relative` | boolean | true \| false | To use relative path for cover image, used in hugo Page-bundles | +| `cover.hidden ` | boolean | true \| false | To hide on current single page | +| `weight ` | integer | 5 | To set page order or to pin a post to Top of list |