mirror of
https://github.com/nunocoracao/blowfish.git
synced 2026-01-30 15:31:52 +00:00
updated docs for v1 and polished some minor fixes across the code
This commit is contained in:
@@ -1,57 +1,98 @@
|
||||
# Blowfish
|
||||
|
||||
Blowfish is designed to be a powerful, lightweight theme for [Hugo](https://gohugo.io). It's built using Tailwind CSS with a clean and minimalist design that prioritises to your content. The theme is a forke of [Congo](https://github.com/jpanther/congo)
|
||||
|
||||
🌏 [Demo site](https://nunocoracao.github.io/blowfish/)
|
||||
📑 [Theme documentation](https://nunocoracao.github.io/blowfish/docs/)
|
||||
🐛 [Bug reports & issues](https://github.com/nunocoracao/blowfish/issues)
|
||||
💡 [Questions & feature requests](https://github.com/nunocoracao/blowfish/discussions)
|
||||
|
||||

|
||||
|
||||
# Blowfish
|
||||
Personal Website & Blog Theme for Hugo
|
||||
|
||||
based on Congo
|
||||
## Features
|
||||
|
||||
git submodule add -b main https://github.com/nunocoracao/blowfish.git themes/blowfish
|
||||
- Fully responsive layout built with Tailwind CSS 3.0
|
||||
- Multiple colour schemes (or fully customise your own)
|
||||
- Dark mode (forced on/off or auto-switching with user toggle)
|
||||
- Highly customisable configuration
|
||||
- Firebase integration to support dynamic data (i.e. views)
|
||||
- Multiple homepage layouts
|
||||
- Flexible with any content types, taxonomies and menus
|
||||
- Multilingual content support inlcuding support for RTL languages
|
||||
- Ability to link to posts on third-party websites
|
||||
- Client-side site search powered by Fuse.js
|
||||
- Diagrams and visualisations using Mermaid
|
||||
- Charts using Chart.js
|
||||
- Mathematical notation using KaTeX
|
||||
- SVG icons from FontAwesome 6
|
||||
- Automatic image resizing using Hugo Pipes
|
||||
- Heading anchors, Tables of Contents, Code copy, Buttons, Badges and more
|
||||
- HTML and Emoji support in articles 🎉
|
||||
- SEO friendly with links for sharing to social media
|
||||
- Fathom Analytics and Google Analytics support
|
||||
- RSS feeds, Favicons and comments support
|
||||
- Advanced customisation using simple Tailwind colour definitions and styles
|
||||
- Optimised for performance and accessibility with perfect Lighthouse scores
|
||||
- Fully documented with regular updates
|
||||
|
||||
- only one header
|
||||
---
|
||||
|
||||
Firebase
|
||||
1. create account
|
||||
2. create project
|
||||
3. select analytics
|
||||
4. Setup firebase
|
||||
## Documentation
|
||||
|
||||
```
|
||||
// Import the functions you need from the SDKs you need
|
||||
import { initializeApp } from "firebase/app";
|
||||
import { getAnalytics } from "firebase/analytics";
|
||||
// TODO: Add SDKs for Firebase products that you want to use
|
||||
// https://firebase.google.com/docs/web/setup#available-libraries
|
||||
Blowfish has [extensive documentation](https://nunocoracao.github.io/blowfish/docs/) that covers all aspects of the theme. Be sure to [read the docs](https://nunocoracao.github.io/blowfish/docs/) to learn more about how to use the theme and its features.
|
||||
|
||||
// Your web app's Firebase configuration
|
||||
// For Firebase JS SDK v7.20.0 and later, measurementId is optional
|
||||
const firebaseConfig = {
|
||||
apiKey: "AIzaSyB5tqlqDky77Vb4Tc4apiHV4hRZI18KGiY",
|
||||
authDomain: "blowfish-21fff.firebaseapp.com",
|
||||
projectId: "blowfish-21fff",
|
||||
storageBucket: "blowfish-21fff.appspot.com",
|
||||
messagingSenderId: "60108104191",
|
||||
appId: "1:60108104191:web:039842ebe1370698b487ca",
|
||||
measurementId: "G-PEDMYR1V0K"
|
||||
};
|
||||
---
|
||||
|
||||
// Initialize Firebase
|
||||
const app = initializeApp(firebaseConfig);
|
||||
const analytics = getAnalytics(app);
|
||||
```
|
||||
## Installation
|
||||
|
||||
5. Setup Firestore - Build > Firestore - create database - start production mode - select server - wait - rules
|
||||
```
|
||||
rules_version = '2';
|
||||
service cloud.firestore {
|
||||
match /databases/{database}/documents {
|
||||
match /{document=**} {
|
||||
allow read, write: if request.auth != null;
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
5. Toggle guest authorization - Build > Authentication - Get Started - Anonymous - toggle - Save
|
||||
6. Get values
|
||||
7. copy into params.toml
|
||||
8. Enjoy - activate views
|
||||
Blowfish supports several installation methods - as a Hugo Module (easiest), a git submodule, or as a completely manual install.
|
||||
|
||||
Detailed instructions for each method can be found in the [Installation](https://nunocoracao.github.io/blowfish/docs/installation) docs. You should consult the documentation for the simplest setup experience. Below is a quick start guide using Hugo modules if you're already confident installing Hugo themes.
|
||||
|
||||
### Quick start using Hugo
|
||||
|
||||
> **Note:** Ensure you have **Go** and **Hugo** installed, and that you have created a new Hugo project before proceeding.
|
||||
|
||||
1. From your project directory, initialise Hugo Modules:
|
||||
|
||||
```shell
|
||||
hugo mod init github.com/<username>/<repo-name>
|
||||
```
|
||||
|
||||
2. Create `config/_default/module.toml` and add the following:
|
||||
|
||||
```toml
|
||||
[[imports]]
|
||||
path = "github.com/nunocoracao/blowfish"
|
||||
```
|
||||
|
||||
3. Start your server using `hugo server` and the theme will be downloaded automatically.
|
||||
|
||||
4. In the root folder of your website, delete the `config.toml` file that was generated by Hugo. Copy the `*.toml` config files from the theme into your `config/_default/` folder.
|
||||
|
||||
> **Note:** Do not overwrite the `module.toml` file you created above!
|
||||
|
||||
You will find these theme config files in the Hugo cache directory, or [download a copy](https://minhaskamal.github.io/DownGit/#/home?url=https://github.com/nunocoracao/blowfish/tree/main/config/_default) from GitHub.
|
||||
|
||||
5. Follow the [Getting Started](https://nunocoracao.github.io/blowfish/docs/getting-started/) instructions to configure your website.
|
||||
|
||||
### Installing theme updates
|
||||
|
||||
As new releases are posted, you can update the theme using Hugo. Simply run `hugo mod get -u` from your project directory and the theme will automatically update to the latest release.
|
||||
|
||||
Detailed [update instructions](https://nunocoracao.github.io/blowfish/docs/installation/#installing-updates) are available in the docs.
|
||||
|
||||
---
|
||||
|
||||
## Contributing
|
||||
|
||||
Blowfish is expected to evolve over time. I intend to keep adding features and making changes as required.
|
||||
|
||||
Feel free to get in touch with any issues or suggestions for new features you'd like to see.
|
||||
|
||||
- 🐛 **Bug reports & issues:** Use [GitHub Issues](https://github.com/nunocoracao/blowfish/issues)
|
||||
- 💡 **Ideas for new features:** Open a discussion on [GitHub Discussions](https://github.com/nunocoracao/blowfish/discussions)
|
||||
- 🙋♀️ **General questions:** Head to [GitHub Discussions](https://github.com/nunocoracao/blowfish/discussions)
|
||||
|
||||
If you're able to fix a bug or implement a new feature, I welcome PRs for this purpose. Learn more in the [contributing guidelines](https://github.com/nunocoracao/blowfish/blob/main/CONTRIBUTING.md).
|
||||
|
||||
Reference in New Issue
Block a user