Search box options

There are a few posts on the forum about how to integrate a duckduckgo search box, like this one:

Alas, the URL
https://duckduckgo.com/search_box
reverts to
https://duckduckgo.com
And the various posts on the forum with examples seem to no longer have the duckduckgo search bar.
Does anyone know if duckduckgo removed this functionality or how to do this nowadays? Thanks!

It is not very elegant, and it takes you away from write.as
It’ll have to do for now:

<form class="ddg" name="x" action="//duckduckgo.com/"> <input type="hidden" value="YOURBLOGURL" name="sites"></input> <input type="hidden" value="1" name="kh"></input> <input type="hidden" value="1" name="kn"></input> <input type="hidden" value="1" name="kac"></input> <input type="search" placeholder="YOURTEXTSTRING" name="q"></input><button class="button" type="submit">duckduckgo</button></form>

Any alternative suggestions?

The inelegant form doesn’t even display for me. For example, I added this to my signature configuration:

<form class="ddg" name="x" action="//duckduckgo.com/"> <input type="hidden" value="https://underlap.org" name="sites"></input> <input type="hidden" value="1" name="kh"></input> <input type="hidden" value="1" name="kn"></input> <input type="hidden" value="1" name="kac"></input> <input type="search" placeholder="search terms..." name="q"></input><button class="button" type="submit">duckduckgo</button></form>

When I view the page source of a post, I see just this:

     duckduckgo

So it seems as if writefreely is stripping out most of the form. Anyone have an alternative solution?

I am currently facing the same problem. All the instructions I find on the Internet refer to the integration of a “form”, but this is virtually swallowed up by WriteFreely.

Has nobody really successfully integrated a search into WriteFreely? Any suggestions would be appreciated.

After upgrading to writefreely v0.15.0, I found the following provided a basic DDG search box:

<iframe src="https://duckduckgo.com/search.html?site=https://underlap.org/" frameborder="0">Blah</iframe>

You can view the result at Search — underlap.

5 Likes

Wow, great. This is really the first search field integrated via iframe that works AND integrates cleanly into the page.

Thanks a lot!

1 Like

It shows up nicely but can’t find anything (Write.Freely v0.14.0 and it’s not my server). Is there a way to make DDG index a WF blog? Or Startpage perhaps? cc @matt

I gave up on search because DuckDuckGo doesn’t actively index my Write.as site. If you don’t know, they use data from Bing’s indexing. But Bing requires you to go into their webmaster tools to request re-crawls. But I’ve found it still doesn’t index everything. That renders DDG useless for the most part.

You can check your results by directly visiting any given search engine and following your search phrase with a site target. Example:

design site:markwrites.io

Some of my design articles appear if I use that search, but not all of them. And if I try to search for other things, I get zero results. Even when I’ve submitted directly URLs to Bing and requested a re-index. Example:

alice in chains site:markwrites.io

I have an article with that phrase in the URL, headline, and in the article itself as plain text and a hashtag. So why would there be zero results?

Embedding a DDG search form in a Write.as post works great. It sends the query to DDG, but if the content isn’t being indexed it can’t be found with the search.

Also, as a reference, I didn’t have to do anything fancy to get the search form itself working directly on a Write.as pinned post. I used the following code:

<form action="https://duckduckgo.com/" method="get" class="explore"><input type="hidden" name="sites" value="markw.rites.markwyner.com"><p><input type="search" name="q" placeholder="Your words matter"><input type="submit" value="Search"></p>
</form>

Google indexes properly and quickly, and you can use this same type of form with Google. But if you’re on Write.as, you probably don’t want to mess with Google. I know I don’t.