standardnotes-extensions
standardnotes-extensions copied to clipboard
Markdown Visual Editor and Midnight theme (at least) don't work
Hi,
I'm trying to use this but getting this error on desktop: "The extension was not found on your system, possibly because it is still downloading. If the extension doesn't load, try uninstalling then reinstalling the extension.". On the web version it simply doesn't load.
I'm hosting this on GitLab Pages. Can I not do that? Everything is accessible: https://julianfairfax.gitlab.io/standard-notes-extensions/index.json, https://julianfairfax.gitlab.io/standard-notes-extensions/markdown-visual/index.json, https://julianfairfax.gitlab.io/standard-notes-extensions/markdown-visual/1.0.7/public/index.html, etc.
I also tried hosting it on GitHub Pages but this creates the same issue. https://github.com/julianfairfax/standard-notes-extensions. I guess this just doesn't work?
I attempted locally self-hosting as follows (with a correct .env):
git clone https://github.com/iganeshk/standardnotes-extensions.git
cd standardnotes-extensions
pip3 install -r requirements.txt
cd public/
python3 -m http.server
I had to replace occurrences of my hostname in the extensions indexes to include the port :8000, but this was easy. Standard Notes still experiences the same errors. I'm starting to appear to be out of options.
I even ran with nginx (/etc/nginx/nginx.conf):
#user http;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
#access_log logs/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
server {
listen 80;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
location ^~ /extensions {
autoindex off;
alias /home/julian/Code/standardnotes-extensions/public;
# CORS HEADERS
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
#
# Custom headers and headers various browsers *should* be OK with but aren't
#
add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,X-Application-Version,X-SNJS-Version';
#
# Tell client that this pre-flight info is valid for 20 days
#
add_header 'Access-Control-Max-Age' 1728000;
add_header 'Content-Type' 'text/plain; charset=utf-8';
add_header 'Content-Length' 0;
return 204;
}
if ($request_method = 'POST') {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,X-Application-Version,X-SNJS-Version';
add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range';
}
if ($request_method = 'GET') {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,X-Application-Version,X-SNJS-Version';
add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range';
}
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
# root html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi_params;
#}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}
# another virtual host using mix of IP-, name-, and port-based configuration
#
#server {
# listen 8000;
# listen somename:8080;
# server_name somename alias another.alias;
# location / {
# root html;
# index index.html index.htm;
# }
#}
# HTTPS server
#
#server {
# listen 443 ssl;
# server_name localhost;
# ssl_certificate cert.pem;
# ssl_certificate_key cert.key;
# ssl_session_cache shared:SSL:1m;
# ssl_session_timeout 5m;
# ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on;
# location / {
# root html;
# index index.html index.htm;
# }
#}
}
But that says 404 not found for http://localhost/index.json and 403 forbidden for http://localhost/extensions/index.json
I also tried hosting it on GitHub Pages but this creates the same issue. https://github.com/julianfairfax/standard-notes-extensions. I guess this just doesn't work?
https://julianfairfax.github.io/standard-notes-extensions/index.json seems to be redirecting to https://julianfairfax.gitlab.io/standard-notes-extensions/index.json. This would make sense because of https://github.com/julianfairfax/julianfairfax.github.io/blob/main/CNAME but my understanding is that the contents of https://github.com/julianfairfax/standard-notes-extensions/tree/gh-pages should be given priority over the redirect? I guess this is not the case.
In any case, I want GitLab Pages to work. If that's not possible then GitHub Pages. And if neither work then I will settle for nginx provided that that works and that I can use it along side a prexisting nginx configuration (seems so since this is /extensions and the other is just /)
Turns out I forgot to deploy https://github.com/julianfairfax/standard-notes-extensions/tree/gh-pages but that's fixed now. And I don't have a CNAME file, which seems to redirect every visit to julianfairfax.github.io/* to julianfairfax.githlab.io/*, even if the page is itself hosted on julianfairfax.github.io as well. However, neither the Visual Editor nor the Midnight theme work. Token Vault does, but it actually also works with the version I have hosted on GitLab Pages.
So it seems that a CNAME on GitHub Pages makes the whole GitHub Pages site inaccessible, even if content is hosted on it (doesn't just redirect what isn't), the Visual Editor and Midnight theme (at least) don't work, and hosting from GitLab Pages is the same as hosting from GitHub Pages (doesn't make anything additional work though).
It's important to note that the Markdown Visual Editor that's broken (at least that one, probably others) doesn't show a "interact with your note" box either. It just doesn't work at all. And if you visit it online at https://julianfairfax.gitlab.io/standard-notes-extensions/markdown-visual/1.0.7/public/index.html or https://julianfairfax.github.io/standard-notes-extensions/markdown-visual/1.0.7/public/index.html it's a blank page. Whereas visiting another editor like Token Vault at https://julianfairfax.gitlab.io/standard-notes-extensions/token-vault/2.0.10/dist/index.html or https://julianfairfax.github.io/standard-notes-extensions/token-vault/2.0.10/dist/index.html displays the editor perfectly fine.
Token Vault (in browser):
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.