Create a new page Omit the extension, it will create it as .jade file
192880
def create_page(pagename):
    
    page = pagename.lstrip("/").rstrip("/")
    _, _ext = os.path.splitext(pagename)

    # If the file doesn't have an extension, we'll just create one
    if not _ext or _ext == "":
        page += ".jade"

    if not page.endswith(PAGE_FORMAT):
        error("Can't create '%s'" % page)
        print("Invalid filename format")
        print("Filename must be in: '%s'" % " | ".join(PAGE_FORMAT))
    else:
        engine = Yass(CWD)
        markup = "jade"
        if page.endswith(".md"):
            markup = "md"
        if page.endswith(".html"):
            markup = "html"

        dest_file = os.path.join(engine.pages_dir, page)
        dest_dir = os.path.dirname(dest_file)

        content = TPL_HEADER
        content += TPL_BODY[markup]

        if os.path.isfile(dest_file):
            error("File exists already")
            print("Location: %s" % dest_file)

        else:
            if not os.path.isdir(dest_dir):
                os.makedirs(dest_dir)
            with open(dest_file, "w") as f:
                f.write(content)

            print("New page created: '%s'" % page)
            print("Location: %s" % dest_file)


    footer()
758487
function makePage(number, text, isActive) {
        return {
          number: number,
          text: text,
          active: isActive
        };
      }
