kokkos / kokkos.github.io

Source code for kokkos.org pages
https://kokkos.org
1 stars 12 forks source link

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
  4. Start development server
    npm run start
    # or
    hugo server -D
  5. Open Chrome, web server is available at http://localhost:<assigned-port-depends>
    • example: http://localhost:1313


How to add a blog post


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
  3. Add an item under the tag below:
    [[languages.en.menu.main]]
  4. 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>
  5. 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)
  6. 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


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.