Websites and code

Ask askr to build a website or write code, see the site working in Preview, change it by asking, and save every file.

On this page

Build a site

  1. Say what you wantWhat it is for, the pages, the sections, the colours, the words. To be sure the next message builds, load Build a site from +, Load a skill.
  2. Watch it arriveThe pages are written as code while you watch.
  3. Tap PreviewUnder the answer. On a computer the site opens beside the chat. On a phone it opens full screen, and Chat at the top takes you back. Once the chat has moved on past the site, a Preview pill above the box opens it again.
  4. Ask for changesSay what to change, in the same chat. askr keeps working on the same site.

Try typing

  • A one-page site for a dog grooming business, with prices and a booking button
  • A wedding page with our story, the day's timings and a map link
  • Make the header dark blue and the buttons round
  • Add a gallery page with the pictures you made

See it in Preview

  • Preview is on every answer that carries a site, whether askr Pro built it or you asked for it.
  • While a skill is loaded, its panel takes the place of Preview. Tap the x on the skill's chip above the box to go back to your chat, and Preview is there again.
  • Links between the pages work: tap one and the preview goes to that page, and Back returns to the first.
  • Pictures, clips and songs askr made in the chat show in the site, and open when tapped.
  • A link to another website opens in a new tab.

The panel

Preview
The site, working.
Code
Every file, one open at a time, with the rest listed by name. Copy or Save a file, or Save all for every file of that version as a zip.
Files
Everything made in the chat, pictures, clips, sounds and code, each with Open and Save.
v1, v2, v3
One version for each answer that changed the code. Tap one to see the site as it stood then.

What Preview can run

Preview shows pages the way a browser does: HTML, CSS and JavaScript, with the pictures askr made. It runs on your device, walled off from the rest of askr, and a page in it cannot fetch data from other websites.

Live data

Ask for a site that shows live things, such as prices, launches or a feed, and askr builds it on realistic sample data, so it works in Preview straight away. The live data is read in one place in the code, and it works once you host the site outside askr. If part of it really needs a server, such as a secret key or a database, the answer says so in a line or two.

A project that needs its own server, such as one you install and start with npm, cannot run in Preview. The answer says so, with Open the files and Make a version that runs here: tap the second and askr makes one page for the browser that runs in Preview.

If a site stops halfway

A very long site can end before it is finished. The answer then says it was cut off, with Continue: tap it and askr carries on from where it stopped, and Preview puts the pieces back together into one site. The new message is priced like any other.

Code that is not a site

Ask for any code: a script, a spreadsheet formula, a database query, a fix for an error. Paste the error, or attach the file. Code shows in blocks you can copy, and in the panel beside the chat. On a phone, a Code pill above the box opens the panel.

Try typing

  • A spreadsheet formula that adds up column B when column A says Paid
  • Why does this Python script say KeyError? (then paste it)

Saving your work

  • Save downloads one file, and Save all downloads every file of a version as a zip.
  • The code stays in the chat for as long as the chat does.
  • What askr writes for you is yours to use.

Still stuck?

A person on the askr team answers you on Telegram. Or ask askr itself.