For the information of anyone else looking to do this, you can do it in the GUI:
Add it to the search bar
In the search bar dropdown, click "Manage search engines"
Select DDG and set a keyword. I use "d".
Then, search using e.g. "d Hacker News"
Add it to the search bar
In the search bar dropdown, click "Manage search engines"
Select DDG and set a keyword. I use "d".
Then, search using e.g. "d Hacker News"
:dialog searchangines