This all will have to change:

```ruby
Dir.chdir("site/docs") do
  File.open("history.md", "w") do |f|
    f.write(replaced)
  end
end
```