Giter VIP home page Giter VIP logo

kokkos.github.io's Introduction

New Kokkos.org

Requirements


How to run locally

  1. Install all requirements
  2. Change directory: <your-path-to-the-repository>
  3. Install dependencies
npm install
  1. Start development server
npm run start
# or
hugo server -D
  1. Open Chrome, web server is available at http://localhost:<assigned-port-depends>
    • example: http://localhost:1313

How to add a blog post

  • Create a new .md file in the /content/blog/ folder
  • There are 2 parts to display an article:
    • an information / header part and
    • a body part of the article
  • Here is an example of a header for a new blog article:
1 ---
2 author: <author-name>
3 title: <title-of-my-blog-post>
4 date: YYYY-MM-DD
5 tags: ["exemple1", "tag2", "anotherOne"]
6 thumbnail: img/<name-of-your-picture>.jpg
7 ---
  • From line 8 you can write all the text you want respecting the markdown rules of the goldmark parser.
    • In config.toml line 173 unsafe = true: it allows you to put links in the body text of a blog post
  • In addition, there are tags specific to the chosen theme. More information in the docs

How to add a new page

  1. Create a new file or folder in the content/ folder
  2. The name given will be the identifier in config.toml code
  3. This .md file must have a correct header (see part How to add a blog post)
  4. The content is then free following the markdown goldmark rules
  5. The file / page is accessible via its url defined in the config.toml file
    • If you want to add it to the top menubar, read the next part

How to add a item in the top menu bar

  1. Go to config.toml
  2. Add +1 to weight line 6 and 7:
[languages.en]
weight = new-weight
  1. Add an item under the tag below:
[[languages.en.menu.main]]
  1. It is necessary to specify 3 points: name, url and weight (location of the item in the top bar)
  • Here is an example:
    •   [[languages.en.menu.main]]
        name = "Name which is displayed"
        url = "/<path-to-folder>/<where-your-new-content-folder-is>/"
        weight = number
    • This tab will be before the items that have a weight lower than <number> and after the items that have a weight higher than <number>
  1. If you have no content at the url, you get an error. To solve it you have to create a page or a folder with the same name as your url (for more information see next section)
  2. If you want to add a drop down menu, you just have then to specify sub-menus with parent and weight
  • Here is an example:
    •   [[languages.en.menu.main]]
        identifier = "Unique name for this"
        name = "Name which is displayed child"
        url = "/<path-to-folder>/<where-your-new-content-folder-is>/<sub-file>/"
        parent = "Name which is displayed"
        weight = number

How to build static HTML files

  • Go to the root directory: cd <your-path-to-the-repository>
  • Use the command line to build
npm run build
  • This command generates the html code, css, and more, to be able to deploy your website
  • And puts it in an automatically created folder called public/

Check the build

You can check that the build is working well by running the build code with a small local python server. You must have python3 installed. This is not explained in this document.

  • Change directory: <your-path-to-the-repository>/public/
  • Execute the command: python3 -m http.server
  • Web server is available at http://localhost:8000 for example

kokkos.github.io's People

Contributors

dalg24 avatar lucbv avatar antoinemeyer5 avatar crtrott avatar jbludau avatar ajpowelsnl avatar jbigot avatar fnrizzi avatar foertter avatar searhein avatar masterleinad avatar jewatkins avatar nliber avatar nmm0 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.