$ npm install hexo-cli -g
$ npm install
$ hexo s
For Windows
$ npm run server_win
$ npm run dev
Go to localhost:4000
Edit files in /themes/autokroma
. /!\ Don't edit the themes/autokroma/source
folder!
- Generate the static files:
$ npm run generate
For Windows
$ npm run generate_win
- Commit and push to master
- Go to GitLab > CI / CD > Pipelines
- Click on the double arrow > Deploy
PS: If error during generation on Mac try :
$ brew install libtool automake autoconf nasm
$ hexo clean
$ hexo new Name-of-the-post
$ hexo new page Name-of-the-page
To add it in the menu, edit the menu
in themes/autokroma/_config.yml
- Create a new page
$ hexo new page Name-of-the-product
- Edit the following yml in the index.md
--- title: Description product: # Name of the Product (string) order: 1 tagline: # Description of the product (string) mainAction: label: # Main link label (string) url: # Main link url (url) hero: actions: - label: # link label (string) url: # link url (url) image: # background image (url) video: # Feature video (YouTube ID) colors: # Change background-color (optionnal) - '#293351' - '#B4003D' ---
- Add the features in a
features
subfolder with the following yml--- title: # Title of the feature (string) order: # order in the page (integer) image: # illustration url ---
- Add the new product in the menu in
themes/autokroma/_config.yml
- Create a folder inside the product folder
- Create a file index.md
- Add the following yml
--- title: # Title of the subpage (string) product: # Name of the product (string) order: # Order in the product menu (integer) ---
The HTML is generated by Hexo using the ejs language, the files are located the the /layout
folder and is structured as:
- Pages - The different layouts of pages:
- Archive - Blog index page
- Article - Blog post pages
- Home - Homepage
- Product - Product page. Ex: AfterCodecs
- Partials - Partials are small piece of reusable code like
header
,footer
,icon
, etc. - aescripts - Layout for export to aescripts.com
- Others files - The other files are mainly redirection to the right page.
The styles are written in the /dev/scss
folder. It used scss language and is structured as:
- Settings - The
settings
folder is used to define all the scss variables, functions and mixins. - Base - The
base
folder is used for the styles as the highest level. Only element without selectors (html {}
,button {}
...). It's used for css reset, document parameters (general font-size, color...) or overwrite a default behavior of an element. - Layout - The
layout
folder contains the style of elements the will structure the page ascontainer
,grid
... It also contains big components present on all the pages likeheader
andfooter
. - Particles - The
particles
folder includes reusable components that can appear in different context such asbutton
,input
,icon
... - Components - The
components
folder contains the larger components - Utilities - The
utilities
folder includes utility classes that helps to do small things: center text, add margin to element, change the color of an element... - Custom - the
_custom.scss
file is used for quick and dirty fixes. Avoid as much as possible.
All the classes are prefixed by the first letter of the folder they are located in to avoid duplication and to make it easier to find. Ex: in components
folder, all classes are prefixed by c-
.
To name classes, use the BEM convention. See the doc for more informations.
The scripts are written in the /dev/js
folder. It used normal JavaScript with jQuery and is structured as:
- Plugins - The
plugins
folder is used for the external library. - Modules - The
modules
folder contains every custom script.
To create a new icon, add a new svg
file with dimensions of 24x24px in the /dev/img/icons
folder. The icon should be an outpath filled in black.
To use it in your .ejs
files, use the partial:
<%- partial('_partial/icon', {name: 'your-file-name', classes: 'optionnal-classes'}) %>
For your images, you can just drop them in the /dev/img
folder. They will be optimized by gulp.