Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
flores
Advanced tools
Readme
Minimalist static site generator.
markdown-it
.postcss-preset-env
.markdown-it-table-of-contents
.sitemap.js
.Run the following command on your terminal to download Flores starter template.
$ wget https://github.com/risan/flores-starter/archive/master.zip \
-O master.zip && \
unzip master.zip && \
mv flores-starter-master my-blog && \
rm master.zip
It will automatically download the starter template and unzip it to my-blog
directory.
Or you can also download the starter template and unzip it manually.
Within your project directory, run the following command to install all dependencies:
$ npm install
Run the following command to generate your website for production:
$ npm run build
For development purpose, you can preview your generated website with the built-in server:
$ npm run serve
Flores also comes with file watcher that can rebuild your website and reload the browser automatically:
$ npm run build
By default Flores project has the following directory structures.
|- src/
| |- assets/
| |- templates/
| | |- collection.njk
| | |- post.njk
| |
| |- category-1/
| | |- foo.md
| |
| |- category-2
| | |- bar.md
| |
| |- baz.md
|
|- public/
|- site.config.js
/src
: This is where your website data resides (markdown files, css files, templates, images, etc).
/assets
: This is where you store your CSS files.
/templates
: This is where you store your template files.
/category-1
and /category-2
: Store your markdown file within a directory to create a hierarchical category. The URL for your post will follow the markdown file location:
/src/category-1/foo.md => /category-1/foo.html
/src/category-2/bar.md => /category-2/bar.html
/src/baz.md => /baz.html
/public
: This is where the generated website will be stored.
site.config.js
: The configuration file.
There are three available commands: build
, serve
, and watch
.
build
Run the build
command to generate the website for production. By default the website will be stored in /public
directory.
$ npm run build
serve
Run the serve
command to preview your generate website. This command will generate the website and start the built-in Express server. By default your website will be served on localhost:4000.
$ npm run serve
watch
Run the watch
command to start the development server and the file watcher feature. It can regenerate the website and reload the browser automatically on file changes.
$ npm run watch
flores.build
Generate the website.
flores.build([options])
options
(Object
): The configuration options.flores.serve
Generate the website and serve it over the built-in Express server.
flores.serve([options])
options
(Object
): The configuration options.flores.watch
Generate the website and start the built-in Express server. It will also start the file watcher. On file changes, it will automatically regenerate the website and reload the browser.
flores.watch([options])
options
(Object
): The configuration options.Configuration options is an optional Object
that you can pass to build
, serve
, or watch
function.
env
(String
): The environment name, default to process.env.NODE_ENV
. If the NODE_ENV
environment variable is not set, production
will be set. Note that for serve
and watch
methods, the env
value will always be set to development
. When it's set to production
, the generated HTML and CSS files will be minified.
url
(String
): The website URL, default to http://localhost:4000
. Set the correct pathname if you don't serve the website on the root directory—like Github pages for repository (e.g. http://example.com/blog
). For serve
and watch
, the hostname will always be set localhost
and pathname will always be empty.
basePath
(String
): The base path of your website project directory, default to the current working directory process.cwd()
.
sourceDir
(String
): The directory for the website source relative to the basePath
, default to src
.
outputDir
(String
): The directory where the generated website will be stored relative to the basePath
, default to public
,
templatesDir
(String
): The templates directory relative to the sourceDir
, default to templates
.
assetsDir
(String
): The CSS assets directory relative to the sourceDir
, default to assets
.
defaultDateFormat
(String
): The default date format to use, when using dateFormat
filter, default to YYYY-MM-DD HH:mm:ss
. Check date-fns format()
documentation for all accepted format.
defaultTemplate
(String
): The default template name for the markdown post, default to post.njk
. You can override the template for individual post by providing the template
field on the post's front matter.
defaultCollectionTemplate
(String
): The default template name for the markdown post collection page, default to collection.njk
. You can override the template for individual post collection page by providing the template
field on the page's front matter.
copyFiles
(Array
): List of files or file patterns to copy, default to:
["images/**", "robot.txt", "**/*.html"]`
markdownAnchor
(Object
): The markdown-it-anchor
plugin options, default to:
{
permalink: true
}
markdownToc
(Object
): The markdown-it-table-of-contents
plugin options, default to:
{
containerHeaderHtml: "<h2>Table of Contents</h2>",
includeLevel: [2, 3, 4]
}
postcssPresetEnv
(Object
): PostCSS Preset Env options, default to:
{
stage: 3,
preserve: false
}
FAQs
Minimalist static site generator.
The npm package flores receives a total of 13 weekly downloads. As such, flores popularity was classified as not popular.
We found that flores demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.