code: public void render(Map<String, Object> content) throws Exception {
          String docType = (String) content.get(Crawler.Attributes.TYPE);
          String outputFilename = config.getDestinationFolder().getPath() + File.separatorChar + content.get(Attributes.URI);
          if (outputFilename.lastIndexOf('.') > outputFilename.lastIndexOf(File.separatorChar)) {
              outputFilename = outputFilename.substring(0, outputFilename.lastIndexOf('.'));
          }
  
          // delete existing versions if they exist in case status has changed either way
          String outputExtension = config.getOutputExtensionByDocType(docType);
          File draftFile = new File(outputFilename, config.getDraftSuffix() + outputExtension);
          if (draftFile.exists()) {
              draftFile.delete();
          }
  
          File publishedFile = new File(outputFilename + outputExtension);
          if (publishedFile.exists()) {
              publishedFile.delete();
          }
  
          if (content.get(Crawler.Attributes.STATUS).equals(Crawler.Attributes.Status.DRAFT)) {
              outputFilename = outputFilename + config.getDraftSuffix();
          }
  
          File outputFile = new File(outputFilename + outputExtension);
          Map<String, Object> model = new HashMap<String, Object>();
          model.put("content", content);
          model.put("renderer", renderingEngine);
  
          try {
              try (Writer out = createWriter(outputFile)) {
                  renderingEngine.renderDocument(model, findTemplateName(docType), out);
              }
              LOGGER.info("Rendering [{}]... done!", outputFile);
          } catch (Exception e) {
              LOGGER.error("Rendering [{}]... failed!", outputFile, e);
              throw new Exception("Failed to render file " + outputFile.getAbsolutePath() + ". Cause: " + e.getMessage(), e);
          }
      }
docs: Render the supplied content to a file.
  
  @param content The content to renderDocument
  @throws Exception if IOException or SecurityException are raised