How to Post with a Custom Permlink

in #technology7 years ago (edited)

When you post your content to the Steem blockchain through the UI interface of Steemit.com, the website automatically creates a permlink for your post based on the title you provided. But what if you want a specific permlink for your post? This is possible and I can think of two ways to do it:

1. The simple workaround:

When posting, put the permlink in the title edit box. This way, the website will probably use the title for a permlink as is, provided it is a well-formed permlink. After your post is created, edit your post and replace the permlink with the actual title.

2. The programmatic solution:

Post using a client library, like steemjs, which is "the official JavaScript library for Steem blockchain."

Here is an example code:

    var jsonMetadata = JSON.stringify({
            tags: ["programming", "steem", "steemit"], // your tags
            app: "testapp",
            format: "markdown", // "markdown" or "html"
        });
    steem.broadcast.comment(
        wif, // your posting private key
        parentAuthor, // "" for a new post
        parentPermlink, // main tag
        author, // author username
        permlink, // post permlink
        title, // post title
        body, // post body
        jsonMetadata,
        function (err, result) {
        console.log(err, result);
    });

Of course, you should take care that you have not used the permlink before.

Sort:  

WordPress comes with a handy option to create SEO friendly URL structure called Permalinks for your site. All you have to do is go to Settings » Permalinks page and choose a URL structure.
There are a number of options to choose from, and you can even specify a custom structure.
Take a look at this link for more info
http://www.wpbeginner.com/wp-tutorials/how-to-create-custom-permalinks-in-wordpress/ .

i have been struggling with this for a while , glad you have a solution, sometimes i want to change but it refuses , thanks man

Thank you for your comment. Glad you liked it.

Very interesting! I hope we do get a feature to allow us to create custom permalinks easier in the future.

Yes, it would better that this feature is provided in the UI as an advanced option (for example, it could be hidden for normal usage, but could be made visible by clicking an "Advanced" button).

This post has received a 12.62 % upvote from @buildawhale thanks to: @ghasemkiani. Send at least 0.50 SBD to @buildawhale with a post link in the memo field for a portion of the next vote.

To support our curation initiative, please vote on my owner, @themarkymark, as a Steem Witness

Great post thank u for sharing love it

very cool post and vlog, i like it

Good post, seems to have a lot to learn from you how to create an article

Great job.thanks for share.

A wonderful post. @ghasemkiani followed...and always with you...

favourite , It is nice to follow you.follow up

Coin Marketplace

STEEM 0.20
TRX 0.19
JST 0.034
BTC 91309.02
ETH 3119.19
USDT 1.00
SBD 2.91