The code in this repo powers the Gramine website. The website runs in Hugo and uses the Dot-Org Hugo theme. The theme has many custom shortcodes that can be used to style content in markdown files.
In order to locally develop the website, you'll need to install Hugo and node.js.
# macOS
brew install hugo nodeThen follow these instructions:
-
Clone this repo to a local directory on your computer.
-
Navigate to the newly created directory, and pull in the theme:
git submodule update --init --recursive- Install dependencies:
npm install- Build the site:
npm run build- Start the local server with live reload:
npm run startOr use the following command if you'd like the PageFind search to work locally:
npm run dev:start:with-pagefindThis should give an address you can visit on your local machine to see the local copy of your site. Typically this is localhost:1313. Just navigate to http://localhost:1313 in your browser and you should see the site running.
Don't edit the theme that is imported via the git submodule as otherwise your changes will be overwritten the next time the theme is updated. Changes should be made to files inside the root directory as this will correctly override the theme directory files. Read the Hugo docs for more info.
Because subresource integrity doesn't work with file:// URLs, you need to
remove integrity= attributes from CSS tags to get proper preview. Then you
can render with a browser:
npm run build
sed -i -e 's/ integrity="[^"]*"//g' $(find public -name \*.html)
firefox public/index.html