354677
function ignore(dir, options) {
  var jpmignore = path.join(dir, ".jpmignore");
  var defaultRules = ["*.zip", ".*", "test/", ".jpmignore", "*.xpi"];

  return utils.getManifest({addonDir: options.addonDir})
    .then(function(manifest) {
      return fs.exists(jpmignore);
    })
    .then(function(exists) {
      if (exists) {
        if (options.verbose) {
          console.log(".jpmignore found");
        }
        return fs.stat(jpmignore)
          .then(function(stat) {
            if (stat.isFile()) {
              return fs.readFile(jpmignore)
                .then(function(data) {
                  return data.toString().replace(/[\r\n]/, "\n").split("\n");
                });
            } else {
              console.warn(
                ".jpmignore is not a file, fallback to use " +
                  "default filter rules");
              return defaultRules;
            }
          });
      } else {
        if (options.verbose) {
          console.warn(
            ".jpmignore does not exist, fallback to use default filter rules");
        }
        return defaultRules;
      }
    })
    .then(function(lines) {
      // Add "manifest.json" to always exclude it from the xpi (See
      // https://github.com/mozilla-jetpack/jpm/pull/566 for rationale),
      // but ensure the "webextension/manifest.json", that is used for the
      // webextension embedded in an SDK hybrid add-on, is always included
      // (See https://github.com/mozilla-jetpack/jpm/pull/578 for rationale).
      lines = ["manifest.json", "!webextension/manifest.json"].concat(lines);

      var rules = lines.filter(function(e) {
        // exclude blank lines and comments
        return !/^\s*(#|$)/.test(e);
      });
      // http://git-scm.com/docs/gitignore
      // the last matching pattern decides the outcome
      // reverse rules and break at first matched rule when filtering
      return rules.reverse().map(function(rule) {
        return new Minimatch(rule, {
          matchBase: true,
          dot: true,
          flipNegate: true
        });
      });
    })
    .then(function(rules) {
      return listdir(dir, rules, dir, true);
    });
}
96287
def create_page(self, **extra_kwargs):
        
        with translation.override(self.default_language_code):
            # for evaluate the language name lazy translation
            # e.g.: settings.LANGUAGE_CODE is not "en"

            self.default_lang_name = dict(
                self.languages)[self.default_language_code]
            self.slug = self.get_slug(self.default_language_code,
                                      self.default_lang_name)
            assert self.slug != ""

        page = None
        parent = self.get_parent_page()
        if parent is not None:
            assert parent.publisher_is_draft == True, "Parent page '%s' must be a draft!" % parent

        if self.delete_first:
            if self.apphook_namespace is not None:
                pages = Page.objects.filter(
                    application_namespace=self.apphook_namespace,
                    parent=parent,
                )
            else:
                pages = Page.objects.filter(
                    title_set__slug=self.slug,
                    parent=parent,
                )
            log.debug("Delete %i pages...", pages.count())
            pages.delete()
        else:
            if self.apphook_namespace is not None:
                # Create a plugin page
                queryset = Page.objects.drafts()
                queryset = queryset.filter(parent=parent)
                try:
                    page = queryset.get(
                        application_namespace=self.apphook_namespace)
                except Page.DoesNotExist:
                    pass  # Create page
                else:
                    log.debug("Use existing page: %s", page)
                    created = False
                    return page, created
            else:
                # Not a plugin page
                queryset = Title.objects.filter(
                    language=self.default_language_code)
                queryset = queryset.filter(page__parent=parent)
                try:
                    title = queryset.filter(slug=self.slug).first()
                except Title.DoesNotExist:
                    pass  # Create page
                else:
                    if title is not None:
                        log.debug("Use page from title with slug %r",
                                  self.slug)
                        page = title.page
                        created = False

        if page is None:
            with translation.override(self.default_language_code):
                # set right translation language
                # for evaluate language name lazy translation
                # e.g.: settings.LANGUAGE_CODE is not "en"

                page = create_page(
                    title=self.get_title(self.default_language_code,
                                         self.default_lang_name),
                    menu_title=self.get_menu_title(self.default_language_code,
                                                   self.default_lang_name),
                    template=self.get_template(self.default_language_code,
                                               self.default_lang_name),
                    language=self.default_language_code,
                    slug=self.slug,
                    published=False,
                    parent=parent,
                    in_navigation=self.in_navigation,
                    apphook=self.apphook,
                    apphook_namespace=self.apphook_namespace,
                    **extra_kwargs)
                created = True
                log.debug("Page created in %s: %s", self.default_lang_name,
                          page)

        assert page.publisher_is_draft == True
        return page, created
1344000
function createDocument(args) {
  const { browser } = args;

  const features = {
    FetchExternalResources:   [],
    ProcessExternalResources: [],
    MutationEvents:           '2.0'
  };

  const window  = new Window({
    parsingMode:  'html',
    contentType:  'text/html',
    url:          args.url,
    referrer:     args.referrer
  });

  const { document } = window;
  const documentImpl = idlUtils.implForWrapper(document)

  if (args.browser.hasFeature('scripts', true)) {
    features.FetchExternalResources.push('script');
    features.ProcessExternalResources.push('script');
    window._runScripts = 'dangerously';
  }
  if (args.browser.hasFeature('css', false)) {
    features.FetchExternalResources.push('css');
    features.FetchExternalResources.push('link');
  }
  if (args.browser.hasFeature('img', false))
    features.FetchExternalResources.push('img');
  if (args.browser.hasFeature('iframe', true))
    features.FetchExternalResources.push('iframe');


  browserFeatures.applyDocumentFeatures(documentImpl, features);
  setupWindow(window, args);

  // Give event handler chance to register listeners.
  args.browser.emit('loading', document);
  return document;
}
592177
def add_page(self, title=None, content=None, old_url=None,
                 tags=None, old_id=None, old_parent_id=None):
        
        if not title:
            text = decode_entities(strip_tags(content)).replace("\n", " ")
            title = text.split(". ")[0]
        if tags is None:
            tags = []
        self.pages.append({
            "title": title,
            "content": content,
            "tags": tags,
            "old_url": old_url,
            "old_id": old_id,
            "old_parent_id": old_parent_id,
        })
586784
function createContentURL() {
        var path = '';
        var name = element.text();
        // Use $window.location.pathname to get the path with the baseURL included.
        // $location.path() does not include the baseURL. This is important to support how the docs
        // are deployed with baseURLs like /latest, /HEAD, /1.1.13, etc.
        if (scope.$root.$window && scope.$root.$window.location) {
          path = scope.$root.$window.location.pathname;
        }
        name = name
          .trim()                           // Trim text due to browsers extra whitespace.
          .replace(/'/g, '')                // Transform apostrophes words to a single one.
          .replace(unsafeCharRegex, '-')    // Replace unsafe chars with a dash symbol.
          .replace(/-{2,}/g, '-')           // Remove repeating dash symbols.
          .replace(/^-|-$/g, '')            // Remove preceding or ending dashes.
          .toLowerCase();                   // Link should be lower-case for accessible URL.
        scope.name = name;
        scope.href = path + '#' + name;
      }
490073
def create_notebook(self, model=None, path=''):
        """"""
        path = path.strip('/')
        if model is None:
            model = {}
        if 'content' not in model:
            metadata = current.new_metadata(name=u'')
            model['content'] = current.new_notebook(metadata=metadata)
        if 'name' not in model:
            model['name'] = self.increment_filename('Untitled', path)

        model['path'] = path
        model['type'] = 'notebook'
        model = self.save_notebook(model, model['name'], model['path'])

        return model
1071337
function createPage() {
        var page = new View(view.clone(), lazy.extend({}, view.options, opts));
        page.data.pagination = new Parent(lazy.extend({}, self.options, {Item: Item}));
        return page;
      }
1023386
function Jade() {
  
  var opts = (app.config.engines && app.config.engines.jade) || {};
  
  this.options = protos.extend({
    pretty: true
  }, opts);
  
  this.module = jade;
  this.multiPart = false;
  this.extensions = ['jade', 'jade.html'];

}
465907
def _append_filename_extension(self, response: BaseResponse):
        ''''''
        if not self._filename:
            return

        if response.request.url_info.scheme not in ('http', 'https'):
            return

        if not re.search(r'\.[hH][tT][mM][lL]?$', self._filename) and \
                HTMLReader.is_response(response):
            self._filename += '.html'
        elif not re.search(r'\.[cC][sS][sS]$', self._filename) and \
                CSSReader.is_response(response):
            self._filename += '.css'
1154913
def create_module_page(mod, dest_path, force=False):
    ""
    nb = get_empty_notebook()
    mod_name = mod.__name__
    strip_name = strip_fastai(mod_name)
    init_cell = [get_md_cell(f'## Title for {strip_name} (use plain english, not module name!)'), get_md_cell('Type an introduction of the package here.')]
    cells = [get_code_cell(f'from fastai.gen_doc.nbdoc import *\nfrom {mod_name} import * ', True)]

    gvar_map = get_global_vars(mod)
    if gvar_map: cells.append(get_md_cell('### Global Variable Definitions:'))
    for name in get_exports(mod):
        if name in gvar_map: cells.append(get_md_cell(gvar_map[name]))

    for ft_name in get_ft_names(mod, include_inner=True):
        if not hasattr(mod, ft_name):
            warnings.warn(f"Module {strip_name} doesn't have a function named {ft_name}.")
            continue
        cells += _symbol_skeleton(ft_name)
        elt = getattr(mod, ft_name)
    nb['cells'] = init_cell + cells + [get_md_cell(UNDOC_HEADER)]

    doc_path = get_doc_path(mod, dest_path)
    write_nb(nb, doc_path, 'w' if force else 'x')
    execute_nb(doc_path)
    return doc_path
1232333
public function CreatePage() 
	{
		parent::CreatePage(); 
	
		$this->_myWords = $this->WordCollection();
		
		$this->defaultXmlnukeDocument->addMenuItem("module:Xmlnuke.Admin.FileManagement",$this->_myWords->Value("FILEMANAGEMENT"),"");
		
		$this->_block = new XmlBlockCollection($this->_myWords->Value("FILEMANAGEMENT"), BlockPosition::Center);
		$this->setTitlePage($this->_myWords->Value("TITLE"));
		$this->setHelp($this->_myWords->Value("DESCRIPTION"));
		$this->defaultXmlnukeDocument->addXmlnukeObject($this->_block);
		
		
		//get the current folder
		$root = $this->_context->get("folder");
		
		$browser = new XmlFileBrowser($root, $this->_action, $this->_context);
		
		//SET FILEBROWSER ACESS LEVEL
		$processor = new AnydatasetFilenameProcessor("filemanagement");
		$processor->setFilenameLocation(ForceFilenameLocation::UseWhereExists );
		$anyDataSet = new AnyDataset($processor->FullQualifiedNameAndPath());

		$ignoreAdmin = false;

		$it = $anyDataSet->getIterator();
		while($it->hasNext())
		{
			$row = $it->moveNext();
			switch ($row->getField("type"))
			{
				case "INITIAL_DIR":
					$initial_dir = $row->getFieldArray("value");
					$browser->setSubFoldersPermitted($initial_dir);
					break;
				case "VALID_FILE_NEW":
					$file_new_list = $row->getFieldArray("value");
					$browser->setFileNewList($file_new_list);
					break;
				case "VALID_FILE_VIEW":
					$file_view_list = $row->getFieldArray("value");
					$browser->setFileViewList($file_view_list);
					break;
				case "VALID_FILE_EDIT":
					$file_edit_list = $row->getFieldArray("value");
					$browser->setFileEditList($file_edit_list);
					break;
				case "VALID_FILE_DELETE":
					$file_delete_list = $row->getFieldArray("value");
					$browser->setFileDeleteList($file_delete_list);
					break;
				case "VALID_FILE_UPLOAD":
					$file_upload_list = $row->getFieldArray("value");
					$browser->setFileUploadList($file_upload_list);
					break;
				case "VALID_FILE_MAX_UPLOAD":
					$file_max_upload = $row->getField("value");
					$browser->setFileMaxUpload($file_max_upload);
					break;
				case "PERMISSION":
					$browser->setFileNew($row->getField("file_new"));
					$browser->setFileView($row->getField("file_view"));
					$browser->setFileEdit($row->getField("file_edit"));
					$browser->setFileDelete($row->getField("file_delete"));
					$browser->setFileUpload($row->getField("file_upload"));
					$browser->setFolderNew($row->getField("folder_new"));
					$browser->setFolderView($row->getField("folder_view"));
					$browser->setFolderEdit($row->getField("folder_edit"));
					$browser->setFolderDelete($row->getField("folder_delete"));
					$ignoreAdmin = ($row->getField("ignore_admin")=="true");
					break;
			}
		}		
		
		if ($this->isUserAdmin() && !$ignoreAdmin)
			$browser->setUserType(FileBrownserUserType::ADMIN );
		
		$this->_block->addXmlnukeObject($browser);                                                                             
		
		return $this->defaultXmlnukeDocument->generatePage();
	}
802748
function insertContent(pageNum) {
        var $pageOverlay = $pages.eq(pageNum - 1).find('.crocodoc-page-autoscale');
        var $content = $(util.template(config.template, {
            pageNum: pageNum
        }));

        // listen for click events on the buttons
        $content.find('.add-page-btn').on('click', function (event) {
            addPage(pageNum);
            event.stopPropagation();
        });
        $content.find('.remove-page-btn').on('click', function (event) {
            removePage(pageNum);
            event.stopPropagation();
        });

        $pageOverlay.append($content);
    }
860047
function create(uri, data, locals) {
  const layoutReference = data && data.layout,
    pageData = data && references.omitPageConfiguration(data),
    prefix = getPrefix(uri),
    pageReference = `${prefix}/_pages/${uid.get()}`,
    user = locals && locals.user;

  if (!layoutReference || !isLayout(layoutReference)) {
    throw new Error('Client: Data missing layout reference.');
  }

  return layouts.get(layoutReference, locals) // check to make sure the layout 200's
    .then(() => {
      return getPageClonePutOperations(pageData, locals)
        .then(ops => {
          pageData.layout = layoutReference;
          return addOp(pageReference, pageData, ops);
        });
    })
    .then(applyBatch)
    .then(newPage => {
      newPage._ref = pageReference;

      return meta.createPage(newPage._ref, user)
        .then(() => {
          bus.publish('createPage', { uri: pageReference, data: newPage, user });

          return newPage;
        });
    });
}
134712
def create_page(self, space, title, body, parent_id=None, type='page'):
        
        log.info('Creating {type} "{space}" -> "{title}"'.format(space=space, title=title, type=type))
        url = 'rest/api/content/'
        data = {
            'type': type,
            'title': title,
            'space': {'key': space},
            'body': {'storage': {
                'value': body,
                'representation': 'storage'}}}
        if parent_id:
            data['ancestors'] = [{'type': type, 'id': parent_id}]
        return self.post(url, data=data)
324061
function (request, callback) {
  const parsed = url.parse(request.url)
  if (!parsed.hostname || !parsed.path) return callback()

  const manifest = manifestMap[parsed.hostname]
  if (!manifest) return callback()

  const page = backgroundPages[parsed.hostname]
  if (page && parsed.path === `/${page.name}`) {
    // Disabled due to false positive in StandardJS
    // eslint-disable-next-line standard/no-callback-literal
    return callback({
      mimeType: 'text/html',
      data: page.html
    })
  }

  fs.readFile(path.join(manifest.srcDirectory, parsed.path), function (err, content) {
    if (err) {
      // Disabled due to false positive in StandardJS
      // eslint-disable-next-line standard/no-callback-literal
      return callback(-6) // FILE_NOT_FOUND
    } else {
      return callback(content)
    }
  })
}