Usage Guide

Table of Contents

Table of Contents

Note: you can do a Table of Contents up here!

Code Highlighting

This article shows how to properly highlight code. It is highly recommended that you jump into the HTML editor and copy paste the code there. In addition, please note that HTML sequences like < and > needs to be escaped properly with their HTML entities.

For further documentation directly from Publii, refer to this article.


/*
  Connect to WiFi
  Connects the SSTuino II to WiFi with proper fault tolerance

  Written by Pan Ziyue for FourierIndustries
  Licensed under the Creative Commons 0 (CC0) License and released to public domain
  <http://creativecommons.org/publicdomain/zero/1.0/>
 */

#include <SPI.h>
#include <WiFiNINA.h>

#include "arduino_secrets.h"

///////please enter your sensitive data in the Secret tab/arduino_secrets.h
/////// Wifi Settings ///////
char ssid[] = SECRET_SSID;
char pass[] = SECRET_PASS;

int status = WL_IDLE_STATUS;

void setup() {
  Serial.begin(9600);

  Serial.println("Starting up...");
  delay(1500);

  while (WiFi.status() == WL_NO_MODULE) {
    Serial.println("Communication with WiFi module failed!");
    WiFi.end(); // Shut off the WiFi module and try again
    delay(1000);
  }

  connectToWiFi();

  printWifiStatus();
}

Aside Blocks

Refer to the HTML source, as well as the official documentation on how to implement aside blocks as hints for the user. Aside blocks needs to be done in HTML initially, and then modified in rich text mode to "Aside Block Left" or "Aside Block Right".

Featured Image

You can insert featured images in the article using the 

 icon and it will show up as part of the article card UI.

It's highly recommended to have a featured image for every article as it gives a more professional vibe. You can source images from Unsplash or other royalty free pages.

If you just want the image to show up as part of the card but not as part of the article, you can go to article settings, Other Options, and set Display Featured Image to disabled.

Authorship

While it's a bit strange that Publii doesn't have robust collaborative functionalities, we can designate the author of an article. Don't forget to change the author if we want to write as ourselves!

DocSearch

The search is powered by an free documentation search API. However, they have a requirement that the documentation website must be built up to a certain extent first before they will entertain a request to enable indexing for your website and to provide an API key. So we have to build up this website first.

Buttons

Buttons are actually just links. You have to create a link as per normal first, and then change the format to a Button. For our use cases, we only use Button-colour (default, which is blue), Button-outline, and Button-green to keep the style consistent. Button-yellow is not advisable as it has white-on-yellow text which is hard to see.

This is a button