mirror of https://gitlab.com/curben/blog
style: tab to space
This commit is contained in:
parent
14c57d7009
commit
f6b93c845f
|
@ -42,20 +42,20 @@ deploy:
|
|||
```
|
||||
|
||||
10. You can start writing a new post straightaway without [installing](#Installation) Hexo. You still need to change the blog's name and favicon though ([how-to](#naming)).
|
||||
1. To create a new post (through [GitHub.com](https://help.github.com/en/articles/creating-new-files)), create a new `<post-title>.md` file in `source/_posts` folder.
|
||||
2. Start with the following header/[front-matter](https://hexo.io/docs/front-matter):
|
||||
1. To create a new post (through [GitHub.com](https://help.github.com/en/articles/creating-new-files)), create a new `<post-title>.md` file in `source/_posts` folder.
|
||||
2. Start with the following header/[front-matter](https://hexo.io/docs/front-matter):
|
||||
|
||||
```
|
||||
---
|
||||
title: Test page
|
||||
date: yyyy-mm-dd hh:mm:ss
|
||||
tags:
|
||||
categories:
|
||||
---
|
||||
```
|
||||
```
|
||||
---
|
||||
title: Test page
|
||||
date: yyyy-mm-dd hh:mm:ss
|
||||
tags:
|
||||
categories:
|
||||
---
|
||||
```
|
||||
|
||||
3. Write your post after the second `---` using [Markdown](https://guides.github.com/features/mastering-markdown/) [style](https://help.github.com/articles/basic-writing-and-formatting-syntax/).
|
||||
4. Save the file by clicking on "Commit changes".
|
||||
3. Write your post after the second `---` using [Markdown](https://guides.github.com/features/mastering-markdown/) [style](https://help.github.com/articles/basic-writing-and-formatting-syntax/).
|
||||
4. Save the file by clicking on "Commit changes".
|
||||
11. After you create a new post, the website can be accessed on <b>*username*.github.io</b>. Check your repo settings, under the GitHub Pages, make sure the Source is `gh-pages` branch. Read on if you prefer to manage the blog from your workstation.
|
||||
|
||||
## Installation
|
||||
|
|
|
@ -17,20 +17,20 @@ Create a website/blog using Hexo on [GitLab Pages](https://about.gitlab.com/feat
|
|||
4. Change project website to a user website. This is so that the website's home page is <b>*username*.gitlab.io</b>, instead of username.gitlab.io/hexo.
|
||||
Go to `Settings -> General -> Advanced -> Change path`. Change the value to <b>*username*.gitlab.io</b>, where username is your username on GitLab.
|
||||
5. You can start writing a new post straight away without [installing](#Installation) Hexo. You still need to change the blog's name and favicon though ([how-to](#Naming)).
|
||||
1. To create a new post (through GitLab.com), create a new `<post-title>.md` file in `source/_posts` folder.
|
||||
2. Start with the following header/[front-matter](https://hexo.io/docs/front-matter):
|
||||
1. To create a new post (through GitLab.com), create a new `<post-title>.md` file in `source/_posts` folder.
|
||||
2. Start with the following header/[front-matter](https://hexo.io/docs/front-matter):
|
||||
|
||||
```
|
||||
---
|
||||
title: Test page
|
||||
date: yyyy-mm-dd hh:mm:ss
|
||||
tags:
|
||||
categories:
|
||||
---
|
||||
```
|
||||
```
|
||||
---
|
||||
title: Test page
|
||||
date: yyyy-mm-dd hh:mm:ss
|
||||
tags:
|
||||
categories:
|
||||
---
|
||||
```
|
||||
|
||||
3. Write your post after the second `---` using [Markdown](https://about.gitlab.com/handbook/product/technical-writing/markdown-guide/) [style](https://docs.gitlab.com/ee/user/markdown.html).
|
||||
4. Save the file by clicking on "Commit changes".
|
||||
3. Write your post after the second `---` using [Markdown](https://about.gitlab.com/handbook/product/technical-writing/markdown-guide/) [style](https://docs.gitlab.com/ee/user/markdown.html).
|
||||
4. Save the file by clicking on "Commit changes".
|
||||
6. After you create a new post, the website can be accessed on <b>*username*.gitlab.io</b> or the link shown on your project `Settings -> Pages`. Read on if you prefer to manage the blog from your workstation.
|
||||
|
||||
## Installation
|
||||
|
@ -84,10 +84,10 @@ $ git push -u
|
|||
```
|
||||
|
||||
8. The generated `public` and `node_modules` are [ignored](https://gitlab.com/curben/blog/blob/master/.gitignore), as CI will generate them during build.
|
||||
1. I have migrated to [Netlify](https://www.netlify.com/) and removed my GitLab page.
|
||||
2. Since I don't have a gitlab page any more, I removed the deploy command in the `.gitlab-ci.yml`.
|
||||
3. The config now has two parts. To use in gitlab page, simply uncomment the second part and comment out the first part.
|
||||
4. Make sure you {% post_link validity-gitlab-ci-config 'double-check' %} the CI config before you push.
|
||||
1. I have migrated to [Netlify](https://www.netlify.com/) and removed my GitLab page.
|
||||
2. Since I don't have a gitlab page any more, I removed the deploy command in the `.gitlab-ci.yml`.
|
||||
3. The config now has two parts. To use in gitlab page, simply uncomment the second part and comment out the first part.
|
||||
4. Make sure you {% post_link validity-gitlab-ci-config 'double-check' %} the CI config before you push.
|
||||
|
||||
9. Check the build status by going to your project `CI /CD -> Pipelines`. Due to the limitation of `hexo`, the build will always pass even when there is error. Check the Jobs log, look for any error after `$ hexo deploy`.
|
||||
10. If there is no error, the generated website can be accessed on `<your-username>.gitlab.io/` or the link shown on your project `Settings -> Pages`.
|
||||
|
|
|
@ -21,13 +21,13 @@ Stop included games like Candy Crush and Minecraft to reappear after you remove
|
|||
|
||||
### Windows 10 Home
|
||||
1. Open Notepad, copy and paste the following text (make sure you don't copy the line number),
|
||||
```
|
||||
Windows Registry Editor Version 5.00
|
||||
;1709 Registry Keys
|
||||
```
|
||||
Windows Registry Editor Version 5.00
|
||||
;1709 Registry Keys
|
||||
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CloudContent]
|
||||
"DisableWindowsConsumerFeatures"=dword:00000001
|
||||
```
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CloudContent]
|
||||
"DisableWindowsConsumerFeatures"=dword:00000001
|
||||
```
|
||||
2. `File > Save As`, select Desktop folder, `Save as type` as `All Files` and set file name as `cloud-content.reg`.
|
||||
3. Launch the `cloud-content.reg` file from your Desktop.
|
||||
|
||||
|
@ -35,25 +35,25 @@ Stop included games like Candy Crush and Minecraft to reappear after you remove
|
|||
## Uninstall all preinstalled apps
|
||||
This is the easiest method to remove all preinstalled apps. Note: this will remove **ALL** apps listed at the next [section](#Uninstall-specific-preinstalled-app).
|
||||
1. Launch PowerShell as administrator (right click `Run as administrator`).
|
||||
1.1. Windows 10 Home user might not have it, install [here](https://docs.microsoft.com/en-us/powershell/scripting/setup/installing-powershell-core-on-windows?view=powershell-6).
|
||||
1.1. Windows 10 Home user might not have it, install [here](https://docs.microsoft.com/en-us/powershell/scripting/setup/installing-powershell-core-on-windows?view=powershell-6).
|
||||
2. Run the following command:
|
||||
```
|
||||
Get-AppxPackage -AllUsers | Remove-AppxPackage
|
||||
```
|
||||
```
|
||||
Get-AppxPackage -AllUsers | Remove-AppxPackage
|
||||
```
|
||||
|
||||
For more thorough removal including tracking or telemetry, use [Debloat Windows 10](https://github.com/W4RH4WK/Debloat-Windows-10) powershell script. I haven't test it myself, but it looks like it's regularly updated.
|
||||
|
||||
## Uninstall specific preinstalled app
|
||||
1. Launch PowerShell as administrator (right click `Run as administrator`).
|
||||
2. Run the following command:
|
||||
```
|
||||
Get-AppxPackage *<app-name>* | Remove-AppxPackage
|
||||
```
|
||||
```
|
||||
Get-AppxPackage *<app-name>* | Remove-AppxPackage
|
||||
```
|
||||
3. Substitute `<app-name>` with the package name listed below. Right click on PowerShell to paste.
|
||||
For example to remove 3D Builder,
|
||||
```
|
||||
Get-AppxPackage *3dbuilder* | Remove-AppxPackage
|
||||
```
|
||||
```
|
||||
Get-AppxPackage *3dbuilder* | Remove-AppxPackage
|
||||
```
|
||||
|
||||
App name | Package name
|
||||
---|---
|
||||
|
@ -94,62 +94,62 @@ Your Phone | yourphone
|
|||
## Prevent removed default apps from returning during an update
|
||||
1. No, you are not done yet. Those removed apps can return during an update.
|
||||
2. To make sure they stay removed, create a registry `.reg` file ([how-to](#Windows-10-Home)). Remove any entry to keep the app.
|
||||
```
|
||||
Windows Registry Editor Version 5.00
|
||||
;1709 Registry Keys
|
||||
```
|
||||
Windows Registry Editor Version 5.00
|
||||
;1709 Registry Keys
|
||||
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned]
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned]
|
||||
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.BingWeather_8wekyb3d8bbwe]
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.BingWeather_8wekyb3d8bbwe]
|
||||
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.Getstarted_8wekyb3d8bbwe]
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.Getstarted_8wekyb3d8bbwe]
|
||||
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.Microsoft3DViewer_8wekyb3d8bbwe]
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.Microsoft3DViewer_8wekyb3d8bbwe]
|
||||
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.MicrosoftOfficeHub_8wekyb3d8bbwe]
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.MicrosoftOfficeHub_8wekyb3d8bbwe]
|
||||
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.MicrosoftSolitaireCollection_8wekyb3d8bbwe]
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.MicrosoftSolitaireCollection_8wekyb3d8bbwe]
|
||||
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.Office.OneNote_8wekyb3d8bbwe]
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.Office.OneNote_8wekyb3d8bbwe]
|
||||
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.People_8wekyb3d8bbwe]
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.People_8wekyb3d8bbwe]
|
||||
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.Print3D_8wekyb3d8bbwe]
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.Print3D_8wekyb3d8bbwe]
|
||||
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.SkypeApp_kzf8qxf38zg5c]
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.SkypeApp_kzf8qxf38zg5c]
|
||||
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.Wallet_8wekyb3d8bbwe]
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.Wallet_8wekyb3d8bbwe]
|
||||
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.Windows.Photos_8wekyb3d8bbwe]
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.Windows.Photos_8wekyb3d8bbwe]
|
||||
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.WindowsAlarms_8wekyb3d8bbwe]
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.WindowsAlarms_8wekyb3d8bbwe]
|
||||
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.WindowsCamera_8wekyb3d8bbwe]
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.WindowsCamera_8wekyb3d8bbwe]
|
||||
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\microsoft.windowscommunicationsapps_8wekyb3d8bbwe]
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\microsoft.windowscommunicationsapps_8wekyb3d8bbwe]
|
||||
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.WindowsFeedbackHub_8wekyb3d8bbwe]
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.WindowsFeedbackHub_8wekyb3d8bbwe]
|
||||
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.WindowsMaps_8wekyb3d8bbwe]
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.WindowsMaps_8wekyb3d8bbwe]
|
||||
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.WindowsSoundRecorder_8wekyb3d8bbwe]
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.WindowsSoundRecorder_8wekyb3d8bbwe]
|
||||
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.WindowsStore_8wekyb3d8bbwe]
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.WindowsStore_8wekyb3d8bbwe]
|
||||
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.Xbox.TCUI_8wekyb3d8bbwe]
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.Xbox.TCUI_8wekyb3d8bbwe]
|
||||
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.XboxApp_8wekyb3d8bbwe]
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.XboxApp_8wekyb3d8bbwe]
|
||||
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.XboxGameOverlay_8wekyb3d8bbwe]
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.XboxGameOverlay_8wekyb3d8bbwe]
|
||||
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.XboxIdentityProvider_8wekyb3d8bbwe]
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.XboxIdentityProvider_8wekyb3d8bbwe]
|
||||
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.XboxSpeechToTextOverlay_8wekyb3d8bbwe]
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.XboxSpeechToTextOverlay_8wekyb3d8bbwe]
|
||||
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.ZuneMusic_8wekyb3d8bbwe]
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.ZuneMusic_8wekyb3d8bbwe]
|
||||
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.ZuneVideo_8wekyb3d8bbwe]
|
||||
```
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.ZuneVideo_8wekyb3d8bbwe]
|
||||
```
|
||||
3. Simply open the registry file to apply.
|
||||
|
||||
## Restore removed default apps
|
||||
|
|
|
@ -39,9 +39,9 @@ and deploy.
|
|||
|
||||
1. Linux distro has built-in gzip. Install brotli through apt/dnf/yum/pacman.
|
||||
2. To compress, simply run the following commands after you generate static files (`$ hexo generate`), only `public` folder is affected,
|
||||
```bash
|
||||
$ find public -type f -iregex '.*\.\(htm\|html\|txt\|text\|js\|css\)$' -execdir gzip -f --keep {} \;
|
||||
$ find public -type f -iregex '.*\.\(htm\|html\|txt\|text\|js\|css\)$' -execdir brotli -f --keep {} \;
|
||||
```
|
||||
```bash
|
||||
$ find public -type f -iregex '.*\.\(htm\|html\|txt\|text\|js\|css\)$' -execdir gzip -f --keep {} \;
|
||||
$ find public -type f -iregex '.*\.\(htm\|html\|txt\|text\|js\|css\)$' -execdir brotli -f --keep {} \;
|
||||
```
|
||||
3. If you use CI like `.gitlab-ci.yml` or `.travis.yml`, simply add the above command under `script:`, after `hexo generate`.
|
||||
4. Deploy.
|
||||
|
|
|
@ -25,15 +25,15 @@ filename=$(basename "$1")
|
|||
dir=$(dirname "$1")
|
||||
|
||||
gs \
|
||||
-sOutputFile="$dir/${filename%.*}.compressed.pdf" \
|
||||
-sDEVICE=pdfwrite \
|
||||
-dPDFSETTINGS=/ebook \
|
||||
-sColorConversionStrategy=Gray \
|
||||
-sColorConversionStrategyForImages=/Gray \
|
||||
-dProcessColorModel=/DeviceGray \
|
||||
-dCompatibilityLevel=1.4 \
|
||||
-dNOPAUSE -dBATCH -dQUIET \
|
||||
"$1"
|
||||
-sOutputFile="$dir/${filename%.*}.compressed.pdf" \
|
||||
-sDEVICE=pdfwrite \
|
||||
-dPDFSETTINGS=/ebook \
|
||||
-sColorConversionStrategy=Gray \
|
||||
-sColorConversionStrategyForImages=/Gray \
|
||||
-dProcessColorModel=/DeviceGray \
|
||||
-dCompatibilityLevel=1.4 \
|
||||
-dNOPAUSE -dBATCH -dQUIET \
|
||||
"$1"
|
||||
```
|
||||
|
||||
|
||||
|
@ -41,11 +41,11 @@ Options ([more info](https://ghostscript.com/doc/current/Ps2pdf.htm#Options)):
|
|||
|
||||
- Remove **ColorConversionStrategy**, **ColorConversionStrategyForImages** and **ProcessColorModel** lines to retain colour.
|
||||
- **PDFSETTINGS**:
|
||||
- */default* selects output intended to be useful across a wide variety of uses. 72 DPI.
|
||||
- */screen* selects low-resolution output similar to the Acrobat Distiller "Screen Optimized" setting. 72 DPI.
|
||||
- */ebook* selects medium-resolution output similar to the Acrobat Distiller "eBook" setting. 150 DPI.
|
||||
- */printer* selects output similar to the Acrobat Distiller "Print Optimized" setting. 300 DPI.
|
||||
- */prepress* selects output similar to Acrobat Distiller "Prepress Optimized" setting. 300 DPI.
|
||||
- */default* selects output intended to be useful across a wide variety of uses. 72 DPI.
|
||||
- */screen* selects low-resolution output similar to the Acrobat Distiller "Screen Optimized" setting. 72 DPI.
|
||||
- */ebook* selects medium-resolution output similar to the Acrobat Distiller "eBook" setting. 150 DPI.
|
||||
- */printer* selects output similar to the Acrobat Distiller "Print Optimized" setting. 300 DPI.
|
||||
- */prepress* selects output similar to Acrobat Distiller "Prepress Optimized" setting. 300 DPI.
|
||||
|
||||
## PDFs in a folder
|
||||
|
||||
|
@ -61,22 +61,22 @@ cd "$1"
|
|||
for i in *.pdf; do
|
||||
[ -f "$i" ] || break
|
||||
|
||||
# Skip compressed PDFs
|
||||
echo "$i" | grep --quiet ".compressed.pdf"
|
||||
# Skip compressed PDFs
|
||||
echo "$i" | grep --quiet ".compressed.pdf"
|
||||
|
||||
if [ $? = 1 ]
|
||||
then
|
||||
gs \
|
||||
-sOutputFile="${i%.*}.compressed.pdf" \
|
||||
-sDEVICE=pdfwrite \
|
||||
-dPDFSETTINGS=/ebook \
|
||||
-sColorConversionStrategy=Gray \
|
||||
-sColorConversionStrategyForImages=/Gray \
|
||||
-dProcessColorModel=/DeviceGray \
|
||||
-dCompatibilityLevel=1.4 \
|
||||
-dNOPAUSE -dBATCH -dQUIET \
|
||||
"$i"
|
||||
fi
|
||||
if [ $? = 1 ]
|
||||
then
|
||||
gs \
|
||||
-sOutputFile="${i%.*}.compressed.pdf" \
|
||||
-sDEVICE=pdfwrite \
|
||||
-dPDFSETTINGS=/ebook \
|
||||
-sColorConversionStrategy=Gray \
|
||||
-sColorConversionStrategyForImages=/Gray \
|
||||
-dProcessColorModel=/DeviceGray \
|
||||
-dCompatibilityLevel=1.4 \
|
||||
-dNOPAUSE -dBATCH -dQUIET \
|
||||
"$i"
|
||||
fi
|
||||
done
|
||||
```
|
||||
|
||||
|
|
|
@ -17,31 +17,31 @@ Here's how to prevent word break.
|
|||
|
||||
1. Go to the main admin page and then Themes.
|
||||
|
||||
{% image '20181031/theme-button' 'LimeSurvey theme button in admin panel' %}
|
||||
{% image '20181031/theme-button' 'LimeSurvey theme button in admin panel' %}
|
||||
|
||||
2. 'Extend' the theme of your choice. Choose a name of the new *extended* theme.
|
||||
|
||||
{% image '20181031/theme-list' 'LimeSurvey theme list' %}
|
||||
{% image '20181031/theme-list' 'LimeSurvey theme list' %}
|
||||
|
||||
3. It will redirect you to 'Theme editor' page.
|
||||
4. Go to 'custom.css'.
|
||||
|
||||
{% image '20181031/custom-css' 'Customise LimeSurvey theme through custom.css' %}
|
||||
{% image '20181031/custom-css' 'Customise LimeSurvey theme through custom.css' %}
|
||||
|
||||
5. Paste the following css,
|
||||
|
||||
```css
|
||||
table.ls-answers {
|
||||
table-layout: auto;
|
||||
}
|
||||
|
||||
#outerframeContainer {
|
||||
word-wrap: normal;
|
||||
hyphens: none;
|
||||
-moz-hyphens: none;
|
||||
-webkit-hyphens: none;
|
||||
}
|
||||
```
|
||||
```css
|
||||
table.ls-answers {
|
||||
table-layout: auto;
|
||||
}
|
||||
|
||||
#outerframeContainer {
|
||||
word-wrap: normal;
|
||||
hyphens: none;
|
||||
-moz-hyphens: none;
|
||||
-webkit-hyphens: none;
|
||||
}
|
||||
```
|
||||
|
||||
5. Save it and change to the new theme in your survey.
|
||||
|
||||
|
|
Loading…
Reference in New Issue