Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
umtksa committed Oct 31, 2023
1 parent 82b8fcd commit 835a962
Showing 1 changed file with 79 additions and 3 deletions.
82 changes: 79 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,86 @@
# Links
read my blog post about how I use [this](https://umtksa.github.io/my-public-bookmarks-service)

Slightly modified [gesko](https://github.com/P0WEX/Gesko) for public bookmarks service

for generating posts use [post.html](https://umtksa.github.io/links/post)

By using github actions, github pages and jekyll I made myself a public bookmark service
you can see it [here](https://umtksa.github.io/links/){:target="_blank"}

every link in my "bookmarks" is a jekyll post, posts just directing you to url at the yaml so markdown files are only yaml frontmatter without content.

Pushing a new markdown file to _posts folder fires a github action that build the jekyll blog and update the github page.

here is the yaml
```
---
layout: post
title: Title of the link
link: https://example.com/
summary: a short description
tags: tags seperated with space
---
```

I'm not using this for all my bookmarks but I have some
bookmark generation tools I have like a bash script, a static html form and a siri shortcut for sharing links directly from mobile browser (in this case Firefox but shorcut works with any browser.)

The one I use most is a bash script I come up from some internet searching.
This bash script just ask title, link, summary, and tags then generate a md file with proper format
date and title seperated with dashes, like this "yyyy-mm-dd-name-of-the-link.md"

Here is the bashscript

```
#!/bin/ksh
echo "title: "
read title
echo "link: "
read link
echo "summary: "
read sum
echo "tags: "
read tags
ptitle=${title// /-}
plc=`echo "$ptitle" | tr '[:upper:]' '[:lower:]'`
pdate=`date +%Y-%m-%d`
filename=/links/_posts/$pdate-$plc.md
touch $filename
echo -e "---
layout: post
title: $title
link: $link
summary: $sum
tags: $tags
---\n" > $filename
echo "link created"
cd /Users/mac/links
git add .
git commit -m "new link"
git push
echo "new link posted"
```

And [here](https://umtksa.github.io/links/post){:target="_blank"} is the static form I use to generate markdown files with proper name and frontmatter. Its just a static html file with a download button that generate md file for you to save in your _posts folder.
based on [this](https://www.simongriffee.com/notebook/form-to-txt/){:target="_blank"} page.

For sending links from my mobile phone running iOS I'm using [this siri shortcut](https://www.icloud.com/shortcuts/65a5ef0312ec4b0cae187dfe0f33349c){:target="_blank"} to generate a markdown file in _posts folder on dropbox. If you want to use it just change the "destination Path" to your own path.

Some useful links:

[github repo](https://github.com/umtksa/links){:target="_blank"}

My theme is based on [this](https://github.com/P0WEX/Gesko){:target="_blank"} theme

[Jekyll documentation](https://jekyllrb.com/docs/continuous-integration/github-actions/){:target="_blank"} about using github actions for jekyll.

peace.

post code sample adapted from [form to text](https://www.simongriffee.com/notebook/form-to-txt/)


Expand Down

0 comments on commit 835a962

Please sign in to comment.