Site Tools


tech_public:webdev (text)

This is an old revision of the document!


Website dev

  

Color contrast check

Add back to top

Export icon list from Fontawesome


https://fontawesome.com/changelog

https://github.com/mackilroy007/font-awesome-v6

Using Node js:

  1. download icons.json file
  2. execute following code in node js:
var json = require("{file-path}/icons.json"); 
var FA6Json = {}; Object.keys(json).forEach(iconName => { const icon = json[iconName]; icon.styles.forEach(style => { if (!FA6Json[style]) { FA6Json[style] = []; } FA6Json[style].push(`fa-${style} fa-${iconName}`); }) }); require("fs").writeFile("{file-path}/FA6icons.json", JSON.stringify(FA6Json,null,2), () => {});

Local Apache HTTPS SSL

Flarum migration

https://discuss.flarum.org/d/5138-moving-flarum-install-between-servers/11

Backup following elements

  1. Database
    PhpMyAdmin
    mysqldump -u mysql_user -p DATABASE_NAME > backup.sql
  2. composer.json
  3. composer.lock
  4. config.php files,
  5. extend.php for those who added any customizations,
  6. assets directory.

Restore

  1. Install a bare flarum as per the instructions here without configuring it.
  2. Copy over your composer.json and composer.lock files.
  3. Run composer install --prefer-dist --no-dev
  4. Copy over your config.php file.
  5. Restore your database:
    1. PhpMyAdmin
    2. b. mysql -u mysql_user -p DATABASE < backup.sql
  6. Copy over your flarum-root/assets folder.

Reindex search (for chinese)

USE YourFlarumDataBaseName;
ALTER TABLE posts DROP INDEX content;
CREATE FULLTEXT INDEX content ON `posts` (`content`) WITH PARSER ngram;
USE YourFlarumDataBaseName;
ALTER TABLE discussions DROP INDEX title;
CREATE FULLTEXT INDEX title ON `discussions` (`title`) WITH PARSER ngram;
tech_public/webdev.1740646782.txt.gz · Last modified: by jasonwch (text)

Top ↑